Configuration
Default IP address of the device is http://192.168.5.2 and will return a JSON string with the uptime and relays' status. There is no configuration process, just change the IP address for the one desired in the code.
Operation
URL | Action |
---|---|
http://192.168.5.2/?status1=ON | Activate Relay 1 |
http://192.168.5.2/?status1=OFF | Deactivate Relay 1 |
http://192.168.5.2/?status2=ON | Activate Relay 2 |
http://192.168.5.2/?status2=OFF | Deactivate Relay 2 |
JSON
The JSON return has the following format:
{ 'uptime':'1', 's1':'ON', 's2':'OFF' }
uptime is in seconds. s1 and s2 can assume ON or OFF values, depend on the status of each relays.
Tricked me, too. This is better than a network switch, though - probably more useful.