Homey Community Forum

MQTT Hub/Gateway


#203

Didn’t look into the buttons yet


#204

Thnx, going to try this.


#205

Was thinking… quickly as I’m late. When you change $state from ‘ready’ to ‘offline’ or whatever it is I could detect that and know that the Homey Devices on the broker could be old. When it returns to ‘ready’ I could look at the $nodes property and see what nodes are now current as you nicely update that.

Would be a workaround to solve my issue but I’m not sure that’s the right way to do it as the broker will always persist all nodes, even those that are no longer in use.


#206

@dhanjel Can you elaborate? What do you see? Whats in the Log?

EDIT: Is your issue fixed with the latest version?


#207

Just fixed a LARGE BUG which prevented app booting. Anyone who did not see any messages or could not get the app running should get the latest version from the homie2 branch.

Thanks to @Talzac for his help with debugging.


#208

Haha was just going to reply that I couldn’t get the new version to work. Will update once more and see if it works now.


#209

@Camelen and?


#210

And after this update it works again.

EDIT: Disabling items seems to work also. I disabled and they stopped respond to commands in MQTT-explorer and if I enable them again they start responding once more.


#211

Everything is working. Client, broker, gateway. Openhab connection with broker and even the Homie MQTT device is running. But now i am stucked. How do i get my light, sensors, etc visible in the panel?


#212

Thank you for all the effort you are putting into this! I am new to MQTT ( I do have experience with Apache Kafka on an enterprise scale) and this is offering a lot of flexibility.

I was having the issue that homey wasn’t responding just like @Julian, @Camelen but with the latest build (just installed it) all is working great!

homeyVersion: 2.0.2-rc.2
MQTT Broker Version: homie2 commit 862abf8
MQTT Client Version: 2.2.0 beta

edit; versions


#213

By panel, do you mean HABPanel? That seems to be more of a question about openHAB than anything else.

Anyway it’s best if you read up on how it works. And me myself am very new to it as well.

Basically:
In Paper UI you add Homey as a “thing”. Homey will populate it’s “channels” with the devices and capabilities you have added to homey. Then you need to make an “Item” connected to these channels. The Item will be for example a switch that calls the channel to change it’s state.

When you’ve done this, you can add these “Items” to HABPanel and you’re kind of done.

But this is probably not the correct place to discuss this since it’s an entirely different application that has its own forum.


#214

Hi,

commit 862abf is working in my installation.
Just did a quick smoke test.
MQTT Messages are working. Node-Red and OpenHAB can control homey.
Status changes are signaled.


#215

One question:

All the homie Information stuff and even states are stored as retained messages on the MQTT server. What happens if i remove/rename a device in Homey. Did your app remove the retained but obsolete information structure?

Great work
Ciao Odig


#216

Just to make sure, everyone who got the MQTT Gateway working with OpenHAB is on V2?

Because I am still on 1.15.13 and it does not work. So then I can assume the (different) version of MQTT Gateway for v1 simply does not work and this will save me a useless quest for trying to get it to work :face_with_raised_eyebrow:.


#217

Lots of positive experiences now in here … looking good.


#218

@Julian Did you try this version (homie branch)? You should be able to connect with OpenHAB with it on Homey v1.5.

The bad news is: I 'm not able to maintain the version for v1.5. My Homey version is upgraded to 2.0 in the meantime and the differences between the two version are to large and not backwards compatible.

Therefore further support will be Homey 2.0 only :disappointed:


#219

Renamed the app to ‘MQTT Hub’ and did a full re-write of the readme.


#220

Yes, I did. Problem is that when using MQTT Explorer I see it when something changes in Homey but when I use a set command in MQTT Explorer the state does not change, also I am able to add eg a switch in OpenHAB and see -again- the set change via MQTT Explorer but the actual state in Homey does not updates.

But now first will try a full uninstall and re-install to see if that perhaps resolves the issues.

Edit: Just did a full re-install including stoppping/starting the broker/Homey etc etc.but same issue remains. Somehow an external ‘set’ command does not get accepted by Homey.

I hoped to test this with a working dashboard via HAB Panel because the absence of a good dashboard is the only thing withholding me from upgrading to V2. And am a bit anxious to upgrade hoping that this will work on V2.


#221

Working quite well now @HarriedeGroot.

The only thing i keep running into is as soon as i restart OpenHAB as a whole, or restart the Homie MQTT Device in OpenHAB, i can’t seem to recover its functionality. Restarting the Hub service or the complete app brings the Homie MQTT Device online for a short time, but when i try to toggle a device it throws the error:

No connection or readOnly channel!

The only way to recover to a working state is to re-add the Homie MQTT Device and therefore re-install all items again :frowning:.

openhab.log seems to give the following error which may caue this behavior:

2019-01-30 10:53:17.337 [WARN ] [.internal.convention.homie300.Device] - Could not subscribe
java.util.concurrent.CompletionException: java.lang.Exception: Did not receive mandatory topic value: homie/homey/homey/$properties
        at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292) ~[?:?]
        at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308) ~[?:?]
        at java.util.concurrent.CompletableFuture.biRelay(CompletableFuture.java:1286) ~[?:?]
        at java.util.concurrent.CompletableFuture$BiRelay.tryFire(CompletableFuture.java:1270) ~[?:?]
        at java.util.concurrent.CompletableFuture$CoCompletion.tryFire(CompletableFuture.java:1020) ~[?:?]
        at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) ~[?:?]
        at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977) ~[?:?]
        at org.eclipse.smarthome.binding.mqtt.generic.internal.mapping.SubscribeFieldToMQTTtopic.timeoutReached(SubscribeFieldToMQTTtopic.java:161) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
        at java.lang.Thread.run(Thread.java:745) [?:?]
Caused by: java.lang.Exception: Did not receive mandatory topic value: homie/homey/homey/$properties
        ... 8 more

#224

while debugging this issue at some point i noticed this error in the openhab log:

2019-01-30 12:23:19.115 [WARN ] [l.mapping.AbstractMqttAttributeClass] - Could not assign value Homey to field public java.lang.String org.eclipse.smarthome.binding.mqtt.generic.internal.convention.homie300.DeviceAttributes.name
java.lang.IllegalArgumentException: ID segment 'socket/home/woonkamer-lamp' contains invalid characters. Each segment of the ID must match the pattern [A-Za-z0-9_-]*.

so i renamed “woonkamer lamp” to “woonkamerlamp” in Homey, re-added this item only and now everything works again :confused:

doesn’t make sense because i also use a space in the names of other lamps