Looking for tutorial on esp8266/d1 mini + openhab + relays

Hello all,

I have spent the last few days trying to get my new d1 mini / esp8266 devices to work with no luck.

I am looking for a beginner step by step guide for the initial configuration of openhab + mqtt as well as the configuration guide of a basic esp8266 / d1 mini with relay gpio controls.

I just want to start simple and control some relays using the D1 mini GPIO’s and a centralized openhab server. Nothing more at this time.

I have a raspberry pi setup and running currently with a 8 channel rely board connected and using 6 of the relays to control my garage. I want to convert this to a esp8266/d1 mini controlling the relays and move the Pi into a central location so I can control the garage via the esp8266 and have the Pi in a central location for future OH projects as a central server.

I have been able to get the mqtt server working locally on the Pi but that is about it (It says online in paperUI). I cannot find straight forward documentation on adding items that control the esp8266 from the paperUI or auto detects it, as well I have not been able to find any documents that explain how to program the esp8266 properly to communicate with the mqtt server on the pi / openhab.

There is so much confusing and contradicting information out there on this topic. Openhab is a great product, sadly the documentation is so wildly all over the place it is very difficult to follow. I guess is such the case with any opensource product. Eventually I will have an “AH-HA” moment, until then I am wishing I had hair to pull out.

This is the first step which needs to be taken, so please decide which firmware you want to use. Pretty common firmwares are Tasmota, ESPEasy and several others.
For Tasmota, there is even a step-by-step openHAB tutorial:


Please make sure you are following the new mqtt2 binding version setup, not the outdated mqtt1:

This will ensure your ESP8266 device is able to communicate with your mqtt broker and you will be able to configure your ESP8266 through a nice web interface.

All configured now, had to use about 10 different guides to get it all done, but it is working. I plan to write a full writeup in coming days, I have most of it done in my onenote already, need to finalize a few things first.