Page 1 of 1

MQTT support

Posted: Wed Sep 06, 2017 4:33 pm
by wallebalboa
Hi! nice to see that HB is moving further!
I have started to use lots of ES8266 WiFi nodes and would really like to get them in to HB. A basic support of MQTT would be a nice way.
https://en.wikipedia.org/wiki/MQTT
http://www.hivemq.com/mqtt-essentials/
https://mosquitto.org/

the need is just a topic as a property and a payload as the value. no need for wildcarding or Json parsing etc.

this will open housebot for all the MQTT devices talking MQTT for example http://sonoff.itead.cc/en/ and ESPeasy https://www.letscontrolit.com/wiki/index.php/Devices.
kind regs Anders

Re: MQTT support

Posted: Thu Sep 07, 2017 11:28 am
by ScottBot
It looks like it's still just a lot of low-level stuff at this point, but it could be interesting.

Do you have anything setup where you could assist in testing?

Re: MQTT support

Posted: Fri Sep 08, 2017 3:01 am
by wallebalboa
Hi Tnx for your fast reply.
Yes its not as plug n play as rfx or zwave but more flexible and cheaper...
all you need is a MQTT brooker ex. https://mosquitto.org/ and any "MQTT monitor".
i am using lots of sensors and some relays to openHAB (if you talk low level and not easy ;-) )
its quite easy to get sensors by using any ESP8266 and espEASY, just configure , no programming.
I am using xAP but is now moving to MQTT cos lack of HW and support... the xAP interface is great and propaply more sopisticated then a MQTT need to be.
its alot of MQTT libraries and framworks that probably can be used.
HB need to connect to a brooker (there is public brookers for testing) and subscribe to topics ( device values).
HB would need to publish topics to brooker for devices to subcribe to.

i use ESPeasy-nodemcu-MQTT for temp, pulse, switch, co2, etc and output to relays. the sonoff HW have made cheap I/Os.

openHAB, HASS, Domoticz have MQTT but i see HB more complete and ease to use..

kind regs Anders

Re: MQTT support

Posted: Mon Nov 06, 2017 11:29 am
by CouchPotatoe
Another request for MQTT support - it's a great way to communicate between loads of different devices/platforms and almost everyone supports it now.

I use xAP too and have a xAP (BSC) to MQTT link set up which works really well. The xAP plugin for HouseBot works really well.

Re: MQTT support

Posted: Thu Nov 09, 2017 1:01 pm
by wallebalboa
Hi. Can you share the xAP<>MQTT link? is it "two way"? What does it run on/under?
kind regs Anders

Re: MQTT support

Posted: Tue Aug 28, 2018 5:04 pm
by markd
Did this ever go anywhere? Ran across a guy using arduino modules with WiFi for like $5 each, talking MQTT... would be a nice addition.

Re: MQTT support

Posted: Wed Aug 29, 2018 9:34 am
by ScottBot
The latest version has an 'MQTT support' setup option (not installed by default). This will give you an MQTT device that allows simple publish and subscribe functionality. You need to handle all the specific logic in a task or script.

Re: MQTT support

Posted: Wed Aug 29, 2018 12:08 pm
by wallebalboa
Sorry for not giveing any feedback on this.... i am running the MQTT Device/Interface with ESPeasy and cheap ESP boards. works fine for input sensors and switches/relays.

https://www.letscontrolit.com/wiki/index.php/ESPEasy
https://github.com/letscontrolit/ESPEasy

there is a lot of ESP based HW at lowcost. boards and stuff like sonoff.

for relays i publish a command , i set up an input switch in ESPeasy and subscribe in the same device to that, this give feedback from relayboard.

so thanx for the MQTT device!

kind regs

Re: MQTT support

Posted: Wed Aug 29, 2018 1:41 pm
by markd
Sounds great! Sonoff was the manufacturer that I saw- definitely have to look into this more.

Re: MQTT support

Posted: Fri Oct 01, 2021 9:56 am
by Richard Naninck
Scott,

I setup an MQTT broker in a docker on my QNAP NAS.
Thereafter I setup HouseBot (HW Device and a Device to subscribe to a sensor using mqtt.
All works fine however when I stop the docker and restart it again, the data doesn't pickup in HouseBot until I disable and enable the HW Device.
Could it be so that the HW device detects a disconnect and tries to reconnect by itself?

Re: MQTT support

Posted: Sat Oct 02, 2021 11:18 am
by ScottBot
Try this version and see if it helps.

It will reconnect (might take about 5 or 10 seconds to get fully reconnected). Just copy it over the old MQTT.DLL in your Plugins\Interfaces directory.

Re: MQTT support

Posted: Sat Oct 02, 2021 6:20 pm
by Richard Naninck
Yes, this new version works fine. The data picks up automatically after I cycled my broker. With this I can add some more Air Quality sensors that make use of MQTT.
Another way would have been using Node-Red MQTT and push that data into HouseBot but I like it better when it is native;)

Thnx!