MQTT support

Have an idea for a new feature? Voice your opinion here.
Post Reply
wallebalboa
Senior Member
Posts: 111
Joined: Wed Aug 11, 2004 6:52 pm
Location: Sweden

MQTT support

Post 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
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: MQTT support

Post 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?
Scott
wallebalboa
Senior Member
Posts: 111
Joined: Wed Aug 11, 2004 6:52 pm
Location: Sweden

Re: MQTT support

Post 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
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Re: MQTT support

Post 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.
wallebalboa
Senior Member
Posts: 111
Joined: Wed Aug 11, 2004 6:52 pm
Location: Sweden

Re: MQTT support

Post by wallebalboa »

Hi. Can you share the xAP<>MQTT link? is it "two way"? What does it run on/under?
kind regs Anders
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Re: MQTT support

Post 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.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: MQTT support

Post 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.
Scott
wallebalboa
Senior Member
Posts: 111
Joined: Wed Aug 11, 2004 6:52 pm
Location: Sweden

Re: MQTT support

Post 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
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Re: MQTT support

Post by markd »

Sounds great! Sonoff was the manufacturer that I saw- definitely have to look into this more.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: MQTT support

Post 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?
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: MQTT support

Post 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.
Scott
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: MQTT support

Post 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!
Post Reply