OpenHAB, Raspberry PI, MQTT and an ESP8266

Yes the Arduino IDE is configured for ESP8266 I have loaded a sample web server on it and got it to turn on and off just to prove it is configured correctly and can connect to my wifi. I just dont know how to get it to talk to OpenHAB

There are numerous ways to get them to communicate, that’s the beauty of openHAB. You’ve mentioned MQTT, but you could also use your existing web server and the HTTP binding instead which may be easier than you having to reprogram/code your ESP8266.

If you chose to keep your webserver and use the HTTP binding then the follow link should be a good start place.

https://github.com/openhab/openhab/wiki/Http-Binding

1 Like

I don’t really know anything about the web server I just put in some sample code from a website and it would turn on and off. I currently have Easy ESP installed on the 8266 but I can’t find any examples of how to get that to work either. Basically Im just looking for a solution there are tons out there but none of them tell you step by step what to do.

For simplicity’s sake, keep the webserver code on your ESP8266 and control it using openHAB with HTTP binding.

If you let me know the URLs for controlling it I can post some updated Switch configs. This assumes you only care about one way communication from openHAB -> ESP8266.

I,m in the same boat as you,

So i managed to get ESP8266 working with openhab over MQTT.
I’m using EasyESP as well. i followed this guide over here http://www.esp8266.nu/index.php/Tutorial_OpenHAB_Switch
But the problem was openhab did you want to send MQTT messages, apparently the way you install it matters,
Installing it using apt-get is the one that finally worked for me.

However i still had to manually copy the openhab.binding.mqtt.jar file into the addons folder and then use apt-get install method for mqtt to get it work. why it worked like that is beyond me but as long as it works, i wont question it.

Hope it helps.

Preface: I’m new to Raspberry Pi, OpenHAB, etc.

I followed Joseph’s process and it appeared to go well, however, HABmin doesn’t open when I go to http://localip:8080/habmin/index.html. Is there something more I need to do to be able to access openHAB?

BTW, I haven’t loaded any config/sitemap/etc files for openHAB yet.

Edit: Once I installed the demo files, HABmin worked. This thread was helpful in getting everything into the right folders: HABmin + Z-Wave binding