The Hue bridge is rate limited to 20 requests per second, and the binding respects that limit.
Personally I am not working on that. But volunteers are welcome.
The Hue bridge is rate limited to 20 requests per second, and the binding respects that limit.
Personally I am not working on that. But volunteers are welcome.
Great, I have something to work with now I know that
No worries, I’ll see if I can find some time somewhere
Hi All
In order to work around the API V2 limitation of having to use Scenes to apply Color Temp or Color to a group (Room) of lights I have tried the following:
Create A Group with all the required Color or Color Temp items that I want to change.
For Color Temp I have the Base Type set to Dimmer and Aggregation Function set to None.
For Color I have the Base Type set to Color and Aggregation Function set to None.
When sending the required Color Temp to the group everything works, as does sending a required scene as well as turning the lamps off and on etc.
However if I have the Color items in the Color Group, the entire group seems to take on the satte of the group and it is no longer to changes the lamps using Scenes or Color Temp and Power ff and on etc.
Any ideas as to why this would differently with Color as opposed to Color temp?
Thanks
Mark
Hi, I am running openHABian 4.0.4 on a RPI 4…
For quite a while I have the Hue API v2 binding running; now I noticed something strange.
Ib the Hue Bridge, I recently added some new scenes to an existing room. So far, so unspectacular, my expectation was that the new scenes could be commanded in the existing “Scene” Item by their string name as with the other, older scenes there.
Well, if I do so (in a text based rule) I get an error that this command is not supported (while the older ones still work).
So I checked in the rules GUI which scene names are suggested when creating a new rule - and these were exactly the scenes from when the corresponding Thing was first created, but no update ever since…
Is there a more elegant and less time-consuming way to update this, apart from deleting and recreating the Thing and all linked Items?
I really wonder that I found absolutely nothing about that in the forum… Adding new scenes should not be such a rare case…?
Thanks in advance!
Currently the scenes are imported into OH when the respective thing is created.
If you have a text based .things file the easiest way to recreate the thing is to temporarily delete the things file, and the restore it again.
Thanks for the quick reply!
Unfortunately no - all my Hue Things are created in the GUI…
Is it possible to trick it into a refresh? Like stop openhab, do something nasty in the jsondb, start again?
You probably could do that, but it would be very nasty, so I cant advise it. If you are on openhabian there is a backup and restore command. So a backup / delete json / restore might work. But it might not…
Okay, better not mess around too much. So I tried it like this:
This was successful in the sense that all the channel links and items are back functional.
But still: only the old scenes.
Which Thing do I have to actually recreate that the scenes are being read again?
You may need to delete the room, restart OH and then recreate the room.
And yes, OH is sufficiently clever to remember items linked to deleted and restored things.
Hi again,
first of all: delete Thing - reboot - let Thing be detected - recreate worked so far.
Just to be sure: create an issue which says more or less “There is no elegant way to update the scenes in a Hue room, please include a feature which will however cater for this in some future release”?
Yup.
Today I had a deeper look at the Java code, and I also tested it on my own system. It seems that my advice to delete and recreate the thing was wrong (or actually overkill).
The scenes list will be automatically refreshed on any of the following events: a) dis-/re- enable the thing, or b) dis-/re- enable the bridge, or c) stop/re-start OH, or d) delete/re-create the thing (overkill).
@Hundertvolt1 can you kindly confirm that the above is indeed true for your case? (In which case we can probably close the Issue on GitHub).
Hi, I just checked the different methods.
The result was somewhat unexpected…
So the functionality seems somewhat there but quite brittle. Let me know if I can do some more tests!
By the way, I used Chrome and re-loaded the page regularly, so it should not be a caching issue…
UPDATE: Some 5 minutes later after the service restart, scenes are back and in sync again!
Is there something like a rate limit how often to query the scenes in place? I did the tests quite quickly, the first try worked, and then the second time it worked was some 10 minutes later - all in between failed, even the known-working ones.
A rate limit would explain this very well…
Hi @AndrewFG and Maintainers
I am wondering and just curious if the Binding supports the “Hue Play HDMI Sync Box” as well?
I was searching for it in the things inbox - but it’s not there
Can the sync-box be controlled as well?
Best, Kai
I did not write any code for such devices, so the short answer is “no”.
The longer answer is that, the Hue API v2 does have some ‘entertainment’ API endpoints, as you can see from the link below. BUT from looking at those APIs, it is actually very hard to imagine a use case where OH would interact with them.
I don’t own such a box, so a) I may be the wrong person to imagine potential use cases, and b) unable to test any resulting code. So perhaps @April_Wexler you can have a look at the APIs and let me know what kind of use cases you imagine to have based on them?
Thanks for your fast answer, Andrew.
The use cases are quite simple, e.g.:
I found in another thread a solution to add the HUE sync box:
https://community.openhab.org/t/philips-hdmi-sync-api/111679/9
After installing and enabling that jar the sync box appeared in OH.
Of course it would be nicer to have all in one binding
Some API infos are already in the code, but it seems to be APIv1:
https://github.com/Homey-GER/openhab-addons
In fact there is a totally different API for that device.
Hello @AndrewFG,
I have run into some problems I was hoping I could get some help on, please.
I use OpenHAB 4.0.4 with the Hue binding version shipped with OH 4.0.4 and Hue API v2. All configuration is done textually. I previously used API v1 and just switched over. Here is an excerpt of my config files:
Bridge hue:bridge-api2:dg [ipAddress="...", applicationKey="..."] {
Thing room DG_NZ_Room "DG Nordzimmer" [resourceId="0eae1497-868a-4e00-8793-2defc2a547d2"]
Thing device DG_NZ_Light_Desk [resourceId="ac66600f-7e85-4e27-9c31-e7345e880dd9"]
}
String DG_NZ_Lights_Scene "Lichtkonzept [%s]" <gluehbirne> (S_DG_Nordzimmer, F_Innenlichter) {channel="hue:room:dg:DG_NZ_Room:scene"}
String DG_NZ_Lights_LightBulb_Desk_Alert "Schreibtisch Alarm" <gluehbirne> (S_DG_Nordzimmer, F_Innenlichter) {channel="hue:device:dg:DG_NZ_Light_Desk:alert"}
Selection item=DG_NZ_Lights_Scene mappings=["DG NZ Off"="Aus", "DG NZ Nightlight"="Nachtlicht", "DG NZ White Max"="Weiss", "DG NZ Gaming White"="Gaming Weiss", "DG NZ Gaming Red"="Gaming Rot"]
The problems I ran into are:
Could you please help me by telling me what I am missing / doing wrong in these cases?
Thank you very much for your time and effort!
Best regards,
Gregory