peterbuga / HASS-sonoff-ewelink

Home Assistant component to control Sonoff/eWeLink devices with original firmware
MIT License
791 stars 296 forks source link

Lovelace Badge Not Updating #221

Closed ropeguru closed 4 years ago

ropeguru commented 4 years ago

Running a single TH10 on the account with temperature sensor and latest firmware.

Switching is working as expected and it appears the script is polling every 10 or 11 seconds based on running a debug. However, it doesn't appear that the badge created on the Lovelace interface is updating on a regular basis. If I do not restart HA, then then number of hours since last update just increases.

Is the a script or HASSIO/Lovelace issue?

Apologies if I should be posting this somewhere else.

Config:

sonoff: username: email password: password scan_interval: 61 api_region: us debug: True

Partial debug capture:

2020-03-18 12:54:00.525 [D] {"devicelist": [{"__v": 0, "_id": "5e6e8e1cadcca9000869d082", "apikey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "brandLogoUrl": "https://us-ota.coolkit.cc/logo/M9Fq6usGzZ6oGIr7E3c5bsvI01c1sdjt.png", "brandName": "Sonoff", "createdAt": "2020-03-15T20:20:44.970Z", "devConfig": {}, "devGroups": [], "deviceStatus": "", "deviceUrl": "https://us-api.coolkit.cc/api/detail/5a2e1add0cf772f92c342ef4_en.html", "deviceid": "10006d44ec", "devicekey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "extra": {"_id": "5c06215be1c3c507637f7e19", "extra": {"apmac": "xx:xx:xx:xx:xx:xx", "brandId": "58e5f344baeb368720e25469", "chipid": "0091BE49", "description": "WO1882049", "mac": "xx:xx:xx:xx:xx:xx", "manufacturer": "\u6df1\u5733\u677e\u8bfa\u6280\u672f\u6709\u9650\u516c\u53f8", "model": "PSA-BHA-GL", "modelInfo": "5a2e1add0cf772f92c342ef4", "staMac": "xx:xx:xx:xx:xx:xx", "ui": "\u6052\u6e29\u6052\u6e7f\u6539\u88c5\u4ef6", "uiid": 15}}, "group": "", "groups": [], "ip": "[hidden]", "location": "", "name": "Fish Monitor", "offlineTime": "2020-03-15T22:15:03.039Z", "online": true, "onlineTime": "2020-03-15T22:15:59.986Z", "params": {"currentHumidity": "unavailable", "currentTemperature": "23.1", "deviceType": "normal", "fwVersion": "3.4.0", "init": 1, "mainSwitch": "off", "pulse": "off", "pulseWidth": 500, "rssi": -59, "sensorType": "DS18B20", "sledOnline": "on", "staMac": "xx:xx:xx:xx:xx:xx", "startup": "off", "switch": "off", "version": 8}, "productModel": "TH10", "settings": {"alarmNotify": 1, "appDoorbellNotify": 1, "opsHistory": 1, "opsNotify": 0, "wxAlarmNotify": 0, "wxDoorbellNotify": 0, "wxOpsNotify": 0}, "shareUsersInfo": [], "sharedTo": [], "showBrand": true, "type": "10", "uiid": 15}], "error": 0}

2020-03-18 12:54:11.533 [D] {"devicelist": [{"__v": 0, "_id": "5e6e8e1cadcca9000869d082", "apikey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "brandLogoUrl": "https://us-ota.coolkit.cc/logo/M9Fq6usGzZ6oGIr7E3c5bsvI01c1sdjt.png", "brandName": "Sonoff", "createdAt": "2020-03-15T20:20:44.970Z", "devConfig": {}, "devGroups": [], "deviceStatus": "", "deviceUrl": "https://us-api.coolkit.cc/api/detail/5a2e1add0cf772f92c342ef4_en.html", "deviceid": "10006d44ec", "devicekey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "extra": {"_id": "5c06215be1c3c507637f7e19", "extra": {"apmac": "xx:xx:xx:xx:xx:xx", "brandId": "58e5f344baeb368720e25469", "chipid": "0091BE49", "description": "WO1882049", "mac": "xx:xx:xx:xx:xx:xx", "manufacturer": "\u6df1\u5733\u677e\u8bfa\u6280\u672f\u6709\u9650\u516c\u53f8", "model": "PSA-BHA-GL", "modelInfo": "5a2e1add0cf772f92c342ef4", "staMac": "xx:xx:xx:xx:xx:xx", "ui": "\u6052\u6e29\u6052\u6e7f\u6539\u88c5\u4ef6", "uiid": 15}}, "group": "", "groups": [], "ip": "[hidden]", "location": "", "name": "Fish Monitor", "offlineTime": "2020-03-15T22:15:03.039Z", "online": true, "onlineTime": "2020-03-15T22:15:59.986Z", "params": {"currentHumidity": "unavailable", "currentTemperature": "23.1", "deviceType": "normal", "fwVersion": "3.4.0", "init": 1, "mainSwitch": "off", "pulse": "off", "pulseWidth": 500, "rssi": -59, "sensorType": "DS18B20", "sledOnline": "on", "staMac": "xx:xx:xx:xx:xx:xx", "startup": "off", "switch": "off", "version": 8}, "productModel": "TH10", "settings": {"alarmNotify": 1, "appDoorbellNotify": 1, "opsHistory": 1, "opsNotify": 0, "wxAlarmNotify": 0, "wxDoorbellNotify": 0, "wxOpsNotify": 0}, "shareUsersInfo": [], "sharedTo": [], "showBrand": true, "type": "10", "uiid": 15}], "error": 0}

2020-03-18 12:54:22.842 [D] {"devicelist": [{"__v": 0, "_id": "5e6e8e1cadcca9000869d082", "apikey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "brandLogoUrl": "https://us-ota.coolkit.cc/logo/M9Fq6usGzZ6oGIr7E3c5bsvI01c1sdjt.png", "brandName": "Sonoff", "createdAt": "2020-03-15T20:20:44.970Z", "devConfig": {}, "devGroups": [], "deviceStatus": "", "deviceUrl": "https://us-api.coolkit.cc/api/detail/5a2e1add0cf772f92c342ef4_en.html", "deviceid": "10006d44ec", "devicekey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "extra": {"_id": "5c06215be1c3c507637f7e19", "extra": {"apmac": "xx:xx:xx:xx:xx:xx", "brandId": "58e5f344baeb368720e25469", "chipid": "0091BE49", "description": "WO1882049", "mac": "xx:xx:xx:xx:xx:xx", "manufacturer": "\u6df1\u5733\u677e\u8bfa\u6280\u672f\u6709\u9650\u516c\u53f8", "model": "PSA-BHA-GL", "modelInfo": "5a2e1add0cf772f92c342ef4", "staMac": "xx:xx:xx:xx:xx:xx", "ui": "\u6052\u6e29\u6052\u6e7f\u6539\u88c5\u4ef6", "uiid": 15}}, "group": "", "groups": [], "ip": "[hidden]", "location": "", "name": "Fish Monitor", "offlineTime": "2020-03-15T22:15:03.039Z", "online": true, "onlineTime": "2020-03-15T22:15:59.986Z", "params": {"currentHumidity": "unavailable", "currentTemperature": "23.1", "deviceType": "normal", "fwVersion": "3.4.0", "init": 1, "mainSwitch": "off", "pulse": "off", "pulseWidth": 500, "rssi": -59, "sensorType": "DS18B20", "sledOnline": "on", "staMac": "xx:xx:xx:xx:xx:xx", "startup": "off", "switch": "off", "version": 8}, "productModel": "TH10", "settings": {"alarmNotify": 1, "appDoorbellNotify": 1, "opsHistory": 1, "opsNotify": 0, "wxAlarmNotify": 0, "wxDoorbellNotify": 0, "wxOpsNotify": 0}, "shareUsersInfo": [], "sharedTo": [], "showBrand": true, "type": "10", "uiid": 15}], "error": 0}

2020-03-18 12:54:33.697 [D] {"devicelist": [{"__v": 0, "_id": "5e6e8e1cadcca9000869d082", "apikey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "brandLogoUrl": "https://us-ota.coolkit.cc/logo/M9Fq6usGzZ6oGIr7E3c5bsvI01c1sdjt.png", "brandName": "Sonoff", "createdAt": "2020-03-15T20:20:44.970Z", "devConfig": {}, "devGroups": [], "deviceStatus": "", "deviceUrl": "https://us-api.coolkit.cc/api/detail/5a2e1add0cf772f92c342ef4_en.html", "deviceid": "10006d44ec", "devicekey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "extra": {"_id": "5c06215be1c3c507637f7e19", "extra": {"apmac": "xx:xx:xx:xx:xx:xx", "brandId": "58e5f344baeb368720e25469", "chipid": "0091BE49", "description": "WO1882049", "mac": "xx:xx:xx:xx:xx:xx", "manufacturer": "\u6df1\u5733\u677e\u8bfa\u6280\u672f\u6709\u9650\u516c\u53f8", "model": "PSA-BHA-GL", "modelInfo": "5a2e1add0cf772f92c342ef4", "staMac": "xx:xx:xx:xx:xx:xx", "ui": "\u6052\u6e29\u6052\u6e7f\u6539\u88c5\u4ef6", "uiid": 15}}, "group": "", "groups": [], "ip": "[hidden]", "location": "", "name": "Fish Monitor", "offlineTime": "2020-03-15T22:15:03.039Z", "online": true, "onlineTime": "2020-03-15T22:15:59.986Z", "params": {"currentHumidity": "unavailable", "currentTemperature": "23.1", "deviceType": "normal", "fwVersion": "3.4.0", "init": 1, "mainSwitch": "off", "pulse": "off", "pulseWidth": 500, "rssi": -59, "sensorType": "DS18B20", "sledOnline": "on", "staMac": "xx:xx:xx:xx:xx:xx", "startup": "off", "switch": "off", "version": 8}, "productModel": "TH10", "settings": {"alarmNotify": 1, "appDoorbellNotify": 1, "opsHistory": 1, "opsNotify": 0, "wxAlarmNotify": 0, "wxDoorbellNotify": 0, "wxOpsNotify": 0}, "shareUsersInfo": [], "sharedTo": [], "showBrand": true, "type": "10", "uiid": 15}], "error": 0}

peterbuga commented 4 years ago

it’s related to the fact 3+ firmwares don’t actively send sensors data anymore

Sent with GitHawk