Added source code and schematic.
This commit is contained in:
parent
324cc14c85
commit
1601a36c38
@ -1,3 +1,5 @@
|
|||||||
|

|
||||||
|
|
||||||
# Wifi-Relay
|
# Wifi-Relay
|
||||||
|
|
||||||
This schematic and code can be used to build up a relay, which can be switched over wifi by sending on/off commands to a MQTT channel.
|
This schematic and code can be used to build up a relay, which can be switched over wifi by sending on/off commands to a MQTT channel.
|
||||||
@ -8,7 +10,7 @@ The cicurit is build upon a ESP-01 (ESP8266) module which GPIO2 pin switches the
|
|||||||
|
|
||||||
## Source
|
## Source
|
||||||
|
|
||||||
The code is quite simple. It connects to a MQTT broker and subscribes to a channel /<Hostname>/relay to recieve the on/off command. The current state of the relay is then published to the channel /<Hostname>/relay/state.
|
The code is quite simple. It connects to a MQTT broker and subscribes to a channel `/<Hostname>/relay` to recieve the on/off command. The current state of the relay is then published to the channel `/<Hostname>/relay/state`.
|
||||||
|
|
||||||
Enjoy.
|
Enjoy.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user