Transfer data from ESP8266 to openhab using WiFi

I am new to Openhab. Can I transfer data from a microcontroller to openHab using WiFi

Yes, you can. I have experimented with D1 minis (flashed with Tasmota firmware), and interfaced them through MQTT. I’ve also played with the Makerhawk board with onboard oled display. It’s work in progress, but I can write to the display, and read text back from it.

Hi @hengis7,
MQTT is defently the way to go. I am using ESP Home which is similar to @evansnp suggestion. These firmware generate MQTT topics and message that allows OH to discover your devices automatically if the MQTT binding works.

I like to add another idea, because I am working on it at the moment. MQTT can send and receive data, which is of course required for eg a LED dimmer. But to transfer data to OH without additional software you can use the REST API. I am designing window contacts, devices that are sleeping most of the time and sometimes just toggling an item state in OH. For this situation I hope it is less energy consuming to make a single REST request than connecting to a MQTT broker.
This approach requires a self written ESP firmware but this solution probably has no advantage if energy consumption is no problem.

This is off topic now, but have you considered the MySensors project for this, instead of an ESP? Much lighter on battery usage, and if you’re developing ESP firmware yourself, you’ll find MySensors a doddle!

Thank you, that is really interesting. The project is based on the ESP because of the included Wifi. Wifi is available everywhere but more expensive in energy consumption. The next project will include this learning… let’s see how long a battery can run my sensors

Hi Folks
I started this topic in the hope of shortening my OH learning curve but I have been opened to some intriguing ideas. Thanks. I will have a look at all of them but I will start with MQTT and OH I will let you know how I do.

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