MQTT Hub/Gateway

How do you control Homey from OpenHAB? I see the messages of Homey in MQTT Explorer and I see my devices under Configuration > Things > Homey > Channels (with the status going from online to offline but I read that was no issue?).

I was able to add a switch to the Control section but switching it does nothing (both ways)? Am I missing an important step here?

try the following:

  • make sure your devices dont include an underscore in their name
  • verify the settings of your MQTT client app to make sure you use the right port disable the certificate check if you use self-signed certificates. I also manually configured keepalive time of 60 seconds.
  • restart the MQTT client and gateway apps

Thanks, just tried but no change. Considering the change shows instantly in MQTT Explorer it is probably something in OpenHab I am not doing correctly.

if you toggle a switch via OpenHAB, does a message appear in the history of the “/onoff/set” topic in MQTT Explorer?

Can you switch your lights if you manually send “true” or “false” using RAW type via MQTT Explorer to:
homie/homey//onoff/set ?

1st question: no, nothing happens.

2nd question: I see the state going from false to true in MQTT explorer but nohting happens.But I see e.g. ‘homie/homey/badkamerradio/onoff’, do I need to add ‘/set’ to that line and then input true or false in the window below?

Support for Home Assistant

Just to let people know I now have a nodeRED flow available (beta) that will auto create devices from Homey into HomeAssistant. These are state synched and fully controllable from HA. You can include them in any UI you use on HA including TileBoard AIUI so you can create a Homey dashboard to your liking.If anyone would like to be a beta tester then PM me and I’ll send you instructions. I can help on Slack too. Shortly (based on feedback) I’ll post the code for anyone.

Just FYI you’ll need these things installed and setup:

MQTT-Gateway (homie or homie2 branch)

MQTT Client (beta version in app store)

Home Assistant (for new users I recommend hassio as it has addons available) but any version is OK

MQTT broker (also available as a hassio addon)

nodeRED (available as a hassio addon too)

Homey/Homey3 flow code (available from me)

NB At some point in the future HomeAssistant discovery should be added to MQTT-Gateway directly which will remove the need to use nodeRED but as it’s a great app you really should have it installed alongside HA anyway. Plus you can customise the flow easily.


image
image
image

4 Likes

FYI: I almost finished the app settings implementation. HA Discovery is next on the list.

3 Likes

Now I have a moment I’m going to take a look on github or if you can get the basics into the code I can build onto that supporting additional entities.

1 Like

@HarriedeGroot Even with some help from @Retrospected I was not able to get it working. We got so far that in MQTT explorer I can see immediately when a device state is changed from within Homey, from MQTT explorer I can publish a /set command which is not picked up as an actual state change and when I toggle a linked switch in OpenHAB I also see the /set change in MQTT Explorer but nothing happens to the actual device state change.

I am on 1.15.13, installed the beta MQTT Client app and installed the Homie branch of the MQTT Gateway via CLI.

Do you have any clue what to investigate further? Possible directly via eg slack should it become to detailed :slight_smile:

@Julian Whats the full name of your non-responding device?
Whats the topic you’re trying to set the value?

Some of the fixes on the homie2 branch have not been merged back to the homie branch.

Name is Badkamerradio (one word) and full topic is ‘homie/homey/badkamerradio/onoff’

This is (in Homey) a Fibaro Switch.

Could you expand all the MQTT sub topics for that device and post a screenshot. Is it by any chance $settable = false ?

image

The NodeRED flow by @xAPPO is awesome. I can use most of my devices in home assistant and even use the Dutch Google assistant with my Homey devices because of it! I have said it before and will say it again, I love where this is going.

3 Likes

Hmm that looks exactly right Julian - and you have other on/off devices that are working OK… so the broker connections are intact. Strange… I assume that set = true is current - not just a retained (or old ) value ? You could try sending it (set = true) again from within MQTT-Explorer.

I didn’t expect you to have a vaccumcleaner device in Homey :wink:

2 Likes

Yeah, I just sent true before I made the screenshot. When I sent it again nothing happens to the actual state. Also no other topic I try to change works.

I don’t use openHAB very much but I’ve extensively used MQTT-Gateway with my HomeAssistant implementation and every onoff device from MQTT-Gateway I’ve tried seems to work just fine.

Maybe try false followed by true? No other ideas.
It reacts OK from within the Homey control tile I assume?

Have to leave this to Harrie.

I love all the amazing work done with the MQTT Gateway and Client.
Installed then both and pointed the gatewate to a Mosquitto server on a local raspberry pi.

I can connect without issues using the MQTT Explorer in Windows, but I don´t see any messages from Homey.

Anything I might have missed?

What’s your settings in the client app?
Have you restarted the gateway app? When everything is set up you usually have to restart it.