Sonoff B05 RGB Bulb
Hello,
Thank you for this awesome plugin.
I tried to use this plugin for my Sonoff B05 rgb led bulb. I am able to turn on/off bulb.
Unfortunately I am not able to change brightness. When I change brightness in HA . bulb just blinks and slider in HA returns to its original position.
Logs:
2020-11-30 06:10:14 DEBUG sonoff_local 1000f48984 => Local4 | {'switch': 'on', 'ltype': 'white', 'white': {'br': 79, 'ct': 54}} !! Timeout 1
2020-11-30 06:10:14 DEBUG sonoff_cloud 1000f48984 => Cloud4 | {'switch': 'on', 'ltype': 'white', 'white': {'br': 79, 'ct': 54}} | 1606716613081
2020-11-30 06:10:14 DEBUG sonoff_local 1000f48984 => Local4 | {'switch': 'on', 'ltype': 'white', 'white': {'br': 79, 'ct': 54}} !! Timeout 1
2020-11-30 06:10:14 DEBUG sonoff_cloud 1000f48984 => Cloud4 | {'switch': 'on', 'ltype': 'white', 'white': {'br': 79, 'ct': 54}} | 1606716613265
2020-11-30 06:10:14 DEBUG sonoff_cloud 1000f48984 <= Cloud3 | {'action': 'update', 'deviceid': '1000f48984', 'apikey': '...', 'userAgent': 'device', 'd_seq': 19996, 'ts': 0, 'params': {'switch': 'on', 'ltype': 'white', 'white': {'br': 100, 'ct': 54}, 'sequence': '123456789', 'selfApikey': ''}, 'from': 'device'}
2020-11-30 06:10:14 DEBUG sonoff_cloud 1000f48984 <= Cloud3 | {'error': 0, 'deviceid': '1000f48984', 'apikey': '...', 'sequence': '1606716613081'}
2020-11-30 06:10:14 DEBUG sonoff_cloud 1000f48984 => Cloud5 | Force update sequence: 1606716614580
2020-11-30 06:10:14 DEBUG sonoff_cloud 1000f48984 <= Cloud3 | {'error': 0, 'deviceid': '1000f48984', 'apikey': '...', 'sequence': '1606716614580', 'params': {'version': 7, 'switch': 'on', 'ltype': 'white', 'white': {'br': 79, 'ct': 54}, 'fwVersion': '1.3.2', 'sequence': '123456789', 'selfApikey': '', 'OTA': 'success', 'color': {'r': 254, 'g': 0, 'b': 0, 'br': 1}}}
2020-11-30 06:10:14 DEBUG sonoff_cloud 1000f48984 <= Cloud3 | {'error': 0, 'deviceid': '1000f48984', 'apikey': '...', 'sequence': '1606716613265'}
2020-11-30 06:10:14 DEBUG sonoff_cloud 1000f48984 => Cloud5 | Force update sequence: 1606716614669
2020-11-30 06:10:14 DEBUG sonoff_cloud 1000f48984 <= Cloud3 | {'action': 'update', 'deviceid': '1000f48984', 'apikey': '...', 'userAgent': 'device', 'd_seq': 5981, 'ts': 0, 'params': {'switch': 'on', 'ltype': 'white', 'white': {'br': 100, 'ct': 54}, 'sequence': '123456789', 'selfApikey': ''}, 'from': 'device'}
2020-11-30 06:10:14 DEBUG sonoff_cloud 1000f48984 <= Cloud3 | {'error': 0, 'deviceid': '1000f48984', 'apikey': '...', 'sequence': '1606716614669', 'params': {'version': 7, 'switch': 'on', 'ltype': 'white', 'white': {'br': 79, 'ct': 54}, 'fwVersion': '1.3.2', 'sequence': '123456789', 'selfApikey': '', 'OTA': 'success', 'color': {'r': 254, 'g': 0, 'b': 0, 'br': 1}}}
2020-11-30 06:10:14 DEBUG sonoff_local 1000f48984 <= Local3 | {'switch': 'on', 'ltype': 'white', 'white': {'br': 100, 'ct': 54}} | 3
2020-11-30 06:10:19 DEBUG sonoff_cloud 1000f48984 <= Cloud3 | {'action': 'update', 'deviceid': '1000f48984', 'apikey': '...', 'userAgent': 'device', 'd_seq': 17901, 'ts': 0, 'params': {'switch': 'on', 'ltype': 'white', 'white': {'br': 100, 'ct': 54}, 'sequence': '123456789', 'selfApikey': ''}, 'from': 'device'}
2020-11-30 06:10:19 DEBUG sonoff_local 1000f48984 <= Local3 | {'switch': 'on', 'ltype': 'white', 'white': {'br': 100, 'ct': 54}} | 4
Thank you for your help.
+1 to this same issue :-)
I can toggle the light on or off but colour and brightness just resets as though I've just turned it on again.
Same issue.
I am having the same issues implementing these bulbs in my homebridge-ewelink plugin.
I personally own the B02-F filament bulb which uses the same format:
params: {
switch: 'on',
ltype: 'white',
white: {
br: 79,
ct: 54
}
}
Following this issue to see if a solution is found 😛
After a few hours of tinkering with my code I have had success and found the following works to update.
- Send just the
switchparam to turn on/off - To change from color to white mode (or vice versa), send the
ltypeparam along with thewhite/colorparam containing bothbrandct(but don't send theswitchparam) - To change
br/rgb/ctvalues (but not changing mode) then it is not necessary to send theswitchnormodeparams.
This third point was what seemed to be causing the flickering - I was sending the mode param even if it didn't need to be changed.
I also noticed that if the bulb is OFF, and I send mode and white/color params, the bulb would turn ON (but still reported as OFF in the ewelink app).
I hope this can help someone on here. I have zero experience with python.
Is this B05 bulb working in local mode, or only with cloud mode ? Is color setting is resolved already ?
I have created a fork which works with my B05 bulbs over cloud mode. I don't think these bulbs even support local mode (if they do, please let me know how!). Please check it out here: https://github.com/mennovf/SonoffLAN. I will create a pull request after I have gained some experience with my fork. The changes I had to make were exactly those as specified by @bwp91 . Thank you!
I've run into an issue with the implementation. If I turn on an entity group with two light in them, it happens that only one of them actually turns on. These are the log lines during this event:
2021-01-06 19:40:06 DEBUG sonoff_cloud Cloud init: {'error': 0, 'apikey': '...', 'config': {'hb': 1, 'hbInterval': 145}, 'sequence': '1609958406711'} 2021-01-06 19:46:11 DEBUG sonoff_cloud 1000f18071 => Cloud4 | {'switch': 'off'} | 1609958771951 2021-01-06 19:46:11 DEBUG sonoff_cloud 1000f189bc => Cloud4 | {'switch': 'off'} | 1609958771954 2021-01-06 19:46:11 DEBUG sonoff_cloud Cloud WS retrying in 0 seconds 2021-01-06 19:46:12 DEBUG sonoff_cloud Cloud init: {'error': 0, 'apikey': '...', 'config': {'hb': 1, 'hbInterval': 145}, 'sequence': '1609958772309'} 2021-01-06 19:46:17 DEBUG sonoff_cloud 1000f18071 <= Cloud3 | {'action': 'update', 'deviceid': '1000f18071', 'apikey': '...', 'userAgent': 'device', 'd_seq': 14632, 'params': {'switch': 'off', 'sequence': '123456789', 'selfApikey': ''}, 'from': 'device'}
Is this because the entity groups causes multiple messages to be sent to the cloud too quickly, or should I just handle these timeouts somewhere and try again. Can anyone shed some light on this?
I have the same issue with B05 bulb. I noticed when using ewelink, all the commands are visible in HA. In the other direction won't work =(
Help please
Is this because the entity groups causes multiple messages to be sent to the cloud too quickly, or should I just handle these timeouts somewhere and try again. Can anyone shed some light on this?
From coding my ewelink homebridge plugin, I noticed that multiple web socket updates at the same time would fail. I had to implement a random delay (between 0 and 500ms I think). If it's a lighting group, can you use the eWeLink app to make scenes where if one turns on/off then the other light turns on/off accordingly? - then it would just need one web socket update for them both to turn on/off
I had to implement a random delay (between 0 and 500ms I think)
I've made all the 'sends' scheduled with at least a 100ms difference between them. This seems to work so far, but I'm still testing. This is a change that affects all communication with the cloud. I'm not sure this wont have any adverse effect on other devices.
can you use the eWeLink app to make scenes where if one turns on/off then the other light turns on/off
Correct me if I'm wrong, but do you need to use apiv2 for this? I'm new to this eWeLink thing but it appears this repository uses the first api version.
same issue for me, i'm able to switch on/off but I'm not able to change the brightness, blink and return back to the original positon
@andyz68 I have been using my fork for a couple of days now with no issues. You could try it out if you'd like.
@andyz68 I have been using my fork for a couple of days now with no issues. You could try it out if you'd like.
Done, it work fine! Thank you!
Let me know on the dedicated issue page if you encounter any. I don't want to spam this issue too much.
@mennovf how is it going now, do you plan to create a PR?
@sherazlodhi I thinks it's fine already for a pull request. I will look at it tonight. I have some questions regarding code quality/organization but I will resolve those in the PR.
Working solution, thank you @mennovf .
Is B05 works fine in latest release?
@AlexxIT
Is B05 works fine in latest release?
I've just updated to version 2.4.0 and I can confirm brightness and color setting works like a charm!
Thank you very much.
Are there any specific configurations that are needed to run the B05?