Controll Panel esp8266


(George) #1

Hello,

I am coming here from HomeAssistant as what I wanted to try and do Is control my Philips hue and a wemo smartplug via a diy control panel running on an esp8266, I had looked into mqtt on homeassistant but it turned out that that wasn’t going to work with the Philips hues, eventually I plan on using a tft touchscreen lcd to control my devices (still running from the esp8266) but at the moment I am just trying to use a normal button to send a signal to openhab (which I would be running of a pi) and wanted to see if anyone had any ideas of code or anything before I make the leap to reformat the pi running homeassistant at the moment.


(Vincent Regaud) #2

You can run the library pubsubclient on the esp8266 (It comes with examples) to publish MQTT messages that OpenHAB can subscribe to.
You can use the HUE binding to control your lights.

For the display you’re on your own I have implemented this.
I use really cheap tablets


(George) #3

I am going to sound really stupid here, but I was wondering if you could record a video on how to set up and use the mqtt with openhab and the esp8266?


(Vincent Regaud) #4

Have you checked youtube before asking a question like that.

Can’t you follow a normal tutorial.

Everything you need is there:


(B K) #5

I have a few videos on my channel that show you how to connect NodeMCU based devices to openHab via MQTT. Check out either of these topics, specifically part 3 of the video series (which show MQTT):

The sensor one will probably be better suited for what you’re trying to do (i.e. send MQTT data from ESP8266 to OH).

I set up something similar to what you’re trying to do. I have a PIR sensor hooked up to my Kube, and every time motion is detected, the Kube sends a “1” to the “motion” MQTT topic. In openHab, I have a rule set up that fires on that motion event, and if it is night time, it sends a color/brightness command to a Hue lightbulb. This lights up my ensuite hallway light a dim red if motion is detected at night.