This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
[PUBLISHED] Mosquitto MQTT client app
![JohanKuster](https://secure.gravatar.com/avatar/0cd3c9788d770b7c37dba72ba4f30e80/?default=https%3A%2F%2Fvanillicon.com%2F0cd3c9788d770b7c37dba72ba4f30e80_50.png&rating=g&size=50)
I am currenty working on a MQTT client app that makes it possible for Homey to publish/receive message to/from a MQTT message broker. I am only testing the for the Mosquitto broker but it will probably work for most of the brokers out there.
In the app setting you have to specify the url where the broker can be found:
![Image: https://forum.athom.com/uploads/editor/8x/gcyze8jz3c50.png](https://forum.athom.com/uploads/editor/8x/gcyze8jz3c50.png)
In the flow editor you have a trigger (receive message) and action (publish message):
![](https://forum.athom.com/uploads/editor/la/vzc5i44h9ji6.png)
In the end the following should be possible. Replace Domoticz with Homey and place Mosquitto and Node-Red on eg a PI. You can now interact with many more devices/sensors and almost anything that is connected to the internet.
![](https://forum.athom.com/uploads/editor/tw/36mhk2klwrv2.png)
I will try to get this working as soon as possible. No promises here ;-) since most of the stuff I am doing is new to me.
Remarks are welcome
In the app setting you have to specify the url where the broker can be found:
![Image: https://forum.athom.com/uploads/editor/8x/gcyze8jz3c50.png](https://forum.athom.com/uploads/editor/8x/gcyze8jz3c50.png)
In the flow editor you have a trigger (receive message) and action (publish message):
![](https://forum.athom.com/uploads/editor/la/vzc5i44h9ji6.png)
In the end the following should be possible. Replace Domoticz with Homey and place Mosquitto and Node-Red on eg a PI. You can now interact with many more devices/sensors and almost anything that is connected to the internet.
![](https://forum.athom.com/uploads/editor/tw/36mhk2klwrv2.png)
I will try to get this working as soon as possible. No promises here ;-) since most of the stuff I am doing is new to me.
Remarks are welcome
Comments
https://www.itead.cc/smart-home/sonoff-wifi-wireless-switch.html
Any particular restrictions with the current version?
Perhaps submit it to the Appstore!
Edit: I'm new to MQTT, does it handle acknowledgements, so we can ensure message is sent / received? I Plan to try the MySensors MQTT client connected to Mosquito. ***Update: Got it working***.
Edit 2: Seems to work great, I have a number of flows that use better logic and variables, my plan is to pipe the MQTT messages into the variables. Right now it looks like I need to create a flow for every MQTT message I want to pipe into a variable, can you think of a more efficient way of doing this? For example, I have 2 sensors, when they're both "ON" I need to trigger sensor 3.
MQTT Client for Homey
This app makes it possible to subscribe to messages available on a message broker. Messages can also be published on the message broker.
The app has a trigger with an argument where you have to define the topic you are subscribing to. There is a token "message" that will contain the message received.
There is an Action where a message on a topic can be send to the broker.
In the app setting an URL where the broker can be found must be entered. Format is like 192.168.1.40:1883. At the moment I assume that the broker is in your local network, probably installed on a Raspberry Pi together with Node-red
.
Because there is a kind of chicken and egg problem here, you need to reboot/unplug the homey after you have defined the URL and first active trigger. A new trigger will work after any other active trigger was triggered. Of course you could also restart your Homey.
What works:
What doesn't:
Future enhancements:
I can't think of any better way to solve your 3 sensor problem. Looks pretty interesting already. We need to wait untill Homey allows more than 1 trigger in a flow.
Giving in DS215j:1883 wont connect, is that correct?
- Feedback on connection (is client connected ok)
- Example of topic syntax (do you use '/topic', 'topic' or /topic/#')?
n.b.I've got Plugwise-py, Fibaro HC2, node-red and Domoticz working just fine with a single Mosquitto broker, but can't get a incoming trigger from Homey..
The app is working fine for me. I use it to let domoticz send text to the speech engine.
After the app is running a few days it , it sends (reads) everything multiple times , the longer it tuns the more repeats.
after an app restart it is fine again.
is this something you have seen more?
Looks like this app does not check existing connections, it should try to reuse first I think.
It would be greatly appreciated if someone can update it.
Maybe it's only a limitation of the version-number in the installer (just hoping
@JohanKuster
Thanks for the effort.
BTW: my message was by no means to put pressure on you (or somebody else).
I only wanted to emphasise the fact that the app could be useful to some people, and that it would be a shame if your initial work on the app would be waisted if nobody did anything with it anymore.
Take this as a big thank you to EVERYBODY that is working on ANY app. You're doing a really great job !
If that's all there is to, what are the steps you (/we/I) have to take, to update it on github and ask Athom to update it in the app store ?
Sorry about that.
Almost done.