iKaew / hass-lifesmart-addon

LifeSmart Integration for Home Assistant
5 stars 1 forks source link

ELIQ_EM #8

Open Thomas-Rokeberg opened 11 months ago

Thomas-Rokeberg commented 11 months ago

2023-10-18 22:33:16.087 DEBUG (Thread-3) [custom_components.lifesmart] websocket_msg: {"type":"io","msg":{"fullCls":"ELIQ_EM_V1","val":272539.57329663,"v":2725.3957329663,"agt":"A3MAAAAdAEcVRzUzMTgxNA","devtype":"ELIQ_EM","me":"2713","idx":"EPA","lsid":"Aw****AAAAAA","type":126,"userid":"7*****2","ts":1697661195944},"id":6} 2023-10-18 22:33:16.091 ERROR (Thread-3) [websocket] error from callback <function async_setup_entry..on_message at 0x7fd8d6005440>: 'NoneType' object has no attribute 'attributes' 2023-10-18 22:33:16.091 ERROR (Thread-3) [custom_components.lifesmart] Websocket_error: 'NoneType' object has no attribute 'attributes'

The "v":2725.3957329663 is power consumption in Watt

iKaew commented 11 months ago

Hi @Thomas-Rokeberg

Can you help provide the jsondata of this device when integration first load as well?

Thomas-Rokeberg commented 11 months ago

2023-10-19 18:21:19.567 DEBUG (MainThread) [custom_components.lifesmart.lifesmart_client] EpGetAll_res: {'status': 'ok', 'message': [{'ver': '0.0.0.1', 'fullCls': 'SL_OL_DE_V1', 'data': {'dark': {'type': 211, 'valts': 1695494030226, 'val': 29}, 'EV': {'type': 95, 'v': 235.5, 'valts': 1697732126085, 'val': 2355}, 'EI': {'type': 95, 'v': 0, 'valts': 1694705895222, 'val': 0}, 'EP': {'type': 111, 'v': 0, 'valts': 1694705895222, 'val': 0}, 'O': {'type': 128, 'v': 0, 'valts': 1697718517808, 'val': 0}, 'bright': {'type': 211, 'valts': 1694705694661, 'val': 250}, 'EPA': {'type': 111, 'v': 0, 'valts': 1694705900823, 'val': 0}}, 'me': '6591', 'devtype': 'SL_OL_DE', 'lHeart': 1697732126, 'stat': 1, 'agt': 'A3MAAAAdAEcVRzUzMTgxNA', 'agt_ver': '1.0.92p85', 'name': 'Smart Plug 1', 'lDbm': -44}, {'ver': '0.0.0.2', 'fullCls': 'SL_SC_THL_V6', 'data': {'T': {'type': 95, 'v': 19.7, 'valts': 1697732400370, 'val': 197}, 'Z': {'type': 83, 'v': 8.8623046875, 'valts': 1697732339279, 'val': 25}, 'V': {'type': 83, 'v': 100, 'valts': 1697731179170, 'val': 431}, 'C': {'type': 0, 'v': 0, 'valts': 1695512937949, 'val': 0}, 'H': {'type': 95, 'v': 36.4, 'valts': 1697732400370, 'val': 364}}, 'me': '2711', 'devtype': 'SL_SC_THL', 'lHeart': 1697732400, 'stat': 1, 'agt': 'A3MAAAAdAEcVRzUzMTgxNA', 'agt_ver': '1.0.92p85', 'name': 'Environmental Sensor', 'lDbm': -72}, {'ver': '0.0.0.0', 'fullCls': 'V_IND_S', 'me': '0021', 'lHeart': 1518468365, 'stat': 1, 'data': {'P2': {'val': 0, 'type': 128, 'v': 0, 'valts': 1697713288000}, 'P1': {'val': 0, 'type': 128, 'v': 0, 'valts': 1697714204730}}, 'agt': 'A3MAAAAdAEcVRzUzMTgxNA', 'devtype': 'V_IND_S', 'name': '0021', 'agt_ver': '1.0.92p85'}], 'code': 0, 'id': 1} 2023-10-19 18:21:19.569 DEBUG (Thread-7) [custom_components.lifesmart] lifesmart: starting wss 2023-10-19 18:21:19.846 DEBUG (Thread-7) [custom_components.lifesmart] LifeSmart websocket sending_data 2023-10-19 18:21:19.917 DEBUG (Thread-7) [custom_components.lifesmart] websocket_msg: {"message":"success","code":0,"id":1} 2023-10-19 18:21:20.835 DEBUG (Thread-7) [custom_components.lifesmart] websocket_msg: {"type":"io","msg":{"fullCls":"ELIQ_EM_V1","val":239900.04164931,"v":2399.0004164931,"agt":"A3MAAAAdAEcVRzUzMTgxNA","devtype":"ELIQ_EM","me":"2713","idx":"EPA","lsid":"AwEGEPE1EAAAAAAAAAAAAA","type":126,"userid":"7568472","ts":1697732480690},"id":1} 2023-10-19 18:21:20.840 ERROR (Thread-7) [websocket] error from callback <function async_setup_entry..on_message at 0x7f706915f880>: 'NoneType' object has no attribute 'attributes' 2023-10-19 18:21:20.841 ERROR (Thread-7) [custom_components.lifesmart] Websocket_error: 'NoneType' object has no attribute 'attributes'

ELIQ_EM is only through websocket.

iKaew commented 11 months ago

Just reached to LifeSmart support they response with below message.

ELIQ is a third-party device, and ELIQ has discontinued its services. 

Therefore, LifeSmart OpenAPI no longer supports ELIQ devices, resulting in EpGetAll cannot obtain ELIQ devices.

I'll see what I can do with just data from WebSocket.

Thomas-Rokeberg commented 10 months ago

Is it posible to append {"fullCls":"ELIQ_EM_V1","val":239900.04164931,"v":2399.0004164931,"agt":"A3MAAAAdAEcVRzUzMTgxNA","devtype":"ELIQ_EM","me":"2713","idx":"EPA","lsid":"AwEGEPE1EAAAAAAAAAAAAA","type":126,"userid":"7568472","ts":1697732480690},"id":1} this to the responce from EpGetAll_res: ?

so it will generate the device i homeassistant?