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

Readings for switch SCB1E not divided by 1000 #736

Open
Gongui opened this issue Dec 30, 2022 · 0 comments
Open

Readings for switch SCB1E not divided by 1000 #736

Gongui opened this issue Dec 30, 2022 · 0 comments

Comments

@Gongui
Copy link

Gongui commented Dec 30, 2022

Hi!

I just installed a SCB1E to power and monitor a small AC unit with HomeAssistant, after powering on (the SCB1E ) i found that the values returned are incorrect (not divided by 1000).

Wrote a simple script to test the switch directly with python-broadlink and the error is also present:

import broadlink

switch = broadlink.switch.sp4(('...', 80), mac=b'...', devtype=42347, timeout=10, name='SCB1E', model='SCB1E', manufacturer='Broadlink', is_locked=False)
switch.auth()
print(switch.get_state())

For example the reading when the AC unit is off is:

{'pwr': 1, 'indicator': 0, 'maxworktime': 0, 'current': 35, 'volt': 223900, 'power': 750, 'totalconsum': 0, 'overload': 0, 'childlock': 0}

and when it is on:

{'pwr': 1, 'indicator': 0, 'maxworktime': 0, 'current': 3879, 'volt': 218600, 'power': 833360, 'totalconsum': 30, 'overload': 0, 'childlock': 0}

The device is being identified as a SP4 by the discover method:

broadlink.switch.sp4(('...', 80), mac=b'...', devtype=42347, timeout=10, name='SCB1E', model='SCB1E', manufacturer='Broadlink', is_locked=False)

Trying to use the SP4B class returns the following exception:

broadlink.exceptions.StorageError: [Errno -5] The device storage is full

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

No branches or pull requests

1 participant