MQTT Hub/Gateway

Hi Gustav,

It’s true homie3 only permits A-Z a-z 0-9 and _ which is a surprisingly limited character set but as to whether that is your issue I’m not convinced. Other characters within $name might be OK and the topic as sovrum byralampa looks OK.

Could you just try turning ‘off’ the sovrum byralampa within the app in the device list and then turning it back ‘on’ again (to green) and then seeing if it now gets a state in onoff / dim and perhaps also trying a broadcast?

Kevin

Kevin,

Thanks for taking your time to help!

I´ve played around with changing on / off and dim values countless times when troubleshooting. Sometimes this works, ie device state and / or dim value gets updated on the broker, sometimes it doesn´t. I have failed to detect any kind of pattern. It could be “any device” at “any time” that doesn´t get updated. Basically the only thing all have in common is that none gets updated when broadcasting. On app version 2.0.2 I never had this problem.

One thing that puzzles me is that I occasionally get different kinds of [getaddrinfo ENOTFOUND localhost localhost 80] warnings when broadcasting or viewing log tab in hub app. Usually this causes Homey app to crash, thus requiring a full Homey restart from developer site or pull the plug. An example below:
Screenshot_20190213-173804

Also nordic letters never seemed to be a problem on 2.0.2. I would ofcourse consider changing name on my devices to only english characters if that helps. But since that would reduce the family friendliness of the home automation, it´s more of a last resort.

Thanks!

I have seen those localhost access errors too but in my case I believe I have too many apps loaded on Homey and it’s just pushing it too hard. The initial startup work that MQTT Hub has to do is quite challenging on Homey but once running it calms down. I’ve had to do a couple of restarts too but also found it often recovers if left to it. I haven’t seen the app crash though.

I asked about disabling & enabling the device because of a rather stupid oversight I made whilst testing the 2.0.5/6 betas. That fixed it for me although I haven’t had extensive time to double check that states are all updating 100% now. It seems this is not your issue though if it didn’t work for you.

An earlier issue with the topic normalisation that left me with some non permitted characters in the device name manifested itself as reporting state OK but not being able to control a device via the set topic. Again that doesn’t seem to be your issue here, but that would be a symptom of any Nordic character problems.

I have changed to Home Pro which meant repairing of all devices and reinstallation of all apps.
Late yesterday I installed the client and hub once more, the broker is on a RPi as previous stated so that one I have kept running.

Just wanted to say that initial tests seem to show that everything is working as it should.
I have not tested all the channels since I’ll probably only add those I want shown on HABPanel for now. Depends if I decide to try to get Google Home working or not.

Hi @HarriedeGroot, is your HA Tree on GH working? Can i already test?

Thanks

Nope, ha branch isn’t working, it’s a first setup. Actually, going to throw it away and start over in a slightly different direction.

I think this might have been mentioned before but I’ll bring it up anyway.

Yesterday I lost power at my house and when everything came back online the connection between openHAB and Homey had dissapeared. It says something along the lines on communications error or read only channel. And I found a new thing (Homey) in the inbox of openHAB.

I’m not sure if this is related to the broker or homeys MQTT hub/client but if this happens every time power is lost (reboot?) and everything has to be reinstalled then that would be quite the hassle. Or if it has to do with how openHAB handles the connection.

Did anyone try to combine this with gBridge?
Any success?
I just found out about this and will investigate and try to make it work.

I have the same issue, see the list of generated items in OpenHab.

I started with one circle with a B in it and one circle with a H in it. And everything including habpanel was working.

Now I have an additional line with a circle H and a circle with a S in it.

B = Broker I think. The other letters I don’t know.

Very interesting…

so I tried… the problem is the HOMEY MQTT Client Protocol is not supported by gBRIDGE… Protocol must be 3.1 or 3.1.1… Ive no idea what the Homey Client is working under

Ok. That sounds a bit strange though because I have heard that people got this working with only the MQTT Client and gBridge and then using flows to make Homey act on MQTT changes.

I have not tried this myself, but doesn’t that suggest that the protocol works? I can try to translate the guide for this from the facebook-thread I read it if there’s interest. But maybe this thread is the wrong place for that.

v3.1.1

Oh… its not that then

ill try again

maybe this needs to be its own topic…???

this is the error… now I believe its to do with CA Certs

20190215-13:10:53 Broker State: RECONNECTING
20190215-13:10:53 MQTT error occured: Error: Connection refused: Unacceptable protocol version

Recommended settings =
* MQTT server: mqtt.gbridge.io
* MQTT port: 8883
* MQTT protocol: Version 3.1
* TLS: TLS V1.2 required.
Certificate is signed by Let’s Encrypt, so use the CAs of your system (for example under /etc/ssl/certs/ for Debian based systems).
Only download the CA files from here if your system does not support Let’s Encrypt CA natively.
* Username: gbridge-uXXX
* Password: (change below)

I haven’t been able to try anything out yet, only read.

But gBridge is an MQTT Broker then?
And for this to be somewhat automatic we need to be able to connect MQTT Hub to this broker?

Edit: There’s a way to use the existing Mosquitto broker as bridge to gBridge-server(broker?). I will try this at home. Should we start a new topic in the “Devices” section about connecting to Google Home through MQTT?

New topic would be better…

Mosquitto is not compatible with 2.0 homey… :confused::unamused:

Done…

Not entirely true. I’ve configured Mosquitto in a docker container on my NAS. Works like a charm.

Please continue any broker connection problems on a new thread.

1 Like

I mean the homey mosquito app is not compatible with Homey 2.0. Which is what I said…

So which bit is not entirely true… Cause I’ve missed something here

And yes… Right above your reply I demonstrated it has moved to its own thread

Sorry @KonradWalsh. You’re correct, I misread your post. Thought you couldn’t connect to a Mosquitto broker from Homey 2.0.

Just for your information:
I installed the beta MQTT Hub (your app) and beta MQTT Client (from Menno van Grinsven).
Started mosquitto app on my PC
Set DeviceID to ‘homey’

All is working fine it seems
On connecting another client to the mosquitto on my PC, I receive info from all devices.

(running Homey 2.0.2)

2 Likes

Sneak peak!

I started the implementation of the Home Assistant Discovery protocol (thanks @xAPPO) .

image

NOTE: This is work in progress, incomplete, far from finished and contains many bugs
(it’s a release candidate :wink:). For the daredevils: it’s on the ha branch.

Additional changes:

  • Introduction of a message queue to improve speed & stability
  • [BUG fix] Initial values are published on device registration
  • [BUG fix] Handling of boolean values (on set)
  • A lot more…
5 Likes