Esp 8266 with a 4 way relay in openhab and mqtt

Hello I need your help, please, I would like to use a 4-way relay in openhab with an Esp 8266 (wemos d1 mini) I don’t know how I can flash an Esp and how I have to write the code for it and or where I can get it from and how I can connect it with mqtt have already installed the broker can someone help me please?

You’ll need to do some reading outside of openHAB. Perhaps check whether Tasmota or ESPhome suits your needs? Means you don’t have to write any firmware. Once you have that up and running, and confirmed connected to your MQTT broker, then come back here for help integrating in openHAB!

1 Like

+1 for

Definitely Tasmota + Mosquitto MQTT, but also look at a ready made Sonoff 4CH or 4CH Pro - both work well flashed with Tasmota, and avoid a lot of hardware issues (e.g. a small, stable mains PSU).

For flashing itself, look for the Tasmotiser script which makes the process easier with a GUI.

When you get as far as the Tasmota web-GUI, investigate SetOption19 1 as MQTT auto-discovery is starting to get somewhere - and has the potential to save a lot of work in 3x sets of config files.

I’ve also modified a 4CH to add sensors on unused pins.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.