BaQs / pyEzviz

Python package for ezviz cameras
Apache License 2.0
103 stars 45 forks source link

Ezviz smart plug - power consumption? #92

Open MattG40 opened 1 year ago

MattG40 commented 1 year ago

Hi,

I try to read the power consumption of a Ezviz smart plug (CS-T31-16B-EU).

Does someone know how/where I can read this?

For test I tried to adapt this like below without success: https://github.com/BaQs/pyEzviz/blob/33261c9f0c493599f2f72b7f489d1a411e826a3b/pyezviz/client.py#L543-L546

result[_serial] = { "POWER": {_res_id: devices.get("POWER", {}).get(_res_id, {})}, "POWER": devices.get("POWER", {}).get(_serial, {}), "POWER_CONSUMPTION": {_res_id: devices.get("POWER_CONSUMPTION", {}).get(_res_id, {})}, "POWER_CONSUMPTION": devices.get("POWER_CONSUMPTION", {}).get(_serial, {}),

Best regards, MattG40

RenierM26 commented 1 year ago

Hi @MattG40,

Do have you looked in the pagelist api response? Are you guessing the keys or are they returning a response? I you could share the actual response, I can build it into the API.

I only have EZVIZ cameras so will need your help to implement this.