Philips Hue CLIP 2 API v2 Discussion Thread

@seime I have uploaded yet another new version. It has the following changes..

  • Prevented (hopefully, please check) overlapping of legacy thing information when multiple bridges are present.
  • Added support to ‘Alert’ channels.
  • Added support for ‘Effect’ channels.
  • Improved synchronization when adding many things at the same time.
  • Updated documentation concerning migration and added channels.

Note that the ‘Alert’ and ‘Effect’ channels are not one-to-one compatible with the legacy version of those channels. They now work in a very similar way to scenes.

The new Jars are in the USUAL PLACE

EDIT: by the way, I noted your comment about the scene channel state not being initialised on startup; this will be fixed in the next version.

Thanks @AndrewFG,

Yes, I keep my things and items primarily in thing/item files as this (to me) is the only viable way to manage a larger system.

Works correctly now! Thanks.

BREATHE works similar to the LSELECT v1 command (multiple flashes). Is there a single flash command available as well (see earlier post on how to trigger the single flash)

Tried candle and it worked for a single bulb, but not available for rooms/zones (have no idea if it should or not)

All Scene items now

  • Show NULL as initial state (as you wrote in your updated comment)
  • Has the correct possible scene values listed in MainUI

Random scene items still reports unknown command when I try to send a command, ie [OH-safeCall-6] [e.internal.handler.Clip2ThingHandler] - handleCommand() unsupported channelUID:hue:room:nede:kontor:scene, command:Kveld

I corrected a channel link typo for another room scene. Opposed to the initially correct linked item scenes this one did not get scene options added and just shows NULL as the rest.

Thanks

@AndrewFG Did you miss this one? (I know I have sent many detailed messages :innocent: )

In the API documentation, BREATHE is the only command currently listed. But from the way it is described it implies that others might be added in future.

Yes that seems to be the case. It is the same as in the App.

Are the failing commands ones with accented characters?

Maybe you have to delete and recreate that thing?

Which one? (So apparently, yes I did miss it).

On two of mine i had to recreate and remove stale links to get the scene to work

Do you mean items linked to the scene channels? And if so, do you recall if the items were NOT string type items?

Since I am using file configuration I believe all things/items in the files are re-created upon startup. One of the nice aspects of using files.

No, that does not seem to be the problem.

I did some half-baked patches to the code - adding a lock to synchronize access to the aforementioned collections and also removed the temporaryAssociatedScenesList.clear() in updateLookups. That made scenes work, but I consider it a hack as the root cause is still there (multiple clearing/adding to the same collections from multiple threads)

This one: Philips Hue CLIP 2 API v2 Discussion Thread - #95 by seime

I don’t see this. But you have a much larger system. So can you please provide more details? e.g. logs..

PS I don’t recognise the logs you posted before; so I guess you changed the code. ??

Yes. That is correct.
They looked badicslly correct as i recall. There were stalevlinks and simply deleting theses did not fix.
Asdumed it was from my messing ariundcwith changes so just deleted items and relinked

In the log you sent, it looks like Bad Vegg 3 has been instantiated as a thing; and when you instantiate a thing, it gets removed from the Inbox :slight_smile:

So I created a PR to improve logging; Prefix clip2 logging with thing uid by seime · Pull Request #2 · andrewfg/openhab-addons · GitHub

Log from startup is in your email inbox.

Search for hue:room:nede:kontor

There you will see that updateLookups is called twice here.

  • The first time updateLookups will use the temporaryAssociatedScenesList populated in updateScenes, but wipes temporaryAssociatedScenesList on line 674.
  • The second time temporaryAssociatedScenesList is empty, so it since it also clears sceneCommandResourceIds on line 653, sceneCommandResourceIds will remain empty. Hence scene not found when sending a command to the channel.
pi@pi4b:/var/log/openhab $ grep "hue:room:nede:kontor" /tmp/hue.log
2023-04-19 20:21:14.823 [DEBUG] [OH-safeCall-4] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor initialize() called
2023-04-19 20:21:14.827 [DEBUG] [OH-thingManager-4] [.internal.handler.Clip2BridgeHandler] - childHandlerInitialized() hue:room:nede:kontor
2023-04-19 20:21:34.463 [DEBUG] [OH-thingHandler-4] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateScenes() found 6 associated scenes
2023-04-19 20:21:34.748 [DEBUG] [OH-thingHandler-4] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateProperties() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:34.749 [DEBUG] [OH-thingHandler-4] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:34.834 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:35.576 [DEBUG] [OH-thingHandler-18] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:35.951 [DEBUG] [OH-thingHandler-5] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:37.232 [DEBUG] [OH-thingHandler-4] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:37.795 [DEBUG] [OH-thingHandler-3] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:38.076 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:38.496 [DEBUG] [OH-thingHandler-10] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:39.416 [DEBUG] [OH-thingHandler-12] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:39.723 [DEBUG] [OH-thingHandler-14] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:40.303 [DEBUG] [OH-thingHandler-18] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:40.613 [DEBUG] [OH-thingHandler-20] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:41.197 [DEBUG] [OH-thingHandler-16] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:41.403 [DEBUG] [OH-thingHandler-1] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:41.980 [DEBUG] [OH-thingHandler-7] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:42.007 [DEBUG] [OH-thingHandler-11] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:42.434 [DEBUG] [OH-thingHandler-19] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:42.524 [DEBUG] [OH-thingHandler-13] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:42.716 [DEBUG] [OH-thingHandler-2] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:43.134 [DEBUG] [OH-thingHandler-6] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:43.342 [DEBUG] [OH-thingHandler-17] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:43.520 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:45.527 [DEBUG] [OH-thingHandler-5] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:45.735 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:46.433 [DEBUG] [OH-thingHandler-3] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:47.329 [DEBUG] [OH-thingHandler-4] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:47.746 [DEBUG] [OH-thingHandler-14] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:47.987 [DEBUG] [OH-thingHandler-12] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:49.447 [DEBUG] [OH-thingHandler-1] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:49.648 [DEBUG] [OH-thingHandler-16] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:50.247 [DEBUG] [OH-thingHandler-20] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:50.550 [DEBUG] [OH-thingHandler-18] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:50.992 [DEBUG] [OH-thingHandler-17] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:51.081 [DEBUG] [OH-thingHandler-6] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:51.451 [DEBUG] [OH-thingHandler-2] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:51.655 [DEBUG] [OH-thingHandler-13] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:51.755 [DEBUG] [OH-thingHandler-19] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:51.857 [DEBUG] [OH-thingHandler-11] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:52.359 [DEBUG] [OH-thingHandler-7] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:52.560 [DEBUG] [OH-thingHandler-10] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:54.272 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:54.880 [DEBUG] [OH-thingHandler-3] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:55.605 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:56.897 [DEBUG] [OH-thingHandler-12] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:57.397 [DEBUG] [OH-thingHandler-14] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:58.395 [DEBUG] [OH-thingHandler-20] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:58.822 [DEBUG] [OH-thingHandler-16] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:59.002 [DEBUG] [OH-thingHandler-1] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:59.581 [DEBUG] [OH-thingHandler-5] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:59.848 [DEBUG] [OH-thingHandler-19] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:59.865 [DEBUG] [OH-thingHandler-11] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:21:59.940 [DEBUG] [OH-thingHandler-13] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:22:00.233 [DEBUG] [OH-thingHandler-2] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:22:00.348 [DEBUG] [OH-thingHandler-6] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:22:00.530 [DEBUG] [OH-thingHandler-17] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:22:00.995 [DEBUG] [OH-thingHandler-18] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:22:02.154 [DEBUG] [OH-thingHandler-10] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:22:02.751 [DEBUG] [OH-thingHandler-4] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:22:18.535 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateDependencies() called
2023-04-19 20:22:18.538 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateLookups() called
2023-04-19 20:22:18.540 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateContributors() called for 7 contributors
2023-04-19 20:22:18.542 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateResource() id:8f9e785d-7040-4ae5-959d-2086a77973ae, type:scene
2023-04-19 20:22:18.855 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateChannels() id:8f9e785d-7040-4ae5-959d-2086a77973ae, type:scene
2023-04-19 20:22:18.856 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:scene, state:NULL, fullUpdate:true
2023-04-19 20:22:18.860 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:8f9e785d-7040-4ae5-959d-2086a77973ae, type:scene >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:22:18.861 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateResource() id:a8086201-f651-4b08-91a9-289eb9d3829a, type:scene
2023-04-19 20:22:19.256 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateChannels() id:a8086201-f651-4b08-91a9-289eb9d3829a, type:scene
2023-04-19 20:22:19.257 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:scene, state:NULL, fullUpdate:true
2023-04-19 20:22:19.258 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:a8086201-f651-4b08-91a9-289eb9d3829a, type:scene >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:22:19.259 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateResource() id:b7e86617-19c7-4f9f-a66a-c1cff859c6df, type:scene
2023-04-19 20:22:19.633 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateDependencies() called
2023-04-19 20:22:19.637 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateLookups() called
2023-04-19 20:22:19.642 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateContributors() called for 1 contributors
2023-04-19 20:22:19.643 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateResource() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light
2023-04-19 20:22:20.263 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateResource() id:7de5f54e-6217-4228-9cb5-2b7e19695c55, type:scene
2023-04-19 20:22:21.064 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateResource() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light
2023-04-19 20:22:22.176 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateChannels() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light
2023-04-19 20:22:22.178 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateAlerts() found 1 associated alerts
2023-04-19 20:22:22.180 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:brightness, state:39.37, fullUpdate:true
2023-04-19 20:22:22.185 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:switch, state:ON, fullUpdate:true
2023-04-19 20:22:22.186 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:alert, state:NO_ACTION, fullUpdate:true
2023-04-19 20:22:22.193 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:22:22.194 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateChannelList() supportedChannelIds.size():4
2023-04-19 20:22:23.285 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateChannels() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light
2023-04-19 20:22:23.286 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateAlerts() found 1 associated alerts
2023-04-19 20:22:23.287 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:brightness, state:39.37, fullUpdate:true
2023-04-19 20:22:23.289 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:switch, state:ON, fullUpdate:true
2023-04-19 20:22:23.290 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:alert, state:NO_ACTION, fullUpdate:true
2023-04-19 20:22:23.292 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:22:23.292 [DEBUG] [OH-thingHandler-8] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateChannelList() supportedChannelIds.size():4
2023-04-19 20:22:53.854 [DEBUG] [OH-thingHandler-11] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateChannels() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light
2023-04-19 20:22:53.856 [DEBUG] [OH-thingHandler-11] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:brightness, state:0.0, fullUpdate:false
2023-04-19 20:22:53.863 [DEBUG] [OH-thingHandler-11] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:switch, state:NULL, fullUpdate:false
2023-04-19 20:22:53.865 [DEBUG] [OH-thingHandler-11] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:alert, state:NO_ACTION, fullUpdate:false
2023-04-19 20:22:53.872 [DEBUG] [OH-thingHandler-11] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:23:08.241 [DEBUG] [OH-thingHandler-5] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateChannels() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light
2023-04-19 20:23:08.242 [DEBUG] [OH-thingHandler-5] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:brightness, state:0.04, fullUpdate:false
2023-04-19 20:23:08.243 [DEBUG] [OH-thingHandler-5] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:switch, state:NULL, fullUpdate:false
2023-04-19 20:23:08.244 [DEBUG] [OH-thingHandler-5] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:alert, state:NO_ACTION, fullUpdate:false
2023-04-19 20:23:08.245 [DEBUG] [OH-thingHandler-5] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:23:11.787 [DEBUG] [OH-thingHandler-14] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateChannels() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light
2023-04-19 20:23:11.788 [DEBUG] [OH-thingHandler-14] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:brightness, state:0.09, fullUpdate:false
2023-04-19 20:23:11.792 [DEBUG] [OH-thingHandler-14] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:switch, state:NULL, fullUpdate:false
2023-04-19 20:23:11.794 [DEBUG] [OH-thingHandler-14] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:alert, state:NO_ACTION, fullUpdate:false
2023-04-19 20:23:11.806 [DEBUG] [OH-thingHandler-14] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:23:15.211 [DEBUG] [OH-thingHandler-3] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateChannels() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light
2023-04-19 20:23:15.216 [DEBUG] [OH-thingHandler-3] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:brightness, state:0.13, fullUpdate:false
2023-04-19 20:23:15.220 [DEBUG] [OH-thingHandler-3] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:switch, state:NULL, fullUpdate:false
2023-04-19 20:23:15.221 [DEBUG] [OH-thingHandler-3] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:alert, state:NO_ACTION, fullUpdate:false
2023-04-19 20:23:15.225 [DEBUG] [OH-thingHandler-3] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:23:16.393 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateChannels() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light
2023-04-19 20:23:16.397 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:brightness, state:0.13, fullUpdate:false
2023-04-19 20:23:16.399 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:switch, state:OFF, fullUpdate:false
2023-04-19 20:23:16.400 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:alert, state:NO_ACTION, fullUpdate:false
2023-04-19 20:23:16.423 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:23:16.431 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateChannels() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light
2023-04-19 20:23:16.432 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:brightness, state:0.0, fullUpdate:false
2023-04-19 20:23:16.433 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:switch, state:NULL, fullUpdate:false
2023-04-19 20:23:16.439 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor updateState() channelID:alert, state:NO_ACTION, fullUpdate:false
2023-04-19 20:23:16.444 [DEBUG] [OH-thingHandler-9] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor onResource() id:83b68054-f08d-4f27-85b7-76390cae3481, type:grouped_light >> id:820f6047-c016-4b94-8c5f-5f1c2e330d45, type:room
2023-04-19 20:23:24.265 [WARN ] [OH-safeCall-7] [e.internal.handler.Clip2ThingHandler] - hue:room:nede:kontor handleCommand() unsupported channelUID:hue:room:nede:kontor:scene, command:Bright

I must have had an error in the old things file with respect to the lightId parameter. Sorry :innocent:

Yes I see that. I am working on some changes so that it can only be called once.

EDIT: the new Jar is in the usual place HERE – it includes the following fixes..

  • Improved thread synchronization.
  • Scene channel state initialized on start up.

EDIT 2: @seime I think I have implemented all your open requests, except for ‘automations’.. The reason for the latter is a) I don’t really get your use case, and b) the API v2 does not have ‘automations’ any more; they seem to have been replaced by resources of type behavior_instance see API V2 .. perhaps you can investigate that page and let me know your thoughts?

EDIT 3: a minor issue, but I have noticed that, on one of my lights, when I set and then unset the ‘candle’ effect, it stops updating the color temperature state in the binding. It’s hard to figure out, but I think it may be a bug on Philips side..

Thanks @AndrewFG, I tried the new version but I still experience problems. Did a restart of openhab and emailed you the logs.

Findings:

  1. None of my Scene items gets populated with the current scene on startup
  2. I tried each scene item on each bridge. 2 worked, the third didn’t
  3. Regarding hue automations/rules/behaviour; this was just a possible workaround to the loss of the existing fadingLightAction. From the docs the attribute dynamics/duration on Login - Philips Hue Developer Program and Login - Philips Hue Developer Program could be the field that needs to be populated to achieve this?

The log you sent me seems not to be from the latest version. The Jar file should have the ‎2023-‎04-‎20 ‏‎16:20 timestamp.

You are right. wget fooled me by appending .1 to the jar zip file.

Restarted openhab with latest version (please verify)

openhab> bundle:list|grep hue
356 │ Active │  80 │ 3.4.3.202304201519     │ openHAB Add-ons :: Bundles :: hue Binding

Now my scene channels seem to be missing altogether.

Correct.

Please check the log for ‘updateChannelList()’ entries and any warnings for that.

EDIT: I am guessing you would see entries like the following; in which case temporarily remove and restore the thing in your respective ‘.things’ file..

"{} -> updateChannelList() required channel '{}' missing => please recreate thing!",

I fixed that too. The new Jar is (again) in the same place.

Maybe. I can see at least four areas where one might apply some form of dynamics to a light transition..

  1. As you say, the dynamics.duration field for light resp. grouped_light
  2. Analogously the dynamics.duration field for scene (probably)
  3. The timed_effects.duration field for light (not sure about this though)
  4. The afore-mentioned behaviour_instance with its timing parameters

Now all of the above pose a problem for us in OH – namely..

Currently when OH issues (static) commands to things, it passes a single command parameter that defines the target value e.g. PercentType(23),
HsbType(11,22,33), StringType('SCENE_NAME'), OnOffType.ON etc.

HOWEVER to issue a timed command to a thing, OH would need to pass a ‘complex’ command with two parameters with the target value PLUS the delay time e.g. ComplexCommand(PercentType(23), DecimalType(45))

UNFORTUNATELY such an animal as ComplexCommand() does not exist in OH! Nor is there any conceivable way of representing such a complex command in a standard UI control element.

I have experience of a similar challenge in the Tado (thermostat) binding. Where OH issues complex commands like “set temperature 25 celsius for 1 hour”. It does this by implementing two channels “set temperature” resp. “until time”. And the binding implements a processing delay so that if a “set temperature” and an “until time” are both received from OH within say 2 seconds, they will be combined into a single command to the Tado hub.

The above solution works fine for heating: Who cares if a “set temperature” command would not be executed until 2 seconds later, just in case an “until time” command might also be received? However for Hue it may be more disturbing if an (immediate) “dimming” command would be delayed by 2 seconds, just in case a “duration” command might also be received.

@seime (and anyone else) => what do you think?

PS nota bene: the process delay issue with Hue could be ameliorated if the “duration” command could only be sent before the “dimming” command e.g. in pseudo logic as follows..

if ("duration" command received) -> delay 2 seconds -> if ("dimming" command received) => execute ("dimming" @ "duration")
 vs.
if (("dimming" command received) && !("duration" command received in last 2 seconds)) -> execute ("dimming" @ immediately)

EDIT: let me make a test version with the above-mentioned “two-channel-duration-before-action” model so we can play around with it..

EDIT 2: I made the test version with two-channel-duration-before-action setting the command dynamics. It works perfectly! :slight_smile: Jars in the usual place.

From rules you can use Rule Actions (existing hue action) to achieve this. From a UI perspective you can now access these thing actions from the API starting from 4.0 M1.

IMHO your suggested workaround could easily become flaky on a slow or overloaded system. I found this question while researching; to me it is unclear whether openhab guarantees events to be ordered in the same way as they are sent - or if dimming could be delivered before duration even if duration was sent first. Maybe @J-N-K could comment?

Also, for lights i personally find 2 seconds delay unacceptable because I expect immediate visual feedback when pushing a button to turn lights on. In fact, the reason I am testing your updated binding is to get rid of the state update delay when increasing/decreasing brightness with 10% from a push button on the wall :slight_smile:

1 Like