Skip to content
Woody edited this page Dec 23, 2020 · 1 revision

The basic URL scheme is: [ipadress]/[api].

The placeholder [id] defines the ID of your relay. The first relay has the ID 0, the second the ID 1,...

Here is a list of available api commands:

API Description
/toggle?r=[id] This toggles the relay for 250ms.
/switch?r=[id]&on=true Turns the relay with the given id on.
/switch?r=[id]&on=false Turns the relay with the given id off.
/json JSON of all relays and some informations about them.
/info JSON with infomations about the microcontroller.
/format Formats the device.

Exampels

Toggle relay with id 2:

http://[ip-adress]/toggle?r=2

Turn relay with id 0 on:

http://[ip-adress]/switch?r=0&on=true

Turn relay with id 1 off:

http://[ip-adress]/switch?r=1&on=false
Clone this wiki locally