-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with controlling multiple groups #123
Comments
I do not know of any such problem - but I also only have two lightbulbs and one group. Do you have the same issues when you are sending your commands with a Regarding multiple groups: In a project of mine, I introduce a concept of virtual groups. They are basically just a collection of lights which are controlled in sequence. Maybe that can help you: |
Thank you for your answer! I will try if your code makes any difference. I've tried both with and without transition. I've already made a function that iterates each lightbulb instead of operating on the group. It worked pretty good on the node-tradfri-argon lib, but could not get it to work on this lib. It's like the command queue is getting flooded somehow, like one command is not finished before the next one is executed. Maybe the termination of the coap command is not sent or something? I saw that you had a keepAlive: boolean in the node-coap-client, can this be the answer maybe? And if so, is it possible to use in the node-tradfri-client? You should be able to recreate the problem if you try to send commands to your bulbs in a loop, for instance, increase the dimmer in steps of 10%, I provide a function tested on a group of 3 bulbs. Only works as expected if delay is around 2000ms. Seems like the dimmer value on the group or bulb is not updated. Maybe I am missing something? Please try it out 👍
|
I'll try it out but I won't be able to before tomorrow. coap-client/dtls-client have command throttling built in, so the problem is probably somewhere in the wireless communication. You could try waiting for the gateway to send updated values for the bulbs before sending the next command. Unfortunately there are no such events for groups. |
Thank you for your amazing work! I'm building a home controller using a stream deck and I'm trying to use your lib for controlling my ikea trådfri lights. I have some issues though..
When I operate a group, I need to wait at least 2 seconds before I send new data. eg. if I am sending
await tradfri.operateGroup(group, state, true));
to one single group, the lights will get unresponsive if I send a new command within two seconds. It's like the router is ignoring the commands sent. If I wait for a while, the new state will be set.
This becomes a problem especially when trying to set the lights on several groups (I have like 6 groups downstairs), the only way I get it to work somewhat is to sleep for 2000 ms between each operateGroup.
I've tried like all combinations of parameters and I have looked in the debug output, but I cannot find anything :(
Do you have a clue what this is? Am I doing something wrong or is this a known bug? I have the latest firmware on the router and on the lights.
Is there anything I could listen for to know that the router has completed the command queue? Or is there a way to pass several groups to the operateGroup method?
Again, thanks for your work!
/rww
The text was updated successfully, but these errors were encountered: