Serup uses microcontroller board to ping every 20 seconds to your server through serial port. You need nodejs and npm to use the nodejs program that responses to the pings. If Serup does not get a response within 100ms the microcontroller board will close a relay which is connected to the motherboard's reset button pins.
- Windows² / x64 (Only works with Arduino. Need drivers for Digispark, every driver I found were outdated.)
- Linux / x64
- Arduino Uno R3 (Serup/boards/ArduinoUno)
- Joy-IT Digispark ATTINY85 (Serup/boards/DigisparkATTINY85)
- Get the right code for your board from Serup/boards/ and copy paste that to your board.
- The relay's data pin is default to pin 3 you can change it in the 11th line:
int Relay = 3, LedBuildin = LED_BUILTIN; // Pin where relay and build in led is set
- Install the nodejs program by cloning the main repo to your server.
- Install needed dependencies with
npm i
on Linux usesudo npm i
inside the folder you cloned the repo. - Run the nodejs program ones so that the port.json file gets created.
- Find your serial port path by using command
node available
inside the folder you cloned the repo. - Set the serial port path to the port.json file. In the section named "COMport"
- Now try if everything works by using command
sudo node index
inside the folder you cloned the repo. If errors come up check the subject for common errors below. - Create a systemd service so that that the Serup/index.js file is always running with root access. You can find the example service in Serup/Serup.service you should edit the third section of ExecStart to where the Serup/index.js file is located on your server.
- Now start the service:
sudo systemctl start Serup
and enable it so that it opens up after rebooting:sudo systemctl enable Serup
- Serup is now ready for work! If you need help just create a issue.
The port you have set in port.json
is not available. Use command node available
to get list of available ports. Pick a port that has references to your board's name E.g. Arduino
Something is already connected to that serial port.
Index.js is not started with root access