GledholtHall / beta-3

H E update
2 stars 3 forks source link

Message format change with /set ? #9

Closed autolog closed 2 years ago

autolog commented 2 years ago

Hi Kevin, Just installed 24/JAN/2022 - beta 3e pre24 and it seems the responses have change.

Previously I had this message sequence:

 Hubitat Bridge                  sending "turn off" to "HE Hall - Outlet [XMAS]"
   Hubitat Bridge Debug            >>> Published to 'home-2': Topic='homie/home-2/hall-outlet--xmas-/onoff/set', Payload='false'
   Hubitat Bridge Debug            Received from 'home-2': Topic='[u'homie', u'home-2', u'hall-outlet--xmas-', u'onoff', u'set']', Payload='false'
   Hubitat Bridge Debug            Received from 'home-2': Topic='[u'homie', u'home-2', u'hall-outlet--xmas-', u'onoff']', Payload='false'
   Hubitat Bridge                  received "HE Hall - Outlet [XMAS]"  "off" event
   Hubitat Bridge Debug            Received from 'home-2': Topic='[u'homie', u'home-2', u'hall-outlet--xmas-', u'onoff']', Payload='off'
   Hubitat Bridge                  received "HE Hall - Outlet [XMAS]"  "off" event

That is that a payload of false and off was also returned against the onoff topic, as well as onoff/set topic of false.

With the latest release, I am getting this:

Hubitat Bridge Debug            >>> Published to 'home-1': Topic='homie/home-1/study-socket-elgato-key-light/onoff/set', Payload='false'
   Hubitat Bridge Debug            Received from 'home-1': Topic='[u'homie', u'home-1', u'study-socket-elgato-key-light', u'onoff', u'set']', Payload='false'

There is nothing being returned against the onoff topic

The way I thought it was meant to work, is that when Indigo wants to change an onoff state, it publishes a set command to HE. This is interpreted by your MQTT App which apply the change to the HE device. When the onoff state changes in HE, yourMQTT App sends the onoff status back to Indigo and that is intercepted by my plugin which updates the Indigo device status. I was trying to avoid processing the /set topic as that might have been published from Indigo and I only want to update the states in Indigo when I receive a confirmatoty published topic from HE.

Is there a reason that this has changed because now my Indigo plugin isn't repsonding to updates from HE as far as onoff goes. Obviously, I can cahnge my plugin but don't want to do that until I get confirmation from you as how to proceed.

Thanks for your help.

GledholtHall commented 2 years ago

This is strange but some observations...

You are receiving the homie/home-2/hall-outlet--xmas-/onoff/set payload back because you are sending that I assume. It's interesting HE Hall - Outlet [XMAS] is normalised tohall-outlet--xmas- the HE having been stripped. true|false is correct for the homie spec and on or off shouldn't have appeared.

It appears that using homie/home-2/study-socket-elgato-key-light/onoff/set then Hubitat is not recognising that device so is not responding with the corresponding event assuming of course it is currently ON. Is this the same problem as mentioned in issue #10 you raised where this error is being logged ? pp:1322022-01-24 17:45:15.951 errorMQTT: No matched device for Study Socket Elgato Key Light If so that will be the cause.

GledholtHall commented 2 years ago

fixed pre24b