MagicHome LED strip changing color it self without any command

Sounds like there are two issues then:

  • Changing colour without apparent input
  • openHAB status not updating, which you’ve masked with a rule (I’m assuming the WiFi LED binding should be updating the status correctly, but I don’t use it…)

EDIT: I’ve updated the tags on this thread to reflect the WiFi LED binding aspect of this issue.

Yes you are right. I think the problem with updating the status is related to the specifics of the control channels. The “power” channel has values (ON/OFF) and the “color” channel has values (HSB-value or ON/OFF). See the screen below :


I can’t turn off the light and leave the house now, because the LED-strip turns on by itself :slight_smile: Now the value of the highlight color has changed to these values.

I have 2 controllers installed. And this problem with both.

You are sending it a command ON. Whatever else may or may not happen, you are making sure your LED is turned on. Don’t do that if you don’t want it on.

If you’re trying to update something for your UI, update it. Use postUpdate, not sendCommand.

Let’s see whats left after that is fixed.

I wrote this rule only because when changing the color, brightness, or whiteness the strip turns on (without any rules). When changing the “color” channel to ON or HSV-value ( …,…,…), the “power” channel remains in the OFF state. You can check it yourself if you have LED binding and a controller. I think this is due to the fact that these are different channels and they are not connected in any way. They simply duplicate the ON/OFF actions. I will follow your advice and disable the rule or replace it with postUpdate. Let’s see what happens.

You should definitely follow the advice of @rossko57 and use postUpdate for your rule - all you actually want to do in your rule is update your UI, not send a second command to your device.

However, I don’t think that will fix the issue at hand. As you’ve described, even without the rule, your LED strip will turn on when its colour channel receives a new colour value. And there is something mysterious send a slightly different but still new colour to your device.

I’m out of ideas, but that’s mainly because I don’t use the binding. I also have a MagicHome device, but flashed with Tasmota. It’s integrated with openHAB through MQTT. Might be more hassle than you’re willing to put up with, though.

Tell me please, what “Module type” do you select in Tasmota? “MagicHome(34)”? Or something else?

I link to the Tasmota page in my description. From here I chose Arilux LC03 because I have the IR remote version.

Thanks. I’ll try to flash Tasmota one of my controllers. From your table, I have an LC02 device. I will look at the difference in work and let you know.

Note that there are two versions of the MagicHome device around:

You can sometimes identify which you’ve got from the outside, but it should become very clear once the box is opened.

I opened the box and saw this

There are no ESP. DO you now, how can I flash it?

Unfortunately it’s not possible, apparently: https://templates.blakadder.com/unsupported/magichome_ZJ-WFMN-E.html

Here is an excellent German video how to flash Tasmota on these Magic Home controllers. I recently did it myself.

Kind regards,
Pieter

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