SonoffLAN: Sonoff Dual R3 Consumption not working

When I run the Service Sonoff: update_consumption i just get a timeout error in my SonoffDebug log and no data is populated from my Dual R3 in Switch Mode. The eWeLink App shows the consumtion as normal. I believe this has never been working so far

2021-08-23 12:07:34  DEBUG    main          SysInfo: {'version': '2021.8.7', 'dev': False, 'hassio': True, 'virtualenv': False, 'python_version': '3.9.6', 'docker': True, 'user': 'root', 'arch': 'armv7l', 'os_name': 'Linux', 'os_version': '5.10.17-v7l', 'supervisor': '2021.06.8', 'host_os': 'Home Assistant OS 6.2', 'docker_version': '20.10.6', 'chassis': 'embedded'}
2021-08-23 12:07:34  DEBUG    main          AUTO mode start
2021-08-23 12:07:37  DEBUG    sonoff_cloud  2 devices loaded from the Cloud Server
2021-08-23 12:07:37  DEBUG    main          Init force_update for attributes: {'power'}
2021-08-23 12:07:37  DEBUG    main          Init auto sensors for: ['voltage', 'current', 'power', 'consumption', 'current_1', 'current_2', 'voltage_1', 'voltage_2', 'power_1', 'power_2']
2021-08-23 12:07:37  DEBUG    main          10008dc2cb == Init   | {'uiid': 11, 'extra': {'manufacturer': 'KingArt', 'model': ' ', 'sw_version': 'PSF-BTA-GL v3.4.0'}, 'params': {'timers': [], 'sledOnline': 'off', 'rssi': -84, 'fwVersion': '3.4.0', 'staMac': '...', 'switch': 'on', 'setclose': 0, 'bindInfos': {'alexa': ['...']}, 'version': 8, 'only_device': {'ota': 'success'}, 'ssid': '...', 'bssid': '...', 'cloud': 'offline'}}
2021-08-23 12:07:37  DEBUG    main          10012730ba == Init   | {'uiid': 126, 'extra': {'manufacturer': 'SONOFF', 'model': 'DUALR3', 'sw_version': 'E32-2SW-P0 v1.3.0'}, 'params': {'bindInfos': {'alexa': ['...']}, 'version': 7, 'workMode': 1, 'motorSwMode': 2, 'motorSwReverse': 0, 'outputReverse': 0, 'motorTurn': 0, 'calibState': 0, 'currLocation': 0, 'location': 0, 'sledBright': 0, 'staMac': '3C61054B49C8', 'rssi': -60, 'overload_00': {'minActPow': {'enabled': 0, 'value': 10}, 'maxVoltage': {'enabled': 0, 'value': 24000}, 'minVoltage': {'enabled': 0, 'value': 10}, 'maxCurrent': {'enabled': 1, 'value': 400}, 'maxActPow': {'enabled': 1, 'value': 50000}}, 'overload_01': {'minActPow': {'enabled': 0, 'value': 10}, 'maxVoltage': {'enabled': 0, 'value': 24000}, 'minVoltage': {'enabled': 0, 'value': 10}, 'maxCurrent': {'enabled': 0, 'value': 1500}, 'maxActPow': {'enabled': 0, 'value': 360000}}, 'oneKwhState_00': 1, 'startTime_00': '2021-07-24T10:12:35.650Z', 'endTime_00': '', 'oneKwhState_01': 0, 'startTime_01': '', 'endTime_01': '', 'oneKwhData_00': 2741, 'oneKwhData_01': 0, 'current_00': 3, 'voltage_00': 23725, 'actPow_00': 0, 'reactPow_00': 806, 'apparentPow_00': 806, 'current_01': 0, 'voltage_01': 23725, 'actPow_01': 0, 'reactPow_01': 0, 'apparentPow_01': 0, 'fwVersion': '1.3.0', 'timeZone': 2, 'swMode_00': 2, 'swMode_01': 2, 'swReverse_00': 0, 'swReverse_01': 0, 'zyx_clear_timers': True, 'switches': [{'switch': 'on', 'outlet': 0}, {'switch': 'off', 'outlet': 1}], 'configure': [{'startup': 'on', 'outlet': 0}, {'startup': 'off', 'outlet': 1}], 'pulses': [{'pulse': 'off', 'width': 1000, 'outlet': 0}, {'pulse': 'off', 'width': 1000, 'outlet': 1}], 'uiActive': {'outlet': 0, 'time': 60}, 'getKwh_00': 2, 'getKwh_01': 2, 'timers': [], 'initSetting': 1, 'cloud': 'online'}}
2021-08-23 12:07:37  DEBUG    sonoff_cloud  Start refresh task for 1 POW
2021-08-23 12:07:37  DEBUG    sonoff_local  10012730ba <= Local1 | {'current_00': 46, 'voltage_00': 23581, 'actPow_00': 10728, 'reactPow_00': 2028, 'apparentPow_00': 10918} | 31540
2021-08-23 12:07:37  DEBUG    sonoff_cloud  Cloud init: {'error': 0, 'apikey': '...', 'config': {'hb': 1, 'hbInterval': 145}, 'sequence': '1629713257885'}
2021-08-23 12:08:27  DEBUG    sonoff_cloud  Update consumption for all devices
2021-08-23 12:08:27  DEBUG    sonoff_cloud  10012730ba => Cloud4 | {'hundredDaysKwh': 'get'} | 1629713307574
2021-08-23 12:08:32  DEBUG    sonoff_cloud  10012730ba <= Cloud3 | {'error': 504, 'reason': 'Request Timeout', 'deviceid': '10012730ba', 'apikey': '...', 'sequence': '1629713307574'}
2021-08-23 12:08:37  DEBUG    sonoff_cloud  10012730ba => Cloud4 | {'uiActive': 7200} | 1629713317718
2021-08-23 12:08:37  DEBUG    sonoff_cloud  10012730ba <= Cloud3 | {'error': 400, 'deviceid': '10012730ba', 'apikey': '...', 'sequence': '1629713317718'}
2021-08-23 12:09:33  DEBUG    sonoff_cloud  10008dc2cb <= Cloud3 | {'action': 'sysmsg', 'deviceid': '10008dc2cb', 'apikey': '...', 'params': {'online': True}}
2021-08-23 12:09:33  DEBUG    sonoff_cloud  10008dc2cb <= Cloud3 | {'action': 'update', 'deviceid': '10008dc2cb', 'apikey': '...', 'userAgent': 'device', 'd_seq': 483, 'params': {'sledOnline': 'off', 'ssid': '...', 'bssid': '...'}, 'from': 'device'}
2021-08-23 12:09:34  DEBUG    sonoff_cloud  10008dc2cb <= Cloud3 | {'action': 'update', 'deviceid': '10008dc2cb', 'apikey': '...', 'userAgent': 'device', 'params': {'rssi': -85, 'fwVersion': '3.4.0', 'staMac': '...'}, 'from': 'device'}
2021-08-23 12:09:35  DEBUG    sonoff_cloud  10012730ba <= Cloud3 | {'action': 'update', 'deviceid': '10012730ba', 'apikey': '...', 'userAgent': 'app', 'sequence': '1629713374931', 'params': {'getKwh_00': 2}, 'tempRec': '10012730ba'}
2021-08-23 12:09:48  DEBUG    sonoff_cloud  10008dc2cb <= Cloud3 | {'action': 'update', 'deviceid': '10008dc2cb', 'apikey': '...', 'userAgent': 'device', 'params': {'switch': 'on', 'setclose': 0}, 'from': 'device'}
2021-08-23 12:09:48  DEBUG    sonoff_cloud  10008dc2cb <= Cloud3 | {'action': 'update', 'deviceid': '10008dc2cb', 'apikey': '...', 'userAgent': 'device', 'params': {'switch': 'on', 'setclose': 0}, 'from': 'device'}
2021-08-23 12:09:56  DEBUG    sonoff_cloud  10012730ba <= Cloud3 | {'action': 'update', 'deviceid': '10012730ba', 'apikey': '...', 'userAgent': 'app', 'sequence': '1629713396287', 'params': {'getKwh_00': 2}, 'tempRec': '10012730ba'}
2021-08-23 12:09:58  DEBUG    sonoff_cloud  10012730ba <= Cloud3 | {'action': 'update', 'deviceid': '10012730ba', 'apikey': '...', 'userAgent': 'app', 'sequence': '1629713398224', 'params': {'getKwh_01': 2}, 'tempRec': '10012730ba'}
2021-08-23 12:10:00  DEBUG    sonoff_local  10012730ba <= Local3 | {'switches': [{'switch': 'on', 'outlet': 0}, {'switch': 'on', 'outlet': 1}]} | 31547
2021-08-23 12:10:01  DEBUG    sonoff_cloud  10012730ba <= Cloud3 | {'action': 'update', 'deviceid': '10012730ba', 'apikey': '...', 'userAgent': 'device', 'sequence': '1629713400887', 'd_seq': 9284, 'params': {'switches': [{'switch': 'on', 'outlet': 0}, {'switch': 'on', 'outlet': 1}]}, 'from': 'device', 'seq': '31547'}
2021-08-23 12:10:01  DEBUG    sonoff_main   Skip update with same sequence
2021-08-23 12:10:02  DEBUG    sonoff_cloud  10012730ba <= Cloud3 | {'action': 'update', 'deviceid': '10012730ba', 'apikey': '...', 'userAgent': 'device', 'sequence': '1629713402189', 'd_seq': 2615, 'params': {'switches': [{'switch': 'on', 'outlet': 0}, {'switch': 'off', 'outlet': 1}]}, 'from': 'device', 'seq': '31548'}
2021-08-23 12:10:03  DEBUG    sonoff_local  10012730ba <= Local3 | {'switches': [{'switch': 'on', 'outlet': 0}, {'switch': 'off', 'outlet': 1}]} | 31548
2021-08-23 12:10:03  DEBUG    sonoff_main   Skip update with same sequence
2021-08-23 12:10:04  DEBUG    sonoff_cloud  10012730ba <= Cloud3 | {'action': 'update', 'deviceid': '10012730ba', 'apikey': '...', 'userAgent': 'app', 'sequence': '1629713404430', 'params': {'getKwh_01': 2}, 'tempRec': '10012730ba'}
2021-08-23 12:10:05  DEBUG    sonoff_cloud  10012730ba <= Cloud3 | {'action': 'update', 'deviceid': '10012730ba', 'apikey': '...', 'userAgent': 'app', 'sequence': '1629713405769', 'params': {'getKwh_00': 2}, 'tempRec': '10012730ba'}
2021-08-23 12:10:53  DEBUG    sonoff_cloud  Update consumption for all devices
2021-08-23 12:10:53  DEBUG    sonoff_cloud  10012730ba => Cloud4 | {'hundredDaysKwh': 'get'} | 1629713453867
2021-08-23 12:10:58  DEBUG    sonoff_cloud  10012730ba <= Cloud3 | {'error': 504, 'reason': 'Request Timeout', 'deviceid': '10012730ba', 'apikey': '...', 'sequence': '1629713453867'}

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 18 (6 by maintainers)

Most upvoted comments

It is known issue. R3 using different API

any chance it can be implemented?

@GreLabru you always can use something like https://www.home-assistant.io/integrations/utility_meter/ to collect energy from any integration

i believe this is what’s needed: https://www.home-assistant.io/integrations/integration/#energy sonoff integration provides power readings, using the above we can have the energy reading that can be added in HA energy dashboard. Thanks @AlexxIT for supporting the relays.

I am having the same issue where there is a timeout error when querying the cloud for power usage.

2021-08-30 09:27:16  DEBUG    main          SysInfo: {'version': '2021.8.4', 'dev': False, 'hassio': True, 'virtualenv': False, 'python_version': '3.9.6', 'docker': True, 'user': 'root', 'arch': 'x86_64', 'os_name': 'Linux', 'os_version': '5.4.109', 'supervisor': '2021.06.8', 'host_os': 'Home Assistant OS 5.13', 'docker_version': '19.03.15', 'chassis': 'vm'}
2021-08-30 09:27:16  DEBUG    main          AUTO mode start
2021-08-30 09:27:19  DEBUG    sonoff_cloud  Redirect to region: us
2021-08-30 09:27:21  DEBUG    sonoff_cloud  7 devices loaded from the Cloud Server
2021-08-30 09:27:21  DEBUG    main          Init force_update for attributes: {'voltage', 'power', 'current'}
2021-08-30 09:27:21  DEBUG    main          Init auto sensors for: ['power', 'current', 'voltage']
2021-08-30 09:27:21  DEBUG    main          1000fc2cee == Init   | {'uiid': 1, 'extra': {'manufacturer': 'SONOFF', 'model': 'BASIC', 'sw_version': 'PSF-B01-GL v3.5.1'}, 'params': {'version': 8, 'only_device': {'ota': 'success'}, 'sledOnline': 'on', 'ssid': '...', 'bssid': '...', 'switch': 'on', 'fwVersion': '3.5.1', 'rssi': -43, 'staMac': '...', 'startup': 'off', 'init': 1, 'pulse': 'off', 'pulseWidth': 500, 'cloud': 'online'}}
2021-08-30 09:27:21  DEBUG    main          1000fa9891 == Init   | {'uiid': 1, 'extra': {'manufacturer': 'SONOFF', 'model': 'MINI', 'sw_version': 'PSF-BD1-GL v3.6.0'}, 'params': {'version': 8, 'sledOnline': 'on', 'switch': 'on', 'fwVersion': '3.6.0', 'rssi': -73, 'staMac': '...', 'startup': 'off', 'init': 1, 'pulse': 'off', 'pulseWidth': 500, 'swMode': 2, 'swCtrlReverse': 'off', 'cloud': 'online'}}
2021-08-30 09:27:21  DEBUG    main          1000fabb67 == Init   | {'uiid': 1, 'extra': {'manufacturer': 'SONOFF', 'model': 'BASIC', 'sw_version': 'PSF-B01-GL v3.5.1'}, 'params': {'version': 8, 'only_device': {'ota': 'success'}, 'sledOnline': 'on', 'ssid': '...', 'bssid': '...', 'switch': 'off', 'fwVersion': '3.5.1', 'rssi': -67, 'staMac': '...', 'startup': 'off', 'init': 1, 'pulse': 'off', 'pulseWidth': 500, 'timers': [{'mId': '...', 'type': 'duration', 'at': '2021-08-09T05:52:00.214Z 60 30', 'coolkit_timer_type': 'duration', 'enabled': 1, 'startDo': {'switch': 'on'}, 'endDo': {'switch': 'off'}}], 'cloud': 'online'}}
2021-08-30 09:27:21  DEBUG    main          1000a81dc0 == Init   | {'uiid': 34, 'extra': {'manufacturer': 'SONOFF', 'model': 'iFan', 'sw_version': 'PSF-BFB-GL v3.5.0'}, 'params': {'version': 8, 'sledOnline': 'on', 'init': 1, 'fwVersion': '3.5.0', 'staMac': '...', 'rssi': -40, 'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}, {'switch': 'off', 'outlet': 2}, {'switch': 'off', 'outlet': 3}], 'configure': [{'startup': 'on', 'outlet': 0}, {'startup': 'off', 'outlet': 1}, {'startup': 'stay', 'outlet': 2}, {'startup': 'stay', 'outlet': 3}], 'only_device': {'ota': 'success'}, 'ssid': '...', 'bssid': '...', 'cloud': 'offline'}}
2021-08-30 09:27:21  DEBUG    main          1000fb2a55 == Init   | {'uiid': 1, 'extra': {'manufacturer': 'SONOFF', 'model': 'BASIC', 'sw_version': 'PSF-B01-GL v3.5.1'}, 'params': {'version': 8, 'only_device': {'ota': 'success'}, 'sledOnline': 'on', 'ssid': '...', 'bssid': '...', 'switch': 'off', 'fwVersion': '3.5.1', 'rssi': -55, 'staMac': '...', 'startup': 'off', 'init': 1, 'pulse': 'off', 'pulseWidth': 500, 'cloud': 'online'}}
2021-08-30 09:27:21  DEBUG    main          1001339fc3 == Init   | {'uiid': 126, 'extra': {'manufacturer': 'SONOFF', 'model': 'DUALR3', 'sw_version': 'E32-2SW-P0 v1.3.0'}, 'params': {'version': 7, 'workMode': 1, 'motorSwMode': 2, 'motorSwReverse': 0, 'outputReverse': 0, 'motorTurn': 0, 'calibState': 0, 'currLocation': 0, 'location': 0, 'sledBright': 100, 'staMac': '083AF22D1894', 'rssi': -50, 'overload_00': {'minActPow': {'enabled': 0, 'value': 10}, 'maxVoltage': {'enabled': 0, 'value': 24000}, 'minVoltage': {'enabled': 0, 'value': 10}, 'maxCurrent': {'enabled': 0, 'value': 1500}, 'maxActPow': {'enabled': 0, 'value': 360000}}, 'overload_01': {'minActPow': {'enabled': 0, 'value': 10}, 'maxVoltage': {'enabled': 0, 'value': 24000}, 'minVoltage': {'enabled': 0, 'value': 10}, 'maxCurrent': {'enabled': 0, 'value': 1500}, 'maxActPow': {'enabled': 0, 'value': 360000}}, 'oneKwhState_00': 0, 'startTime_00': '', 'endTime_00': '', 'oneKwhState_01': 0, 'startTime_01': '', 'endTime_01': '', 'oneKwhData_00': 0, 'oneKwhData_01': 0, 'current_00': 7, 'voltage_00': 12536, 'actPow_00': 881, 'reactPow_00': 246, 'apparentPow_00': 915, 'current_01': 4, 'voltage_01': 12546, 'actPow_01': 501, 'reactPow_01': 160, 'apparentPow_01': 526, 'fwVersion': '1.3.0', 'timeZone': -5, 'swMode_00': 3, 'swMode_01': 3, 'swReverse_00': 0, 'swReverse_01': 0, 'switches': [{'switch': 'on', 'outlet': 0}, {'switch': 'on', 'outlet': 1}], 'configure': [{'startup': 'stay', 'outlet': 0}, {'startup': 'stay', 'outlet': 1}], 'pulses': [{'pulse': 'off', 'width': 1000, 'outlet': 0}, {'pulse': 'off', 'width': 1000, 'outlet': 1}], 'uiActive': {'outlet': 0, 'time': 120}, 'getKwh_00': 2, 'cloud': 'online'}}
2021-08-30 09:27:21  DEBUG    main          1001339fe0 == Init   | {'uiid': 126, 'extra': {'manufacturer': 'SONOFF', 'model': 'DUALR3', 'sw_version': 'E32-2SW-P0 v1.3.0'}, 'params': {'version': 7, 'workMode': 1, 'motorSwMode': 2, 'motorSwReverse': 0, 'outputReverse': 0, 'motorTurn': 0, 'calibState': 0, 'currLocation': 0, 'location': 0, 'sledBright': 100, 'staMac': '083AF22D015C', 'rssi': -50, 'overload_00': {'minActPow': {'enabled': 0, 'value': 10}, 'maxVoltage': {'enabled': 0, 'value': 24000}, 'minVoltage': {'enabled': 0, 'value': 10}, 'maxCurrent': {'enabled': 0, 'value': 1500}, 'maxActPow': {'enabled': 0, 'value': 360000}}, 'overload_01': {'minActPow': {'enabled': 0, 'value': 10}, 'maxVoltage': {'enabled': 0, 'value': 24000}, 'minVoltage': {'enabled': 0, 'value': 10}, 'maxCurrent': {'enabled': 0, 'value': 1500}, 'maxActPow': {'enabled': 0, 'value': 360000}}, 'oneKwhState_00': 0, 'startTime_00': '', 'endTime_00': '', 'oneKwhState_01': 0, 'startTime_01': '', 'endTime_01': '', 'oneKwhData_00': 0, 'oneKwhData_01': 0, 'current_00': 11, 'voltage_00': 12496, 'actPow_00': 986, 'reactPow_00': 1062, 'apparentPow_00': 1449, 'current_01': 19, 'voltage_01': 12516, 'actPow_01': 1535, 'reactPow_01': 1897, 'apparentPow_01': 2440, 'fwVersion': '1.3.0', 'timeZone': -5, 'swMode_00': 3, 'swMode_01': 3, 'swReverse_00': 0, 'swReverse_01': 0, 'switches': [{'switch': 'on', 'outlet': 0}, {'switch': 'on', 'outlet': 1}], 'configure': [{'startup': 'stay', 'outlet': 0}, {'startup': 'stay', 'outlet': 1}], 'pulses': [{'pulse': 'off', 'width': 1000, 'outlet': 0}, {'pulse': 'off', 'width': 1000, 'outlet': 1}], 'uiActive': {'outlet': 1, 'time': 120}, 'getKwh_01': 2, 'cloud': 'online'}}
2021-08-30 09:27:21  DEBUG    sonoff_cloud  Start refresh task for 2 POW
2021-08-30 09:27:22  DEBUG    sonoff_cloud  Cloud init: {'error': 0, 'apikey': '...', 'config': {'hb': 1, 'hbInterval': 145}, 'sequence': '1630333641966'}
2021-08-30 09:28:21  DEBUG    sonoff_cloud  1001339fc3 => Cloud4 | {'uiActive': 7200} | 1630333701378
2021-08-30 09:28:21  DEBUG    sonoff_cloud  1001339fc3 <= Cloud3 | {'error': 400, 'deviceid': '1001339fc3', 'apikey': '...', 'sequence': '1630333701378'}
2021-08-30 09:28:21  DEBUG    sonoff_cloud  1001339fe0 => Cloud4 | {'uiActive': 7200} | 1630333701834
2021-08-30 09:28:22  DEBUG    sonoff_cloud  1001339fe0 <= Cloud3 | {'error': 400, 'deviceid': '1001339fe0', 'apikey': '...', 'sequence': '1630333701834'}
2021-08-30 09:30:10  DEBUG    sonoff_local  1000fb2a55 <= Local1 | {'switch': 'off', 'startup': 'off', 'pulse': 'off', 'sledOnline': 'on', 'pulseWidth': 500, 'rssi': -55, 'ssid': '...', 'bssid': '...'} | 35
2021-08-30 09:30:10  DEBUG    sonoff_local  1000fc2cee <= Local1 | {'switch': 'on', 'startup': 'off', 'pulse': 'off', 'sledOnline': 'on', 'pulseWidth': 500, 'rssi': -43, 'ssid': '...', 'bssid': '...'} | 65
2021-08-30 09:30:10  DEBUG    sonoff_local  1000fa9891 <= Local1 | {'switch': 'on', 'startup': 'off', 'pulse': 'off', 'sledOnline': 'on', 'fwVersion': '3.6.0', 'pulseWidth': 500, 'rssi': -73} | 111
2021-08-30 09:30:10  DEBUG    sonoff_local  1000fabb67 <= Local1 | {'switch': 'off', 'startup': 'off', 'pulse': 'off', 'sledOnline': 'on', 'pulseWidth': 500, 'rssi': -67, 'ssid': '...', 'bssid': '...'} | 513
2021-08-30 09:30:10  DEBUG    sonoff_local  1001339fc3 <= Local1 | {'current_00': 7, 'voltage_00': 12495, 'actPow_00': 804, 'reactPow_00': 342, 'apparentPow_00': 874} | 44
2021-08-30 09:30:10  DEBUG    sonoff_local  1001339fe0 <= Local1 | {'current_01': 20, 'voltage_01': 12472, 'actPow_01': 1579, 'reactPow_01': 2057, 'apparentPow_01': 2594} | 48
2021-08-30 09:30:20  DEBUG    sonoff_cloud  Update consumption for all devices
2021-08-30 09:30:20  DEBUG    sonoff_cloud  1001339fc3 => Cloud4 | {'hundredDaysKwh': 'get'} | 1630333820376
2021-08-30 09:30:25  DEBUG    sonoff_cloud  1001339fe0 => Cloud4 | {'hundredDaysKwh': 'get'} | 1630333825379
2021-08-30 09:30:25  DEBUG    sonoff_cloud  1001339fc3 <= Cloud3 | {'error': 504, 'reason': 'Request Timeout', 'deviceid': '1001339fc3', 'apikey': '...', 'sequence': '1630333820376'}
2021-08-30 09:30:30  DEBUG    sonoff_cloud  1001339fe0 <= Cloud3 | {'error': 504, 'reason': 'Request Timeout', 'deviceid': '1001339fe0', 'apikey': '...', 'sequence': '1630333825379'}