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

2.1 update, no replaced sensors in lovelace #132

Closed
bbzkarim opened this issue May 29, 2020 · 7 comments
Closed

2.1 update, no replaced sensors in lovelace #132

bbzkarim opened this issue May 29, 2020 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@bbzkarim
Copy link

Just moved to 2.1 and have a th16 device was working great.
saw the update notes and changed the old settings:

sonoff:
username: xxxxx
password: xxxxx
scan_interval: '00:01:00' # (optional) default 5 minutes
devices:
sonoff_th16:
name: Sonoff TH
force_update: True

sensor:
- platform: template
sensors:
temperature_th:
friendly_name: Temperature
device_class: temperature
value_template: "{{ state_attr('switch.sonoff_th16', 'temperature') }}"
humidity_th:
friendly_name: Humidity
device_class: humidity
value_template: "{{ state_attr('switch.sonoff_th16', 'humidity') }}"

to this, removing templates and forced updates:

sonoff:
username: xxxxx
password: xxxxx
force_update: [temperature, humidity]
scan_interval: '00:01:00' # (optional) default 5 minutes
sensors: [temperature, humidity]

while i replaced old sensors with new setting in grafana and new readings are coming in, lovelace and HA arn't showing me the th16's temperature and humidity numbers as entities anymore and cant be used to see history or any other use

I've probably have missed something silly so help a bro out

@AlexxIT
Copy link
Owner

AlexxIT commented May 29, 2020

Please show logs https://youtu.be/Lt5fT4N5Pm8

New sensors has new names. Check in developer tools by deviceid.

@bbzkarim
Copy link
Author

bbzkarim commented May 29, 2020

New sensors has new names. Check in developer tools by deviceid.

I thought so, but the only entity is switch.sonoff_th16.
Humidity and temperatures are not shown as separate entities.

Log:

2020-05-29 18:19:03  DEBUG    main          SysInfo: {'version': '0.110.3', 'dev': False, 'hassio': False, 'virtualenv': False, 'python_version': '3.7.7', 'docker': True, 'arch': 'armv7l', 'os_name': 'Linux', 'os_version': '4.19.114-v7'}
2020-05-29 18:19:03  DEBUG    main          AUTO mode start
2020-05-29 18:19:15  DEBUG    sonoff_cloud  2 devices loaded from the Cloud Server
2020-05-29 18:19:15  DEBUG    main          Init force_update for attributes: {'humidity', 'temperature'}
2020-05-29 18:19:15  DEBUG    main          Init auto sensors for: ['temperature', 'humidity']
2020-05-29 18:19:15  DEBUG    main          100009c097 == Init   | {'uiid': 14, 'extra': {'manufacturer': 'Maker', 'model': 'Sonoff', 'sw_version': 'ITA-GZ1-GL v3.4.0'}, 'params': {'timers': [{'mId': '...', 'do': {'switch': 'off'}, 'type': 'repeat', 'at': '0 22 * * 1,2,3,4,5,6,0', 'coolkit_timer_type': 'repeat', 'enabled': 1}, {'mId': '...', 'do': {'switch': 'on'}, 'type': 'repeat', 'at': '0 16 * * 1,2,3,4,5,6,0', 'coolkit_timer_type': 'repeat', 'enabled': 1}], 'partnerApikey': '...', 'pulseWidth': 500, 'pulse': 'off', 'init': 1, 'startup': 'stay', 'staMac': '...', 'rssi': -81, 'fwVersion': '3.4.0', 'switch': 'off', 'sledOnline': 'on', 'version': 8, 'bindInfos': {'alexa': ['...'], 'gaction': ['...']}, 'cloud': 'online'}}
2020-05-29 18:19:15  DEBUG    main          10004b0106 == Init   | {'uiid': 15, 'extra': {'manufacturer': 'Sonoff', 'model': 'TH16', 'sw_version': 'PSA-BHA-GL v3.4.0'}, 'params': {'timers': [], 'partnerApikey': '...', 'targets': [{'targetHigh': '30', 'reaction': {'switch': 'off'}}, {'targetLow': '29', 'reaction': {'switch': 'on'}}], 'deviceType': 'normal', 'mainSwitch': 'on', 'pulseWidth': 500, 'pulse': 'off', 'init': 1, 'sledOnline': 'on', 'version': 8, 'sensorType': 'AM2301', 'currentHumidity': '42', 'currentTemperature': '25.9', 'startup': 'stay', 'staMac': '...', 'rssi': -52, 'fwVersion': '3.4.0', 'switch': 'on', 'bindInfos': {'alexa': ['...'], 'gaction': ['...']}, 'cloud': 'online'}}
2020-05-29 18:19:15  DEBUG    sonoff_local  100009c097 <= Local1 | {'switch': 'off', 'startup': 'stay', 'pulse': 'off', 'sledOnline': 'on', 'pulseWidth': 500, 'rssi': -81}
2020-05-29 18:19:15  DEBUG    sonoff_local  10004b0106 <= Local1 | {'mainSwitch': 'on', 'deviceType': 'normal', 'targets': [{'targetHigh': 30, 'reaction': {'switch': 'off'}}, {'targetLow': 29, 'reaction': {'switch': 'on'}}], 'switch': 'on', 'startup': 'stay', 'pulse': 'off', 'pulseWidth': 500, 'sledOnline': 'on', 'sensorType': 'AM2301', 'humidity': 42, 'temperature': 25.94}
2020-05-29 18:19:16  DEBUG    sonoff_cloud  Cloud init: {'error': 0, 'apikey': '...', 'config': {'hb': 1, 'hbInterval': 145}, 'sequence': '1590769156423'}
2020-05-29 18:19:58  DEBUG    sonoff_local  10004b0106 <= Local3 | {'mainSwitch': 'on', 'deviceType': 'normal', 'targets': [{'targetHigh': 30, 'reaction': {'switch': 'off'}}, {'targetLow': 29, 'reaction': {'switch': 'on'}}], 'switch': 'on', 'startup': 'stay', 'pulse': 'off', 'pulseWidth': 500, 'sledOnline': 'on', 'sensorType': 'AM2301', 'humidity': 39, 'temperature': 26.54}
2020-05-29 18:19:58  DEBUG    sonoff_cloud  10004b0106 <= Cloud3 | {'action': 'update', 'deviceid': '10004b0106', 'apikey': '...', 'userAgent': 'device', 'ts': 0, 'params': {'currentHumidity': '39', 'currentTemperature': '26.5'}, 'from': 'device'}
2020-05-29 18:20:12  DEBUG    sonoff_local  10004b0106 => Local4 | {'switch': 'off', 'mainSwitch': 'off', 'deviceType': 'normal'} <= {'seq': 36, 'sequence': '1590769211940', 'error': 0}
2020-05-29 18:20:12  DEBUG    sonoff_local  10004b0106 <= Local3 | {'mainSwitch': 'off', 'deviceType': 'normal', 'targets': [{'targetHigh': 30, 'reaction': {'switch': 'off'}}, {'targetLow': 29, 'reaction': {'switch': 'on'}}], 'switch': 'off', 'startup': 'stay', 'pulse': 'off', 'pulseWidth': 500, 'sledOnline': 'on', 'sensorType': 'AM2301', 'humidity': 39, 'temperature': 26.54}
2020-05-29 18:20:12  DEBUG    sonoff_cloud  10004b0106 <= Cloud3 | {'action': 'update', 'deviceid': '10004b0106', 'apikey': '...', 'userAgent': 'device', 'sequence': '1590769211940', 'ts': 0, 'params': {'switch': 'off'}, 'from': 'device', 'seq': '36'}
2020-05-29 18:20:13  DEBUG    sonoff_local  10004b0106 => Local4 | {'switch': 'on', 'mainSwitch': 'on', 'deviceType': 'normal'} <= {'seq': 37, 'sequence': '1590769212870', 'error': 0}
2020-05-29 18:20:13  DEBUG    sonoff_cloud  10004b0106 <= Cloud3 | {'action': 'update', 'deviceid': '10004b0106', 'apikey': '...', 'userAgent': 'device', 'sequence': '1590769212870', 'ts': 0, 'params': {'switch': 'on'}, 'from': 'device', 'seq': '37'}
2020-05-29 18:20:13  DEBUG    sonoff_local  10004b0106 <= Local3 | {'mainSwitch': 'on', 'deviceType': 'normal', 'targets': [{'targetHigh': 30, 'reaction': {'switch': 'off'}}, {'targetLow': 29, 'reaction': {'switch': 'on'}}], 'switch': 'on', 'startup': 'stay', 'pulse': 'off', 'pulseWidth': 500, 'sledOnline': 'on', 'sensorType': 'AM2301', 'humidity': 39, 'temperature': 26.54}
2020-05-29 18:20:14  DEBUG    sonoff_local  10004b0106 => Local4 | {'switch': 'off', 'mainSwitch': 'off', 'deviceType': 'normal'} <= {'seq': 38, 'sequence': '1590769214129', 'error': 0}
2020-05-29 18:20:14  DEBUG    sonoff_cloud  10004b0106 <= Cloud3 | {'action': 'update', 'deviceid': '10004b0106', 'apikey': '...', 'userAgent': 'device', 'sequence': '1590769214129', 'ts': 0, 'params': {'switch': 'off'}, 'from': 'device', 'seq': '38'}
2020-05-29 18:20:14  DEBUG    sonoff_local  10004b0106 <= Local3 | {'mainSwitch': 'off', 'deviceType': 'normal', 'targets': [{'targetHigh': 30, 'reaction': {'switch': 'off'}}, {'targetLow': 29, 'reaction': {'switch': 'on'}}], 'switch': 'off', 'startup': 'stay', 'pulse': 'off', 'pulseWidth': 500, 'sledOnline': 'on', 'sensorType': 'AM2301', 'humidity': 39, 'temperature': 26.54}
2020-05-29 18:20:15  DEBUG    sonoff_local  10004b0106 => Local4 | {'switch': 'on', 'mainSwitch': 'on', 'deviceType': 'normal'} <= {'seq': 39, 'sequence': '1590769215112', 'error': 0}
2020-05-29 18:20:15  DEBUG    sonoff_local  10004b0106 <= Local3 | {'mainSwitch': 'on', 'deviceType': 'normal', 'targets': [{'targetHigh': 30, 'reaction': {'switch': 'off'}}, {'targetLow': 29, 'reaction': {'switch': 'on'}}], 'switch': 'on', 'startup': 'stay', 'pulse': 'off', 'pulseWidth': 500, 'sledOnline': 'on', 'sensorType': 'AM2301', 'humidity': 39, 'temperature': 26.54}
2020-05-29 18:20:15  DEBUG    sonoff_cloud  10004b0106 <= Cloud3 | {'action': 'update', 'deviceid': '10004b0106', 'apikey': '...', 'userAgent': 'device', 'sequence': '1590769215112', 'ts': 0, 'params': {'switch': 'on'}, 'from': 'device', 'seq': '39'}
2020-05-29 18:20:17  DEBUG    sonoff_local  100009c097 => Local4 | {'switch': 'on'} <= {'seq': 7, 'sequence': '1590769217600', 'error': 0}
2020-05-29 18:20:17  DEBUG    sonoff_local  100009c097 <= Local3 | {'switch': 'on', 'startup': 'stay', 'pulse': 'off', 'sledOnline': 'on', 'pulseWidth': 500, 'rssi': -81}
2020-05-29 18:20:17  DEBUG    sonoff_cloud  100009c097 <= Cloud3 | {'action': 'update', 'deviceid': '100009c097', 'apikey': '...', 'userAgent': 'device', 'sequence': '1590769217600', 'ts': 0, 'params': {'switch': 'on'}, 'from': 'device', 'seq': '7'}
2020-05-29 18:20:18  DEBUG    sonoff_local  100009c097 => Local4 | {'switch': 'off'} <= {'seq': 8, 'sequence': '1590769218597', 'error': 0}
2020-05-29 18:20:18  DEBUG    sonoff_cloud  100009c097 <= Cloud3 | {'action': 'update', 'deviceid': '100009c097', 'apikey': '...', 'userAgent': 'device', 'sequence': '1590769218597', 'ts': 0, 'params': {'switch': 'off'}, 'from': 'device', 'seq': '8'}
2020-05-29 18:20:18  DEBUG    sonoff_local  100009c097 <= Local3 | {'switch': 'off', 'startup': 'stay', 'pulse': 'off', 'sledOnline': 'on', 'pulseWidth': 500, 'rssi': -81}
2020-05-29 18:20:19  DEBUG    sonoff_local  100009c097 => Local4 | {'switch': 'on'} <= {'seq': 9, 'sequence': '1590769219657', 'error': 0}
2020-05-29 18:20:19  DEBUG    sonoff_local  100009c097 <= Local3 | {'switch': 'on', 'startup': 'stay', 'pulse': 'off', 'sledOnline': 'on', 'pulseWidth': 500, 'rssi': -81}
2020-05-29 18:20:19  DEBUG    sonoff_cloud  100009c097 <= Cloud3 | {'action': 'update', 'deviceid': '100009c097', 'apikey': '...', 'userAgent': 'device', 'sequence': '1590769219657', 'ts': 0, 'params': {'switch': 'on'}, 'from': 'device', 'seq': '9'}
2020-05-29 18:20:20  DEBUG    sonoff_local  100009c097 => Local4 | {'switch': 'off'} <= {'seq': 10, 'sequence': '1590769220526', 'error': 0}
2020-05-29 18:20:20  DEBUG    sonoff_cloud  100009c097 <= Cloud3 | {'action': 'update', 'deviceid': '100009c097', 'apikey': '...', 'userAgent': 'device', 'sequence': '1590769220526', 'ts': 0, 'params': {'switch': 'off'}, 'from': 'device', 'seq': '10'}
2020-05-29 18:20:20  DEBUG    sonoff_local  100009c097 <= Local3 | {'switch': 'off', 'startup': 'stay', 'pulse': 'off', 'sledOnline': 'on', 'pulseWidth': 500, 'rssi': -81}

@AlexxIT
Copy link
Owner

AlexxIT commented May 31, 2020

Thanks. I understood the problem. Will fix it

@AlexxIT AlexxIT added the bug Something isn't working label May 31, 2020
@andystewart999
Copy link

Hi - in case it helps, here's my debug log as well. I've got a TH10, same issue in that the temperature sensor isn't being created.

BTW, thanks for the hard work you're putting into this @AlexxIT , it's really appreciated :-)

2020-06-01 11:08:57  DEBUG    main          SysInfo: {'version': '0.110.3', 'dev': False, 'hassio': False, 'virtualenv': False, 'python_version': '3.7.7', 'docker': True, 'arch': 'armv7l', 'os_name': 'Linux', 'os_version': '4.19.114-v7l'}
2020-06-01 11:08:57  DEBUG    main          AUTO mode start
2020-06-01 11:09:03  DEBUG    sonoff_cloud  Redirect to region: us
2020-06-01 11:09:07  DEBUG    sonoff_cloud  3 devices loaded from the Cloud Server
2020-06-01 11:09:07  DEBUG    main          Init force_update for attributes: {'temperature'}
2020-06-01 11:09:07  DEBUG    main          Init auto sensors for: ['temperature']
2020-06-01 11:09:07  DEBUG    main          1000c029b8 == Init   | {'uiid': 1, 'extra': {'manufacturer': 'SONOFF', 'model': 'BASIC', 'sw_version': 'PSF-B01-GL v3.4.0'}, 'params': {'version': 8, 'sledOnline': 'on', 'switch': 'off', 'fwVersion': '3.4.0', 'rssi': -58, 'staMac': '...', 'startup': 'off', 'init': 1, 'pulse': 'off', 'pulseWidth': 500, 'cloud': 'offline'}}
2020-06-01 11:09:07  DEBUG    main          1000c029a6 == Init   | {'uiid': 1, 'extra': {'manufacturer': 'SONOFF', 'model': 'BASIC', 'sw_version': 'PSF-B01-GL v3.4.0'}, 'params': {'version': 8, 'sledOnline': 'on', 'switch': 'on', 'fwVersion': '3.4.0', 'rssi': -61, 'staMac': '...', 'startup': 'off', 'init': 1, 'pulse': 'off', 'pulseWidth': 500, 'cloud': 'offline'}}
2020-06-01 11:09:07  DEBUG    main          10008516f0 == Init   | {'uiid': 15, 'extra': {'manufacturer': 'SONOFF', 'model': 'TH10', 'sw_version': 'PSA-BHA-GL v3.4.0'}, 'params': {'init': 1, 'rssi': -64, 'staMac': '...', 'startup': 'off', 'fwVersion': '3.4.0', 'switch': 'off', 'sensorType': 'DS18B20', 'currentTemperature': '14.8', 'currentHumidity': 'unavailable', 'mainSwitch': 'off', 'deviceType': 'normal', 'version': 8, 'sledOnline': 'on', 'pulse': 'off', 'pulseWidth': 500, 'cloud': 'online'}}
2020-06-01 11:09:07  DEBUG    sonoff_local  10008516f0 <= Local1 | {'deviceType': 'normal', 'switch': 'off', 'startup': 'off', 'pulse': 'off', 'pulseWidth': 500, 'sledOnline': 'on', 'sensorType': 'DS18B20', 'humidity': 0, 'temperature': 14.86}
2020-06-01 11:09:09  DEBUG    sonoff_cloud  Cloud init: {'error': 0, 'apikey': '...', 'config': {'hb': 1, 'hbInterval': 145}, 'sequence': '1590973748957'}

@AlexxIT AlexxIT self-assigned this Jun 2, 2020
@AlexxIT
Copy link
Owner

AlexxIT commented Jun 2, 2020

Fixed https://github.com/AlexxIT/SonoffLAN/releases/tag/v2.1.2
Please feedback

@bbzkarim
Copy link
Author

bbzkarim commented Jun 2, 2020

Fixed https://github.com/AlexxIT/SonoffLAN/releases/tag/v2.1.2
Please feedback

works perfectly now Alex, cheers man 🍻

@andystewart999
Copy link

Yep, all good. Awesome!

@AlexxIT AlexxIT closed this as completed Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants