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

I can not get load_power with my set is Xiaomi Smart WiFi with two usb (chuangmi.plug.v3) #549

Closed
xiaobai987292 opened this issue Sep 15, 2019 · 8 comments
Assignees

Comments

@xiaobai987292
Copy link

xiaobai987292 commented Sep 15, 2019

my code is

from miio.chuangmi_plug import ChuangmiPlug
ip='192.168.31.105'

token='c0a62ad33e0f047d15380282c12f2216' # 输入之前获得token

d = ChuangmiPlug(ip=ip, token=token)

x=d.status() # 给出设备的状态

print(x)

the result is
<ChuangmiPlugStatus power=True, usb_power=None, temperature=40, load_power=None, wifi_led=None>

the load_power could get in mihome app

@syssi
Copy link
Collaborator

syssi commented Sep 15, 2019

Which hardware version of the device do you own? Are you sure it's capable to measure the power usage?

@xiaobai987292
Copy link
Author

xiaobai987292 commented Sep 15, 2019

my hardware could Statistics the power and used-power like image like this
微信图片_20190915191128
微信图片_20190915191134
微信图片_20190915191140

@syssi
Copy link
Collaborator

syssi commented Sep 15, 2019

Perfect! Could you provide the output of miiocli info?

@xiaobai987292
Copy link
Author

xiaobai987292 commented Sep 15, 2019

Perfect! Could you provide the output of miiocli info?

hao to get this info ?
i try this but

$ miiocli info
Usage: miiocli [OPTIONS] COMMAND [ARGS]...
Try "miiocli --help" for help.

Error: No such command "info".

do you mean ?

d = ChuangmiPlug(ip=ip, token=token)
x=d.info()
print(x)

results

ChuangmiPlugStatus power=True, usb_power=None, temperature=40, load_power=None, wifi_led=None>
chuangmi.plug.v3 v1.3.9_0005 (40:31:3C:EB:07:26) @ 192.168.31.105 - token: cda62ad33e0f047db....

@syssi
Copy link
Collaborator

syssi commented Sep 15, 2019

Thanks! chuangmi.plug.v3 is the model I was looking for.

@syssi syssi changed the title I can not get load_power with [chuangmi.plug.m3] my set is Xiaomi Smart WiFi with two usb I can not get load_power with my set is Xiaomi Smart WiFi with two usb (chuangmi.plug.v3) Oct 5, 2019
@syssi syssi self-assigned this Oct 5, 2019
@syssi
Copy link
Collaborator

syssi commented Oct 5, 2019

Could you provide the output of:

miiocli device --ip 192.168.31.105 --token cda62ad33e0f047db... raw_command get_power '[]'

@AvailCat
Copy link

@syssi Call device with this command will got:

miiocli device --ip 192.168.3.117 --token ...... raw_command get_power "[]"
Running command raw_command
[8900]

@syssi
Copy link
Collaborator

syssi commented Nov 23, 2019

Thanks! The v3 is properly supported. The model must be passed to the constructor. The get_power call is used afterwards.

@syssi syssi closed this as completed Nov 23, 2019
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

3 participants