Just because i’m discovering the same problem with my self programmed DayLight AlarmClock i wanted to highlight this topic again.
Im using the wifiled binding and i control this device:
So far everything is working but at the moment i wanted to create my timed rule like this:
- Read the whole rgb-color string from the item
- Split the string to keep the color
- Increase the brightness and add it to the code again
- Send it to the device to have the same color but brighter
As i said this basically works, but i have the same effects, that the color changes by itsself without a command to values with a big amount of digits after the comma (see log)
Log:
2021-09-30 09:41:50.554 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'dLedStrpBedRoom_Col' predicted to become 21,100,10
2021-09-30 09:41:50.558 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dLedStrpBedRoom_Col' changed from 21.600000858306884765625000,100,9.803921729326248168945312500 to 21,100,10
==> /var/log/openhab/openhab.log <==
2021-09-30 09:42:20.078 [INFO ] [openhab.core.model.script.WAKETIMERS] - I_received21_100_10
2021-09-30 09:42:20.091 [INFO ] [openhab.core.model.script.WAKETIMERS] - Increased Brightness to 14
==> /var/log/openhab/events.log <==
2021-09-30 09:42:20.092 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'dLedStrpBedRoom_Col' received command 21,100,14
2021-09-30 09:42:20.095 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'dLedStrpBedRoom_Col' predicted to become 21,100,14
2021-09-30 09:42:20.100 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dLedStrpBedRoom_Col' changed from 21,100,10 to 21,100,14
2021-09-30 09:42:20.134 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'dLedStrpBedRoom_Col' received command 21,100,10
2021-09-30 09:42:20.136 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'dLedStrpBedRoom_Col' predicted to become 21,100,10
2021-09-30 09:42:20.141 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dLedStrpBedRoom_Col' changed from 21,100,14 to 21,100,10
2021-09-30 09:42:20.626 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dLedStrpBedRoom_Col' changed from 21,100,10 to 19.1999991238117218017578125000,100,9.803921729326248168945312500
==> /var/log/openhab/openhab.log <==
2021-09-30 09:43:20.100 [INFO ] [openhab.core.model.script.WAKETIMERS] - I_received19.1999991238117218017578125000_100_9.803921729326248168945312500
2021-09-30 09:43:20.113 [INFO ] [openhab.core.model.script.WAKETIMERS] - Increased Brightness to 13
==> /var/log/openhab/events.log <==
2021-09-30 09:43:20.115 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'dLedStrpBedRoom_Col' received command 19.1999991238117218017578125000,100,13
2021-09-30 09:43:20.117 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'dLedStrpBedRoom_Col' predicted to become 19.1999991238117218017578125000,100,13
2021-09-30 09:43:20.122 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dLedStrpBedRoom_Col' changed from 19.1999991238117218017578125000,100,9.803921729326248168945312500 to 19.1999991238117218017578125000,100,13
2021-09-30 09:43:20.176 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'dLedStrpBedRoom_Col' received command 19,100,10
2021-09-30 09:43:20.179 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'dLedStrpBedRoom_Col' predicted to become 19,100,10
2021-09-30 09:43:20.183 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dLedStrpBedRoom_Col' changed from 19.1999991238117218017578125000,100,13 to 19,100,10
2021-09-30 09:43:21.053 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dLedStrpBedRoom_Col' changed from 19,100,10 to 19.1999991238117218017578125000,100,9.803921729326248168945312500
I only sendCommand once after my “WAKETIMERS” info-logs are shown
Im pretty sure there is no other rule that could send a Command to the LED strip
Could it be, that the binding constantly tries to re-adjust the values, the values sometimes are not set as perfect integers by the device and this again is updated via the binding to the item?
For now i will fix it like this:
- My target color will be hard-coded for each and every timed event
- Therefore i will loose the ability to “take the current colour” if it is changed in the meantime