-
Notifications
You must be signed in to change notification settings - Fork 7
wifi_relays
We're using Mosquitto as MQTT-Broker, which is served on it's standard port 1883.
MQTT is a widely used protol, to exchange data and information. It's based on a central broker, that manages all incoming data and refers them to connected clients accordingly. The basic concepts are 'Publish' and 'Subscribe'. A client can publish messages under a specific topic, to which other clients can subscribe to and receive these payloads.
So far we included Tasmota and Shelly switches. You need to set the firmware you are using in the config of the VanPi frontend (defaults to Tasmota).
Click on 'Config' from the main menu, then head over to 'Relays' and activate 'Wifi Relays'. On the bottom of the corresponding column you'll find a button 'Set Wrelay Firmware'. Click on it and you'll be prompted to a form in which you can set the desired firmware for all wifi-relays.
Connect to your Tasmota devices web-interface. Set 'RPI-IP:1883' as host in your Tasmota devices MQTT settings. Then use the relay you want to use for this device as the topic ('wrelay1' to 'wrelay8', case sensitive!). The full topic needs to be 'pkw/%prefix%/%topic%'
Connect to your Shelly switches web-interfaces (do not use the shelly mobile app for this!) Head over to 'Internet & Security' and choose 'Advanced - Developer Settings'. Again, as host set 'RPI-IP:1883'. Activate 'Use custom MQTT prefix' and set it to 'shellyRelay1' up to 'shellyRelay8'.
Please be advised, you won't be able to use the Shelly cloud function via the Shelly app after activating MQTT!
You can flash it by either directly connecting your device to the Raspberry Pi and go to Config -> System -> Flashtool,
or use the Tasmota Webflasher.
Further information can be found here: vanpi.de/tutorial-wifi-relays