MagicHome LED strip changing color it self without any command

But @hAte does not have a MagicHome device with a compatible ESP in it, as I pointed out in the post before yours.

@hAte has a board named ZJ-WFMN-E
The video has a board named ZJ-WFMN-A

I updated the rules.I replaced sendCommand with postUpdate. But after this fix the ploblem is still here. I cannot show logs, because I deleted the contents of the file events.log and now I can’t open it. Error “invalid encoding”.
I was able to restore the log file :


Any ideas what else I should try?

It’d be really wise to fix that before you do anything else. Perhaps it will recover with a reboot.

Everything now suggests your LED is doing its random stuff on its own.

Any ideas how can i solved it?

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:

  1. Read the whole rgb-color string from the item
  2. Split the string to keep the color
  3. Increase the brightness and add it to the code again
  4. 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:

  1. My target color will be hard-coded for each and every timed event
  2. Therefore i will loose the ability to “take the current colour” if it is changed in the meantime

You might also suspect UI widgets of doing just that, it has been known before.
I think widget bugs causing this have been fixed, but obviously your OH version is relevant here.
If you close all UI, does it go away?

1 Like

If this can not be avoided its OK for me.

As you said i tried to test it:

  1. Activate my WakeUpTimer
  2. Close all Browsers/Apps/Instances where OH UI3 was opened
  3. Waited and live-checked the frontail log

The result is below and you see, that the values still change, without a specific trigger from a certain rule or something
INFO: I did NOT flash my device with Tasmota!

Hopefully this is helping other guys, for me everything is acceptable

2021-09-30 15:40:00.118 [INFO ] [openhab.core.model.script.WAKETIMERS] - WakeTimer Bedroom ON
==> /var/log/openhab/events.log <==
2021-09-30 15:40:00.122 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'dLedStrpBedRoom_Col' received command 20,84,2
2021-09-30 15:40:00.126 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'dLedStrpBedRoom_Col' predicted to become 20,84,2
2021-09-30 15:40:00.133 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dLedStrpBedRoom_Col' changed from 18.0000002682209014892578125000,83.333331346511840820312500,4.7058824449777603149414062500 to 20,84,2
2021-09-30 15:40:14.648 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dLedStrpLvngRoom_Col' changed from 12.8089897334575653076171875000,100,0 to 12.8089897334575653076171875000,100,34.9019616842269897460937500
2021-09-30 15:40:17.266 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dLedStrpBedRoom_Col' changed from 20,84,2 to 23.999998569488525390625000,100,1.96078438311815261840820312500
==> /var/log/openhab/openhab.log <==
2021-09-30 15:40:20.133 [INFO ] [openhab.core.model.script.WAKETIMERS] - I_received23.999998569488525390625000_100_1.96078438311815261840820312500
2021-09-30 15:40:20.148 [INFO ] [openhab.core.model.script.WAKETIMERS] - Increased Brightness to 5
==> /var/log/openhab/events.log <==
2021-09-30 15:40:20.147 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'dLedStrpBedRoom_Col' received command 20,84,5
2021-09-30 15:40:20.153 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'dLedStrpBedRoom_Col' predicted to become 20,84,5
2021-09-30 15:40:20.160 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dLedStrpBedRoom_Col' changed from 23.999998569488525390625000,100,1.96078438311815261840820312500 to 20,84,5
2021-09-30 15:40:47.485 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dLedStrpBedRoom_Col' changed from 20,84,5 to 18.0000002682209014892578125000,83.333331346511840820312500,4.7058824449777603149414062500
==> /var/log/openhab/openhab.log <==
2021-09-30 15:41:20.165 [INFO ] [openhab.core.model.script.WAKETIMERS] - I_received18.0000002682209014892578125000_83.333331346511840820312500_4.7058824449777603149414062500
2021-09-30 15:41:20.179 [INFO ] [openhab.core.model.script.WAKETIMERS] - Increased Brightness to 8
==> /var/log/openhab/events.log <==
2021-09-30 15:41:20.178 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'dLedStrpBedRoom_Col' received command 20,84,8
2021-09-30 15:41:20.184 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'dLedStrpBedRoom_Col' predicted to become 20,84,8
2021-09-30 15:41:20.190 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dLedStrpBedRoom_Col' changed from 18.0000002682209014892578125000,83.333331346511840820312500,4.7058824449777603149414062500 to 20,84,8

EDIT: The log shows already my final solution where for each kommand the target values are fixed in the rule → No number-drift due to changing values

It sounds like your rule is looping because it acts on Item state update?
Have you considered the effects of autoupdate here?

The rule is triggered via cron to frequently check if Alarm-Time is reached

Then there is a if-statement which decides if Alarm-Time is reached → Log “WakeTimer Bedroom ON” → Triggers only once

Then there is a timer started which gets rescheduled until brightness reaches 100% → Each increase of brightness (with a command) you see at Log “Increased Brightness”

Do i get something wrong or is this answering your question?

No, that all sounds reasonable. From the original description of thesecret rule, it seemed you may have been triggering from Item update and issuing new commands.

So you’ve got a puzzle where your ‘extra’ commands are coming from. It’s generally rules or UI. Bindings may be configured to issue commands in exceptional circumstances, but there is no reason to think the WiFiLED binding is doing that -or even capable of that.

Now i tried to delete the only widget from my OH3-GUI which is connected with the rgb-item (code below) for the LED strip to make sure that no gui coud change something → Also after deletion of the widget the value changes by itsself

@rossko57
If you say that the binding itsself should not change anything, is there a possibility that this problem is caused by the device and the software itsself? Some kind of good or bad software on different devices?
Because if im looking at the logs above i see no “predicted to become” before the device changes the values by itsself. For me (not knowing what im doing) it seems that its just the internal software calculation of the device which does not manage to set “clean” values without comma / Integers

 - component: oh-block
    config: {}
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config: {}
                slots:
                  default:
                    - component: oh-list-card
                      config: {}
                      slots:
                        default:
                          - component: oh-toggle-item
                            config:
                              icon: '=(items.dLedStrpBedRoom_Swt.state == "ON") ? "f7:lightbulb_fill" :
                                "f7:lightbulb"'
                              item: dLedStrpBedRoom_Swt
                              title: LED Licht
                          - component: oh-slider-item
                            config:
                              item: dLedStrpBedRoomWht1_Dim
                          - component: oh-slider-item
                            config:
                              item: dLedStrpBedRoomWht2_Dim
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config: {}
                slots:
                  default:
                    - component: oh-colorpicker-card
                      config:
                        item: dLedStrpBedRoom_Col
                        modules:
                          - hsb-sliders

Just one more idea:

I connected this LED-srtrip with my GoogleAssistant.
Can this cause the unintended change of values?

Maybe we’re looking at different things.
Based on -

and shown log including

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.176 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'dLedStrpBedRoom_Col' received command 19,100,10

I thought you meant the problem was you could see two Commands in your log, but expected one.

Yes thats exactly what its all about.
I only send one command from this specific rule, but it changes multiple time afterwards