Smarthome: Hue Binding: No status update for things with Id 0000/0010

Created on 7 Jan 2017  Â·  22Comments  Â·  Source: eclipse-archived/smarthome

Have an issue here when items are being switched on/off via external app or switch (eg. Hue App):

  • items with thing Id 210 are being updated in openhab
  • items with thing Id 0000 or 0010 (Switches) are not being updated in openhab (no log entries)

There is no log entry either for items where status is not being updated. With my configuration I can control all items via openhab2. When controlled with openhab2, status changes accordingly. Issue is effective with external controls only.
My system is OH2b5 Online version.

Binding-Hue bug help wanted

Most helpful comment

Hi, any news on this - something I can test?

All 22 comments

Indeed, the HueLightHandler does not yet support CHANNEL_SWITCH for updates received from the hue bridge. This needs to be added.

Hi, any news on this - something I can test?

Same issue here using Osram Lightify Plug (0x0010)

Same to me!

Yepp, as @kaikreuzer already pointed out: This needs to be implemented by somebody.
Thanks @tkajen for providing the detailed explanation in #3768 of how the responses will look like!

Anybody willing to give it a go? Looks like finding beta-testers won't be an issue 😄

So another month over - any changes? I can't do it myself so I would be really thankful if someone would fix this!

I am also not a programmer but there is some need to do something and get this fixed.
Therefore: Assuming this approach does not conflict with any policies or guidelines of open source, openhab or this forum, I offer to pay €100,- to the programmer who provides a successful fix of this issue by end of August 2017.

... amendment: offer is valid for the first programmer to provide a fix only ...

Perhaps I've gone blind on reading code, but it looks to me as if CHANNEL_SWITCH is already implemented:

case CHANNEL_SWITCH: if (command instanceof OnOffType) { lightState = LightStateConverter.toOnOffLightState((OnOffType) command); if (isOsramPar16) { lightState = addOsramSpecificCommands(lightState, (OnOffType) command); } } break;

Or am I looking in the wrong method?

I added a bit of logging to the method above, but I have no way to test it. Here's a test jar, if anyone's feeling adventurous.

The following log message should be visible if this jar is installed:
(INFO) Hue Light Discovery Service activated using special build 20170804T1137.

The following log message should be visible if the method cited above is hit:
(DEBUG) CHANNEL_SWITCH handling command [command]

The following log message should be visible if the command received in the method above is an ON/OFF command:
(DEBUG) CHANNEL_SWITCH received ONOFF command. New lightState = [newLlightState]

@9037568: Thanks for giving it a try. Never the less, the issue still remains.

I tested and have the following in my log when initializing the system and switching via openHAB:
2017-08-06 13:26:03.697 [INFO ] [l.discovery.HueLightDiscoveryService] - Hue Light Discovery Service activated using special build 20170804T1137. 2017-08-06 13:28:07.611 [DEBUG] [.binding.hue.handler.HueLightHandler] - CHANNEL_SWITCH handling command OFF 2017-08-06 13:28:07.612 [DEBUG] [.binding.hue.handler.HueLightHandler] - CHANNEL_SWITCH received ONOFF command. New lightState = org.eclipse.smarthome.binding.hue.internal.StateUpdate@1384176 2017-08-06 13:28:12.743 [DEBUG] [.binding.hue.handler.HueLightHandler] - CHANNEL_SWITCH handling command ON 2017-08-06 13:28:12.744 [DEBUG] [.binding.hue.handler.HueLightHandler] - CHANNEL_SWITCH received ONOFF command. New lightState = org.eclipse.smarthome.binding.hue.internal.StateUpdate@1202e8e 2017-08-06 13:28:16.386 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Status update for Hue light 30 detected.

When switching the same ONOFF device via hue App, there is just the following in the log:
2017-08-06 13:28:36.617 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Status update for Hue light 30 detected.

I updated the jar with some additional debug output and a state change for the switch channel. This exhausts my idea pool for now...

That looks actually better 8-).
After having switched the same device via hue App, it says "Bf_Stehlampe_sw changed from OFF to ON".

Here is the log for one switch change made with the hue App ... it's quite a lot ...
16:15:56.841 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Status update for Hue light 30 detected. 16:15:56.843 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.843 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.843 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.844 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.845 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.846 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.847 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.849 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.850 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.877 [INFO ] [marthome.event.ItemStateChangedEvent] - Bf_Stehlampe_sw changed from OFF to ON 16:15:56.878 [INFO ] [ome.event.GroupItemStateChangedEvent] - gLights changed from OFF to ON through Bf_Stehlampe_sw 16:15:56.883 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.883 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.884 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.884 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.884 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.885 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.888 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.889 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.890 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.890 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.891 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.891 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.892 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.893 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.894 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.895 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.895 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.896 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.898 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.899 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.899 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.900 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.901 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.902 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.904 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.904 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.906 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.907 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.907 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.908 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.909 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.910 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.911 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.911 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.912 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.913 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.914 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.915 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.915 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.916 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.917 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.918 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.918 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.919 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.919 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.920 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.921 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.921 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.922 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.922 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.923 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.923 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.924 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.925 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.925 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.926 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.926 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.927 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.927 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.929 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.929 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.930 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.930 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.931 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.931 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.932 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.932 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.933 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.935 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.935 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.936 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.936 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.937 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.937 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.938 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.938 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.939 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.939 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.940 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.941 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.941 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored. 16:15:56.942 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 30 16:15:56.942 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 16:15:56.943 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (30). Will be ignored.

Ok, I think we definitely made huge progress today:
thanks to @9037568 also an ONOFF device activity is being recognized as such. Therefore I suggest the following:

  • another tester to confirm the fix
  • @9037568: possible to create another jar without the debug messages if confirmed by another tester?
  • @9037568: any idea of how I can transfer the well earned €100,-? -> e.g. would need your eMail for PayPal.

Thanks
codefalk

Tested it. Its working. Here is the log showing a switch off:
2017-08-06 22:48:28.089 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Status update for Hue light 4 detected. 2017-08-06 22:48:28.095 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 4 2017-08-06 22:48:28.097 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 4 2017-08-06 22:48:28.098 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 2017-08-06 22:48:28.100 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (4). Will be ignored. 2017-08-06 22:48:28.101 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 4 2017-08-06 22:48:28.102 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 2017-08-06 22:48:28.103 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (4). Will be ignored. 2017-08-06 22:48:28.105 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 4 2017-08-06 22:48:28.106 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 2017-08-06 22:48:28.107 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (4). Will be ignored. 2017-08-06 22:48:28.109 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 4 2017-08-06 22:48:28.110 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called 2017-08-06 22:48:28.111 [WARN ] [.binding.hue.handler.HueLightHandler] - Received state change for another handler's light (4). Will be ignored. 2017-08-06 22:48:28.112 [DEBUG] [binding.hue.handler.HueBridgeHandler] - Sending lightStateChanged for light 4 2017-08-06 22:48:28.114 [DEBUG] [.binding.hue.handler.HueLightHandler] - onLightStateChanged() was called
Could you make a pull request on github?

@codefalk try using four grace accents "````" (before and after) to post your log, it makes it a lot easier to read ;)

Therefore: Assuming this approach does not conflict with any policies or guidelines of open source, openhab or this forum, I offer to pay €100,- to the programmer who provides a successful fix of this issue by end of August 2017.

@codefalk So far, people are indeed uncertain whether it is ok to offer money for fixes&features. As I see the clear need from users, I don't think that it should be considered unethical - to make it a bit more of a community process, my suggestion is to use BountySource in such cases; I have just posted some infos about it.

@codefalk so glad to hear it's working.

I'll prune back some of the debug messages I added before I create a PR, but you can just turn them off locally meanwhile.

My email should now be visible on my profile.

@kaikreuzer: Thanks for clarifying and the introduction of the quite interesting prioritization and funding concept. Happy to make use of it next time.
@Protestallianz: thanks for the hint. Will definitely use it.
@9037568: thanks again for the fix and the PR! I just sent the money.
@All: hope it is okay to have the issue closed.

@codefalk You should wait until the fix/PR is accepted and merged :-)

@codefalk : Thanks very much. Hopefully we can get this merged soon.

Hi, I have the same problem. I installed the official hue binding from the repository. Can you tell me how to update? Thanks.

The fix is part of OH 2.2. Which version do you have?

I had the 2.1.0. I updated to 2.2.0 and everything is ok now. Thanks.

Was this page helpful?
0 / 5 - 0 ratings