Skip to content
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

Add two DIY modes to TX Ultimate backlight #1424

Closed
jonlanceley opened this issue May 26, 2024 · 12 comments
Closed

Add two DIY modes to TX Ultimate backlight #1424

jonlanceley opened this issue May 26, 2024 · 12 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jonlanceley
Copy link

jonlanceley commented May 26, 2024

The TX Ultimate switch's backlight now have 2 extra modes: DIY 1, DIY 2

Could these be added please to the list in XT5Light(XOnOffLight)
Screenshot_20240526_151457_eWeLink

Thankyou

@AlexxIT AlexxIT added the enhancement New feature or request label Sep 1, 2024
@AlexxIT AlexxIT self-assigned this Sep 1, 2024
@dustin-auby
Copy link

This feature is crucial for my implementation. it would be great if we could pass a colour along with the effect name so we dont have to configure it through the ewelink app, not sure if that is possible

@AlexxIT AlexxIT changed the title TX Ultimate backlight now has DIY modes Add two DIY modes to TX Ultimate backlight Sep 7, 2024
@AlexxIT AlexxIT added this to the v3.8.0 milestone Sep 7, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 8, 2024

@AlexxIT AlexxIT closed this as completed Sep 8, 2024
@dustin-auby
Copy link

Tested but does not seem to work it only allows the DIY 1 and DIY 2 to be selected but does not apply the custom colour

@jonlanceley
Copy link
Author

jonlanceley commented Sep 8, 2024

Hi @AlexxIT thanks for adding the 2 DIY modes but seems they dont quite work.

If you set DIY 1 or 2 in the ewelink app you can turn on the backlight and it works. But if you try and select DIY mode from the Homeassistant effect dropdown it gives a 400 cloud error.

Seams the DIY modes dont continue to use the sequential numbers for setting lightmode which would be 8 and 9. But instead use 101 and 102.

Last 2 log entries came from using the ewelink app to set DIY 1 and 2.

2024-09-08 07:36:34 [D] 1002091257 => Local4 | 192.168.2.251:8081 | {'lightMode': 6} <= {'sequence': '1725777394291', 'seq': 61200, 'error': 0, 'encrypt': True}
2024-09-08 07:36:34 [D] 1002091257 <= Local3 | 192.168.2.251:8081 | {'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}, {'switch': 'on', 'outlet': 2}], 'electromotor': 1, 'percentageControl': 0, 'calibState': False, 'triggerType': 11, 'lightSwitch': 'on', 'lightMode': 6, 'shock': 0, 'doNotDisturb': 1, 'doNotDisturbTime': {'from': '20:00', 'to': '08:00'}, 'sledOnline': 'on', 'fwVersion': '1.4.0', 'rssi': -69} | 61200
2024-09-08 07:36:34 [D] 1002091257 <= Cloud3 | {'percentageControl': 0, 'calibState': False, 'lightMode': 6} | 1725777394291
2024-09-08 07:37:33 [D] 1002091257 => Local4 | 192.168.2.251:8081 | {'lightMode': 7} <= {'sequence': '1725777453306', 'seq': 61201, 'error': 0, 'encrypt': True}
2024-09-08 07:37:33 [D] 1002091257 <= Local3 | 192.168.2.251:8081 | {'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}, {'switch': 'on', 'outlet': 2}], 'electromotor': 1, 'percentageControl': 0, 'calibState': False, 'triggerType': 11, 'lightSwitch': 'on', 'lightMode': 7, 'shock': 0, 'doNotDisturb': 1, 'doNotDisturbTime': {'from': '20:00', 'to': '08:00'}, 'sledOnline': 'on', 'fwVersion': '1.4.0', 'rssi': -69} | 61201
2024-09-08 07:37:33 [D] 1002091257 <= Cloud3 | {'percentageControl': 0, 'calibState': False, 'lightMode': 7} | 1725777453306
2024-09-08 07:37:56 [D] 1002091257 => Local4 | 192.168.2.251:8081 | {'lightMode': 8} <= {'sequence': '1725777476145', 'seq': 61202, 'error': 400, 'encrypt': True}
2024-09-08 07:37:56 [D] 1002091257 => Cloud4 | {'lightMode': 8} | 1725777476145
2024-09-08 07:37:56 [D] 1002091257 <= Local3 | 192.168.2.251:8081 | {'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}, {'switch': 'on', 'outlet': 2}], 'electromotor': 1, 'percentageControl': 0, 'calibState': False, 'triggerType': 11, 'lightSwitch': 'on', 'lightMode': 7, 'shock': 0, 'doNotDisturb': 1, 'doNotDisturbTime': {'from': '20:00', 'to': '08:00'}, 'sledOnline': 'on', 'fwVersion': '1.4.0', 'rssi': -69} | 61202
2024-09-08 07:37:56 [D] 1002091257 <= Cloud3 | {'percentageControl': 0, 'calibState': False, 'lightMode': 7} | 1725777476145
2024-09-08 07:37:56 [W] Cloud ERROR: {'error': 400, 'deviceid': '1002091257', 'apikey': '99446c3c-ca30-4df5-9558-5aee308585f6', 'sequence': '1725777476145', 'uid': 'f83c856d-5580-4167-bb8d-d69d6844d028'}
2024-09-08 07:37:56 [D] 1002091257 => Local4 | 192.168.2.251:8081 | None <= {'sequence': '1725777476427', 'seq': 61204, 'error': 400, 'encrypt': True}
2024-09-08 07:37:56 [D] 1002091257 <= Cloud3 | {'percentageControl': 0, 'calibState': False} | 1725777476427
2024-09-08 07:37:57 [D] 1002091257 <= Local3 | 192.168.2.251:8081 | {'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}, {'switch': 'on', 'outlet': 2}], 'electromotor': 1, 'percentageControl': 0, 'calibState': False, 'triggerType': 11, 'lightSwitch': 'on', 'lightMode': 7, 'shock': 0, 'doNotDisturb': 1, 'doNotDisturbTime': {'from': '20:00', 'to': '08:00'}, 'sledOnline': 'on', 'fwVersion': '1.4.0', 'rssi': -70} | 61204
2024-09-08 07:39:13 [D] 1002091257 => Local4 | 192.168.2.251:8081 | {'lightMode': 9} <= {'sequence': '1725777553458', 'seq': 61205, 'error': 400, 'encrypt': True}
2024-09-08 07:39:13 [D] 1002091257 => Cloud4 | {'lightMode': 9} | 1725777553458
2024-09-08 07:39:13 [D] 1002091257 <= Local3 | 192.168.2.251:8081 | {'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}, {'switch': 'on', 'outlet': 2}], 'electromotor': 1, 'percentageControl': 0, 'calibState': False, 'triggerType': 11, 'lightSwitch': 'on', 'lightMode': 7, 'shock': 0, 'doNotDisturb': 1, 'doNotDisturbTime': {'from': '20:00', 'to': '08:00'}, 'sledOnline': 'on', 'fwVersion': '1.4.0', 'rssi': -69} | 61205
2024-09-08 07:39:13 [D] 1002091257 <= Cloud3 | {'percentageControl': 0, 'calibState': False, 'lightMode': 7} | 1725777553458
2024-09-08 07:39:13 [D] 1002091257 <= Local3 | 192.168.2.251:8081 | {'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}, {'switch': 'on', 'outlet': 2}], 'electromotor': 1, 'percentageControl': 0, 'calibState': False, 'triggerType': 11, 'lightSwitch': 'on', 'lightMode': 7, 'shock': 0, 'doNotDisturb': 1, 'doNotDisturbTime': {'from': '20:00', 'to': '08:00'}, 'sledOnline': 'on', 'fwVersion': '1.4.0', 'rssi': -71} | 61206
2024-09-08 07:39:13 [W] Cloud ERROR: {'error': 400, 'deviceid': '1002091257', 'apikey': '99446c3c-ca30-4df5-9558-5aee308585f6', 'sequence': '1725777553458', 'uid': 'f83c856d-5580-4167-bb8d-d69d6844d028'}
2024-09-08 07:39:13 [D] 1002091257 => Local4 | 192.168.2.251:8081 | None <= {'sequence': '1725777553737', 'seq': 61207, 'error': 400, 'encrypt': True}
2024-09-08 07:39:13 [D] 1002091257 <= Cloud3 | {'percentageControl': 0, 'calibState': False} | 1725777553737
2024-09-08 07:39:14 [D] 1002091257 <= Local3 | 192.168.2.251:8081 | {'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}, {'switch': 'on', 'outlet': 2}], 'electromotor': 1, 'percentageControl': 0, 'calibState': False, 'triggerType': 11, 'lightSwitch': 'on', 'lightMode': 7, 'shock': 0, 'doNotDisturb': 1, 'doNotDisturbTime': {'from': '20:00', 'to': '08:00'}, 'sledOnline': 'on', 'fwVersion': '1.4.0', 'rssi': -69} | 61207
2024-09-08 07:40:19 [D] 1002091257 <= Cloud3 | {'percentageControl': 0, 'calibState': False, 'lightMode': 101} | 1725777617051
2024-09-08 07:40:19 [D] 1002091257 <= Local3 | 192.168.2.251:8081 | {'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}, {'switch': 'on', 'outlet': 2}], 'electromotor': 1, 'percentageControl': 0, 'calibState': False, 'triggerType': 11, 'lightSwitch': 'on', 'lightMode': 101, 'shock': 0, 'doNotDisturb': 1, 'doNotDisturbTime': {'from': '20:00', 'to': '08:00'}, 'sledOnline': 'on', 'fwVersion': '1.4.0', 'rssi': -70} | 61208
2024-09-08 07:40:28 [D] 1002091257 <= Local3 | 192.168.2.251:8081 | {'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}, {'switch': 'on', 'outlet': 2}], 'electromotor': 1, 'percentageControl': 0, 'calibState': False, 'triggerType': 11, 'lightSwitch': 'on', 'lightMode': 102, 'shock': 0, 'doNotDisturb': 1, 'doNotDisturbTime': {'from': '20:00', 'to': '08:00'}, 'sledOnline': 'on', 'fwVersion': '1.4.0', 'rssi': -68} | 61209
2024-09-08 07:40:28 [D] 1002091257 <= Cloud3 | {'percentageControl': 0, 'calibState': False, 'lightMode': 102} | 1725777626883

AlexxIT added a commit that referenced this issue Sep 8, 2024
@AlexxIT AlexxIT reopened this Sep 8, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 8, 2024

Fixed

@jonlanceley
Copy link
Author

Fixed

Thanks @AlexxIT have tested and works well. Appreciate all the work you do on the Sonoff integration 👍

@dustin-auby
Copy link

dustin-auby commented Sep 8, 2024

@jonlanceley how were you able to test. i force redownloaded the plugin and tested again and i am experiencing the same issue i get this warning in the logs

Cloud ERROR: {'error': 400, 'deviceid': '1001ggcb7a', 'apikey': '1c586884-db6b-4ffff-91dc-61bf795d', 'sequence': '1725794117343', 'uid': '1c586884-db6b-4ddc-91dc-9c5061bf795d'}

the led lights turn on but just use the night light colour and do not apply the DIY colours and settings

@jonlanceley
Copy link
Author

@dustin-auby i just downloaded the 1 file that was changed light.py and uploaded it to HA custom_components/sonoff directory.
Restarted HA.

Basically doing the manual install option but instead of using the release version took the file from the master branch

@dustin-auby
Copy link

@dustin-auby i just downloaded the 1 file that was changed light.py and uploaded it to HA custom_components/sonoff directory.
Restarted HA.

Basically doing the manual install option but instead of using the release version took the file from the master branch

Oh ok il do that 👍

@dustin-auby
Copy link

dustin-auby commented Sep 9, 2024

Ok so tried that and i still get the same error, is there anything else i can try. i used the file from master branch. tried restarting HA. also tried doing force refreshes

@dustin-auby
Copy link

Ok got it to work, once i opened the ewelink app and re configured the DIY 1 and DIY 2 it seems to work. is there any chance of setting the DIY colours and brightness from HA ?

@AlexxIT AlexxIT modified the milestones: v3.8.0, v3.8.1 Sep 17, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 18, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants