mjmeli / ha-duke-energy-gateway

Uses the Duke Energy Gateway to import real time energy usage into Home Assistant
MIT License
34 stars 4 forks source link

Error communicating with Duke Energy Usage API: ... (ClientOSError) [Errno 104] Connection reset by peer #131

Closed BrettEBowman closed 2 years ago

BrettEBowman commented 2 years ago

Version of the custom_component

0.1.2

Configuration

Working smart gateway configuration.

Describe the bug

This afternoon, I noticed the following errors in my HA log:

Error fetching homeassistant data: Error communicating with Duke Energy Usage API: Request failed with unexpected error [https://cust-pilot-api.duke-energy.com/smartmeter/v1/auth]: (ClientOSError) [Errno 104] Connection reset by peer
2:49:43 PM – (ERROR) Duke Energy Gateway (custom integration)
Updating duke_energy_gateway sensor took longer than the scheduled update interval 0:00:30
2:49:31 PM – (WARNING) Sensor - message first occurred at 2:47:01 PM and shows up 6 times
Update of sensor.duke_energy_usage_today_kwh is taking over 10 seconds
2:46:41 PM – (WARNING) helpers/entity.py

The detail for that 2:49:43 error shows:

Logger: custom_components.duke_energy_gateway
Source: helpers/update_coordinator.py:182
Integration: Duke Energy Gateway ([documentation](https://github.com/mjmeli/ha-duke-energy-gateway), [issues](https://github.com/mjmeli/ha-duke-energy-gateway/issues))
First occurred: 2:49:43 PM (1 occurrences)
Last logged: 2:49:43 PM

Error fetching homeassistant data: Error communicating with Duke Energy Usage API: Request failed with unexpected error [https://cust-pilot-api.duke-energy.com/smartmeter/v1/auth]: (ClientOSError) [Errno 104] Connection reset by peer

I think that the process "recovered" OK since it still appears to be adding energy usage data. But I thought that I should at least let you know about it.

Debug log

2022-09-09 14:46:44.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:46:44.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:46:44.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 580.000000
2022-09-09 14:46:47.207 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:46:47.208 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:46:47.208 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:46:50.235 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:46:50.236 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:46:50.236 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:46:51.448 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:46:51.448 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:46:51.450 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:46:51.605 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:46:51.606 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:46:51.606 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:46:53.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:46:53.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:46:53.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:46:56.220 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:46:56.221 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:46:56.221 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:46:59.219 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:46:59.220 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:46:59.221 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 579.000000
2022-09-09 14:47:01.607 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:47:01.607 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:47:01.609 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:47:01.711 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:47:01.711 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:47:01.713 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:47:01.943 DEBUG (MainThread) [pyduke_energy.client] Requesting usage between 2022-09-09T05:00 UTC and 2022-09-10T05:00 UTC
2022-09-09 14:47:02.207 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:02.209 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:02.209 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:02.872 DEBUG (MainThread) [custom_components.duke_energy_gateway] Finished fetching homeassistant data in 0.930 seconds (success: True)
2022-09-09 14:47:05.247 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:05.248 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:05.249 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:08.223 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:08.224 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:08.225 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:11.212 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:11.213 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:11.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:11.714 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:47:11.714 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:47:11.716 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:47:11.848 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:47:11.848 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:47:11.849 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:47:13.892 DEBUG (MainThread) [pyduke_energy.realtime] Sending PINGREQ
2022-09-09 14:47:13.892 DEBUG (MainThread) [pyduke_energy.realtime] Watching socket for writability.
2022-09-09 14:47:13.893 DEBUG (MainThread) [pyduke_energy.realtime] Socket is writable, calling loop_write
2022-09-09 14:47:13.893 DEBUG (MainThread) [pyduke_energy.realtime] Stop watching socket for writability.
2022-09-09 14:47:13.926 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:13.927 DEBUG (MainThread) [pyduke_energy.realtime] Received PINGRESP
2022-09-09 14:47:14.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:14.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:14.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:17.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:17.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:17.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 577.000000
2022-09-09 14:47:20.619 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:20.620 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:20.620 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:21.851 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:47:21.851 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:47:21.852 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:47:22.001 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:47:22.001 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:47:22.002 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:47:23.207 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:23.208 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:23.208 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:26.207 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:26.208 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:26.208 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:29.207 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:29.208 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:29.208 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:31.942 DEBUG (MainThread) [pyduke_energy.client] Requesting usage between 2022-09-09T05:00 UTC and 2022-09-10T05:00 UTC
2022-09-09 14:47:32.003 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:47:32.004 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:47:32.006 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:47:32.170 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:47:32.171 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:47:32.174 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:47:32.228 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:32.229 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:32.231 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 578.000000
2022-09-09 14:47:32.307 DEBUG (MainThread) [custom_components.duke_energy_gateway] Finished fetching homeassistant data in 0.365 seconds (success: True)
2022-09-09 14:47:35.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:35.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:35.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:38.232 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:38.233 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:38.234 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:41.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:41.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:41.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:42.175 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:47:42.175 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:47:42.176 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:47:42.273 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:47:42.273 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:47:42.274 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:47:44.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:44.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:44.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:47.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:47.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:47.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:50.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:50.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:50.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 594.000000
2022-09-09 14:47:52.275 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:47:52.275 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:47:52.277 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:47:52.401 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:47:52.402 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:47:52.402 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:47:53.237 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:53.238 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:53.239 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:56.231 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:56.232 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:56.232 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:47:59.207 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:47:59.208 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:47:59.208 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:01.943 DEBUG (MainThread) [pyduke_energy.client] Requesting usage between 2022-09-09T05:00 UTC and 2022-09-10T05:00 UTC
2022-09-09 14:48:02.219 DEBUG (MainThread) [custom_components.duke_energy_gateway] Finished fetching homeassistant data in 0.277 seconds (success: True)
2022-09-09 14:48:02.236 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:02.237 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:02.237 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:02.403 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:48:02.403 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:48:02.406 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:48:03.460 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:48:03.461 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:48:03.462 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:48:03.930 DEBUG (MainThread) [pyduke_energy.realtime] Sending PINGREQ
2022-09-09 14:48:03.930 DEBUG (MainThread) [pyduke_energy.realtime] Watching socket for writability.
2022-09-09 14:48:03.931 DEBUG (MainThread) [pyduke_energy.realtime] Socket is writable, calling loop_write
2022-09-09 14:48:03.931 DEBUG (MainThread) [pyduke_energy.realtime] Stop watching socket for writability.
2022-09-09 14:48:03.963 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:03.964 DEBUG (MainThread) [pyduke_energy.realtime] Received PINGRESP
2022-09-09 14:48:05.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:05.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:05.214 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 581.000000
2022-09-09 14:48:08.207 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:08.208 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:08.208 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:11.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:11.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:11.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:13.464 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:48:13.465 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:48:13.467 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:48:13.600 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:48:13.600 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:48:13.601 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:48:14.207 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:14.207 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:14.208 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:17.231 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:17.232 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:17.232 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:20.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:20.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:20.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:23.227 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:23.228 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:23.229 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 581.000000
2022-09-09 14:48:23.602 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:48:23.602 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:48:23.604 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:48:23.751 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:48:23.751 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:48:23.751 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:48:26.212 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:26.213 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:26.214 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:29.231 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:29.232 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:29.232 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:31.943 DEBUG (MainThread) [pyduke_energy.client] Requesting usage between 2022-09-09T05:00 UTC and 2022-09-10T05:00 UTC
2022-09-09 14:48:32.203 DEBUG (MainThread) [custom_components.duke_energy_gateway] Finished fetching homeassistant data in 0.260 seconds (success: True)
2022-09-09 14:48:32.212 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:32.213 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:32.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:33.752 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:48:33.753 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:48:33.754 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:48:33.888 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:48:33.889 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:48:33.889 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:48:35.257 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:35.258 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:35.258 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:38.219 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:38.220 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:38.221 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:41.628 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:41.629 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:41.630 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 583.000000
2022-09-09 14:48:43.890 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:48:43.890 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:48:43.892 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:48:44.210 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:44.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:44.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:44.933 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:48:44.934 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:48:44.934 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:48:47.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:47.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:47.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:50.207 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:50.209 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:50.209 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:53.232 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:53.233 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:53.233 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:53.972 DEBUG (MainThread) [pyduke_energy.realtime] Sending PINGREQ
2022-09-09 14:48:53.972 DEBUG (MainThread) [pyduke_energy.realtime] Watching socket for writability.
2022-09-09 14:48:53.973 DEBUG (MainThread) [pyduke_energy.realtime] Socket is writable, calling loop_write
2022-09-09 14:48:53.974 DEBUG (MainThread) [pyduke_energy.realtime] Stop watching socket for writability.
2022-09-09 14:48:54.007 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:54.008 DEBUG (MainThread) [pyduke_energy.realtime] Received PINGRESP
2022-09-09 14:48:54.935 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:48:54.936 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:48:54.937 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:48:55.077 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:48:55.077 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:48:55.078 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:48:56.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:56.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:56.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:48:59.282 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:48:59.283 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:48:59.284 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 585.000000
2022-09-09 14:49:01.945 DEBUG (MainThread) [pyduke_energy.client] Requesting usage between 2022-09-09T05:00 UTC and 2022-09-10T05:00 UTC
2022-09-09 14:49:02.233 DEBUG (MainThread) [custom_components.duke_energy_gateway] Finished fetching homeassistant data in 0.288 seconds (success: True)
2022-09-09 14:49:02.235 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:02.236 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:02.236 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:05.079 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:49:05.079 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:49:05.080 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:49:05.221 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:49:05.221 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:49:05.222 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:49:05.239 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:05.240 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:05.240 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:08.224 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:08.225 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:08.225 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:11.207 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:11.208 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:11.209 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:14.212 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:14.213 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:14.214 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:15.224 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:49:15.224 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:49:15.225 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:49:15.354 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:49:15.354 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:49:15.355 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:49:17.207 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:17.208 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:17.210 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 588.000000
2022-09-09 14:49:20.223 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:20.224 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:20.225 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:23.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:23.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:23.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:25.356 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:49:25.357 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:49:25.359 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:49:25.484 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:49:25.484 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:49:25.485 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:49:26.212 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:26.213 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:26.214 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:29.271 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:29.272 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:29.272 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:31.945 DEBUG (MainThread) [pyduke_energy.client] Requesting usage between 2022-09-09T05:00 UTC and 2022-09-10T05:00 UTC
2022-09-09 14:49:32.203 DEBUG (MainThread) [custom_components.duke_energy_gateway] Finished fetching homeassistant data in 0.258 seconds (success: True)
2022-09-09 14:49:32.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:32.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:32.214 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 584.000000
2022-09-09 14:49:35.486 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:49:35.486 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:49:35.487 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:49:35.620 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:49:35.620 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:49:35.621 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:49:35.635 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:35.636 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:35.636 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:38.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:38.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:38.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:41.212 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:41.213 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:41.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:44.029 DEBUG (MainThread) [pyduke_energy.realtime] Sending PINGREQ
2022-09-09 14:49:44.029 DEBUG (MainThread) [pyduke_energy.realtime] Watching socket for writability.
2022-09-09 14:49:44.030 DEBUG (MainThread) [pyduke_energy.realtime] Socket is writable, calling loop_write
2022-09-09 14:49:44.030 DEBUG (MainThread) [pyduke_energy.realtime] Stop watching socket for writability.
2022-09-09 14:49:44.062 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:44.063 DEBUG (MainThread) [pyduke_energy.realtime] Received PINGRESP
2022-09-09 14:49:44.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:44.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:44.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:45.622 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:49:45.622 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:49:45.624 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:49:45.772 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:49:45.772 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:49:45.773 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:49:47.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:47.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:47.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 581.000000
2022-09-09 14:49:50.231 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:50.232 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:50.232 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:53.212 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:53.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:53.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:55.773 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:49:55.773 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:49:55.775 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:49:55.896 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:49:55.896 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:49:55.897 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:49:56.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:56.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:56.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:49:59.271 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:49:59.272 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:49:59.272 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:50:01.946 DEBUG (MainThread) [pyduke_energy.client] Requesting usage between 2022-09-09T05:00 UTC and 2022-09-10T05:00 UTC
2022-09-09 14:50:02.207 DEBUG (MainThread) [custom_components.duke_energy_gateway] Finished fetching homeassistant data in 0.262 seconds (success: True)
2022-09-09 14:50:02.215 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:50:02.216 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:50:02.217 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 589.000000
2022-09-09 14:50:05.209 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:50:05.210 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:50:05.210 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:50:05.898 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:50:05.898 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:50:05.900 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:50:06.042 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:50:06.042 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:50:06.043 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:50:08.212 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:50:08.213 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:50:08.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:50:11.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:50:11.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:50:11.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:50:14.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:50:14.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:50:14.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:50:16.043 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Sending command heartbeat (device type: type_0a)
2022-09-09 14:50:16.043 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Send payload: b'{}'
2022-09-09 14:50:16.045 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Waiting for sequence number -100
2022-09-09 14:50:16.183 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211)
2022-09-09 14:50:16.183 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Got heartbeat response
2022-09-09 14:50:16.184 DEBUG (MainThread) [custom_components.localtuya.pytuya] [liv...fan] Decrypted payload: {}
2022-09-09 14:50:17.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:50:17.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:50:17.213 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
2022-09-09 14:50:20.231 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:50:20.233 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:50:20.233 DEBUG (MainThread) [custom_components.duke_energy_gateway] New measurement received: 583.000000
2022-09-09 14:50:23.211 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2022-09-09 14:50:23.212 DEBUG (MainThread) [pyduke_energy.realtime] Received PUBLISH (d0, q0, r0, m0), 'DESH/P210400605/out/sm/1/live', ... (128 bytes)
2022-09-09 14:50:23.212 DEBUG (MainThread) [custom_components.duke_energy_gateway] Ignoring real-time update as still in throttling interval
mjmeli commented 2 years ago

As long as you get past the initial check without API failures, everything else should auto recover. The daily usage creates a new API session every time it runs so previous failures shouldn't impact it. The realtime usage will do an exponential backoff on failures, starting with retrying 1 minute and then increasing up to every hour.

I don't think there are any issues here as they recovered but I appreciate you calling them out.