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

Smartrent stopped working around 30min after HASS reboot #7

Closed
jerryc05 opened this issue Jul 26, 2022 · 14 comments
Closed

Smartrent stopped working around 30min after HASS reboot #7

jerryc05 opened this issue Jul 26, 2022 · 14 comments
Assignees
Labels
bug Something isn't working

Comments

@jerryc05
Copy link

smartrent stopped working after working perfectly for a while (30min ~ 3hr). Rebooting HASS temporarily solves the problem.

Here is the traceback:

2022-07-26 14:03:52 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration smartrent which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-26 14:03:54 ERROR (SyncWorker_2) [getmac] Failed to send ARP table population packet
WARNING: No IPv4 address found on anpi0 !
2022-07-26 14:03:55 WARNING (SyncWorker_6) [scapy.runtime] No IPv4 address found on anpi0 !
WARNING: No IPv4 address found on anpi2 !
2022-07-26 14:03:55 WARNING (SyncWorker_6) [scapy.runtime] No IPv4 address found on anpi2 !
WARNING: more No IPv4 address found on anpi1 !
2022-07-26 14:03:55 WARNING (SyncWorker_6) [scapy.runtime] more No IPv4 address found on anpi1 !
2022-07-26 14:23:55 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-26 14:23:55 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-26 14:23:55 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-26 14:23:55 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-26 14:23:55 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-26 14:23:55 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-26 14:23:55 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-26 14:23:55 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-26 14:23:55 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-26 14:31:12 WARNING (MainThread) [smartrent.utils] Exception occured! ConnectionClosedError <class 'websockets.exceptions.ConnectionClosedError'>
2022-07-26 14:31:12 WARNING (MainThread) [smartrent.utils] Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "~/Programs/miniconda3/lib/python3.10/asyncio/streams.py", line 706, in readexactly
    raise exceptions.IncompleteReadError(incomplete, n)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 2 expected bytes

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 378, in _async_update_state_via_ws
    async for message in websocket:
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 482, in __aiter__
    yield await self.recv()
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 553, in recv
    await self.ensure_open()
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: no close frame received or sent

2022-07-26 14:31:12 WARNING (MainThread) [smartrent.utils] Retrying websocket in 1.0 seconds...
2022-07-26 14:53:58 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-26 14:53:58 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-26 14:53:58 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-26 14:53:58 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-26 14:53:58 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-26 14:53:58 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-26 14:53:58 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-26 14:53:58 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
@ZacheryThomas
Copy link
Owner

Hello! Has this only occurred once for you so far? Or has this been an ongoing issue for you?

@jerryc05
Copy link
Author

ongoing. its been like this since I started using HASS

@ZacheryThomas
Copy link
Owner

Could you update your homeassistant configuration.yaml to include a logging section?

logger:
  default: warning
  logs:
    custom_components.smartrent: debug
    smartrent: debug

After you add that it should give me more info to go off of once the error occurs again.

@ZacheryThomas ZacheryThomas self-assigned this Jul 29, 2022
@ZacheryThomas ZacheryThomas added the bug Something isn't working label Jul 29, 2022
@jerryc05
Copy link
Author

jerryc05 commented Jul 29, 2022

here is a long log which i assume shall be more than enough.

let me know if there's anything i can provide

2022-07-29 07:19:19 WARNING (MainThread) [smartrent.utils] Retrying fetches in 600 seconds...
2022-07-29 07:19:19 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 07:19:19 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '59'}
2022-07-29 07:19:23 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-07-29 07:19:23 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 07:22:23 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 60
2022-07-29 07:22:23 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 07:29:19 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 07:29:19 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 07:29:19 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 07:29:19 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 07:29:19 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 07:29:19 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 07:29:19 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 07:29:19 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 07:29:19 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 07:29:19 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '60'}
2022-07-29 07:29:19 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 07:29:19 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 07:38:44 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 61
2022-07-29 07:38:44 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 07:39:19 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 07:39:19 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 07:39:19 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 07:39:19 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 07:39:19 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 07:39:19 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 07:39:19 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 07:39:19 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 07:39:19 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 07:39:19 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 07:39:19 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 07:39:19 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 07:39:19 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 07:39:19 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 07:39:19 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 07:39:19 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 07:39:19 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 07:39:19 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 07:39:19 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 07:39:19 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 07:39:19 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 07:39:19 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 07:39:19 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 07:39:19 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 07:39:19 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 07:39:20 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 07:39:20 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 07:39:21 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 07:39:21 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 07:39:21 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 07:39:21 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 07:39:22 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '61'}
2022-07-29 07:39:22 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 07:39:22 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 07:39:22 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 07:41:23 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-07-29 07:41:23 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 07:48:05 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 62
2022-07-29 07:48:05 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 07:48:23 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-07-29 07:48:23 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 07:49:22 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 07:49:22 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 07:49:22 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 07:49:22 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 07:49:22 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 07:49:22 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 07:49:22 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 07:49:22 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 07:49:22 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 07:49:22 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 07:49:22 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '62'}
2022-07-29 07:49:22 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 07:59:22 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 07:59:22 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 07:59:22 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 07:59:22 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 07:59:22 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 07:59:22 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 07:59:22 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 07:59:22 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 07:59:22 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 07:59:22 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 07:59:22 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 07:59:22 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 07:59:22 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 07:59:22 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 07:59:22 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 07:59:22 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 07:59:22 WARNING (MainThread) [smartrent.utils] Exception occured! InvalidAuthError <class 'smartrent.utils.InvalidAuthError'>
2022-07-29 07:59:22 WARNING (MainThread) [smartrent.utils] Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 159, in async_get_device_data
    res = await self._async_get_device_data(id)
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 181, in _async_get_device_data
    raise InvalidAuthError(device_dict.get("errors"))
smartrent.utils.InvalidAuthError: [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 324, in _async_update_state_via_fetch
    await self._async_fetch_subscribed_devices_status()
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 278, in _async_fetch_subscribed_devices_status
    await asyncio.gather(
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/device.py", line 89, in _async_fetch_state
    device_data = await self._client.async_get_device_data(self._device_id)
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 162, in async_get_device_data
    await self.async_refresh_token()
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 212, in async_refresh_token
    raise InvalidAuthError(
smartrent.utils.InvalidAuthError: Token not retrieved! Loggin probably not successful: [{'code': 'conflict', 'description': 'conflict'}]

2022-07-29 07:59:22 WARNING (MainThread) [smartrent.utils] Retrying fetches in 600 seconds...
2022-07-29 07:59:22 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 07:59:22 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 07:59:22 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 07:59:22 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 07:59:22 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 07:59:22 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 07:59:22 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 07:59:23 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 07:59:24 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 07:59:24 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 07:59:24 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 07:59:24 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 07:59:24 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 07:59:24 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 08:01:17 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> USER_CODE_ADDED_ID_4
2022-07-29 08:01:17 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 08:01:23 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-07-29 08:01:23 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 08:09:22 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 08:09:22 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:09:22 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 08:09:22 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:09:22 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 08:09:22 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 08:09:23 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:09:23 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'USER_CODE_ADDED_ID_4'}
2022-07-29 08:09:23 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:09:23 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 08:09:23 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '62'}
2022-07-29 08:09:23 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 08:09:23 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-07-29 08:09:23 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 08:19:23 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 08:19:23 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:19:23 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 08:19:23 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:19:23 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 08:19:23 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 08:19:23 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 08:19:23 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 08:19:23 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 08:19:23 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 08:19:23 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 08:19:23 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 08:19:23 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 08:19:23 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 08:19:23 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 08:19:23 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 08:19:23 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 08:19:23 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 08:19:23 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 08:19:23 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 08:19:23 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 08:19:23 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 08:19:23 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 08:19:23 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 08:19:23 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 08:19:23 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:19:24 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 08:19:24 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:19:24 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 08:19:24 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 08:19:25 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 08:19:25 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'USER_CODE_ADDED_ID_4'}
2022-07-29 08:19:25 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 08:19:25 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '62'}
2022-07-29 08:19:25 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 08:22:03 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-07-29 08:22:03 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 08:24:28 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 63
2022-07-29 08:24:28 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 08:26:28 WARNING (MainThread) [smartrent.utils] Exception occured! ConnectionClosedError <class 'websockets.exceptions.ConnectionClosedError'>
2022-07-29 08:26:28 WARNING (MainThread) [smartrent.utils] Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "~/Programs/miniconda3/lib/python3.10/asyncio/streams.py", line 706, in readexactly
    raise exceptions.IncompleteReadError(incomplete, n)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 2 expected bytes

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 378, in _async_update_state_via_ws
    async for message in websocket:
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 482, in __aiter__
    yield await self.recv()
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 553, in recv
    await self.ensure_open()
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: no close frame received or sent

2022-07-29 08:26:28 WARNING (MainThread) [smartrent.utils] Retrying websocket in 1.0 seconds...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] Getting new token
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '63'}
2022-07-29 08:26:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'USER_CODE_ADDED_ID_4'}
2022-07-29 08:26:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:26:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 08:26:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] Connecting to Websocket...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] Joining devices to websocket conn...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] Joining topic for Kitchen Sink - Leak Sensor:2504083 ...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] Joining topic for Kitchen:2504086 ...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] Joining topic for Washer - Leak Sensor:2504084 ...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] Joining topic for Front Door - Lock:2504080 ...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] Joining topic for Thermostat:3405411 ...
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] Done Joining devices!
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] ["null","null","devices:2504083","phx_reply",{"response":{},"status":"ok"}]
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] ["null","null","devices:2504086","phx_reply",{"response":{},"status":"ok"}]
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] ["null","null","devices:2504084","phx_reply",{"response":{},"status":"ok"}]
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] ["null","null","devices:2504080","phx_reply",{"response":{},"status":"ok"}]
2022-07-29 08:26:29 INFO (MainThread) [smartrent.utils] ["null","null","devices:3405411","phx_reply",{"response":{},"status":"ok"}]
2022-07-29 08:29:25 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 08:29:25 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:29:25 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 08:29:25 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:29:25 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 08:29:25 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 08:29:26 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '63'}
2022-07-29 08:29:26 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:29:26 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 08:29:26 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'USER_CODE_ADDED_ID_4'}
2022-07-29 08:29:26 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:29:26 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 08:31:03 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-07-29 08:31:03 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 08:33:49 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 64
2022-07-29 08:33:49 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 08:39:26 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 08:39:26 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:39:26 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 08:39:26 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:39:26 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 08:39:26 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 08:39:26 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 08:39:26 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:39:26 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '64'}
2022-07-29 08:39:26 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'USER_CODE_ADDED_ID_4'}
2022-07-29 08:39:26 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:39:26 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 08:41:43 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-07-29 08:41:43 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 08:42:10 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 62
2022-07-29 08:42:10 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 08:49:26 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 08:49:26 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:49:26 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 08:49:26 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:49:26 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 08:49:26 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 08:49:26 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 08:49:26 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 08:49:26 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 08:49:26 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 08:49:26 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 08:49:26 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 08:49:26 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 08:49:26 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 08:49:26 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 08:49:26 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 08:49:26 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 08:49:26 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 08:49:26 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 08:49:26 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 08:49:26 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 08:49:26 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 08:49:26 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 08:49:26 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 08:49:26 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 08:49:27 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 08:49:28 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 08:49:28 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'USER_CODE_ADDED_ID_4'}
2022-07-29 08:49:28 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 08:49:28 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:49:29 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 08:49:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:49:29 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 08:49:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '62'}
2022-07-29 08:49:29 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 08:53:23 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-07-29 08:53:23 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 08:59:29 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 08:59:29 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:59:29 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 08:59:29 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 08:59:29 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 08:59:29 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 08:59:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'USER_CODE_ADDED_ID_4'}
2022-07-29 08:59:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:59:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '62'}
2022-07-29 08:59:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 08:59:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 08:59:29 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 09:01:52 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 61
2022-07-29 09:01:52 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 09:03:03 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-07-29 09:03:03 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 09:09:29 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 09:09:29 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 09:09:29 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 09:09:29 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 09:09:29 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 09:09:29 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 09:09:29 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:09:29 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:09:29 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:09:29 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:09:29 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:09:29 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:09:29 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 09:09:29 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 09:09:29 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:09:29 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:09:29 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:09:29 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:09:29 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:09:29 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 09:09:29 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 09:09:29 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 09:09:29 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 09:09:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 09:09:29 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:09:29 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 09:09:30 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:09:30 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 09:09:31 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:09:31 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'USER_CODE_ADDED_ID_4'}
2022-07-29 09:09:31 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:09:31 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '61'}
2022-07-29 09:09:31 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 09:12:43 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-07-29 09:12:43 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 09:19:31 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 09:19:31 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 09:19:31 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 09:19:31 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 09:19:31 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 09:19:31 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 09:19:31 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 09:19:31 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 09:19:31 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'USER_CODE_ADDED_ID_4'}
2022-07-29 09:19:31 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 09:19:31 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '61'}
2022-07-29 09:19:31 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 09:22:43 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-07-29 09:22:43 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 09:23:52 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> false
2022-07-29 09:23:52 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 09:23:52 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> KEY_OR_THUMBTURN_UNLOCK
2022-07-29 09:23:52 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 09:24:05 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> PALM_TOUCH_LOCK
2022-07-29 09:24:05 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 09:24:05 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> true
2022-07-29 09:24:05 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 09:29:31 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 09:29:31 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 09:29:31 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 09:29:31 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 09:29:31 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 09:29:31 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 09:29:32 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:29:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:29:32 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:29:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:29:32 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:29:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:29:32 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:29:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:29:32 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:29:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:29:32 WARNING (MainThread) [smartrent.utils] Exception occured! InvalidAuthError <class 'smartrent.utils.InvalidAuthError'>
2022-07-29 09:29:32 WARNING (MainThread) [smartrent.utils] Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 159, in async_get_device_data
    res = await self._async_get_device_data(id)
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 181, in _async_get_device_data
    raise InvalidAuthError(device_dict.get("errors"))
smartrent.utils.InvalidAuthError: [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 324, in _async_update_state_via_fetch
    await self._async_fetch_subscribed_devices_status()
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 278, in _async_fetch_subscribed_devices_status
    await asyncio.gather(
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/device.py", line 89, in _async_fetch_state
    device_data = await self._client.async_get_device_data(self._device_id)
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 162, in async_get_device_data
    await self.async_refresh_token()
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 212, in async_refresh_token
    raise InvalidAuthError(
smartrent.utils.InvalidAuthError: Token not retrieved! Loggin probably not successful: [{'code': 'conflict', 'description': 'conflict'}]

2022-07-29 09:29:32 WARNING (MainThread) [smartrent.utils] Retrying fetches in 600 seconds...
2022-07-29 09:29:32 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 09:29:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 09:29:32 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:29:32 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:29:32 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:29:32 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 09:29:32 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 09:29:32 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 09:29:32 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:29:33 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 09:33:03 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-07-29 09:33:03 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 09:39:32 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 09:39:32 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 09:39:32 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 09:39:32 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 09:39:32 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 09:39:32 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 09:39:32 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 09:39:32 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 09:39:32 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 09:39:32 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '61'}
2022-07-29 09:39:32 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 09:39:32 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 09:39:35 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 60
2022-07-29 09:39:35 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 09:42:43 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-07-29 09:42:43 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 09:49:16 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 61
2022-07-29 09:49:16 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 09:49:32 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 09:49:32 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 09:49:32 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 09:49:32 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 09:49:32 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 09:49:32 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 09:49:32 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:49:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:49:32 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:49:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:49:32 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:49:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:49:32 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:49:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:49:32 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 09:49:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 09:49:32 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 09:49:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 09:49:32 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 09:49:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 09:49:32 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 09:49:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 09:49:32 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 09:49:32 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 09:49:32 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:49:32 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 09:49:35 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:49:35 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:49:35 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 09:49:35 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:49:35 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 09:49:36 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 09:49:36 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 09:49:36 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '61'}
2022-07-29 09:49:36 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 09:51:43 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-07-29 09:51:43 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 09:59:36 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 09:59:36 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 09:59:36 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 09:59:36 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 09:59:36 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 09:59:36 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 09:59:36 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 09:59:36 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 09:59:36 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 09:59:36 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '61'}
2022-07-29 09:59:36 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 09:59:36 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 09:59:58 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 60
2022-07-29 09:59:58 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 10:03:03 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-07-29 10:03:03 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 10:05:18 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 61
2022-07-29 10:05:18 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 10:09:36 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 10:09:36 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 10:09:36 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 10:09:36 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 10:09:36 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 10:09:36 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 10:09:36 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:09:36 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:09:36 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:09:36 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:09:36 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:09:36 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:09:36 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:09:36 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:09:36 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:09:36 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:09:36 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 10:09:36 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 10:09:36 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 10:09:36 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 10:09:36 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 10:09:36 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 10:09:36 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 10:09:36 WARNING (MainThread) [smartrent.utils] Exception occured! InvalidAuthError <class 'smartrent.utils.InvalidAuthError'>
2022-07-29 10:09:36 WARNING (MainThread) [smartrent.utils] Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 159, in async_get_device_data
    res = await self._async_get_device_data(id)
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 181, in _async_get_device_data
    raise InvalidAuthError(device_dict.get("errors"))
smartrent.utils.InvalidAuthError: [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 324, in _async_update_state_via_fetch
    await self._async_fetch_subscribed_devices_status()
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 278, in _async_fetch_subscribed_devices_status
    await asyncio.gather(
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/device.py", line 89, in _async_fetch_state
    device_data = await self._client.async_get_device_data(self._device_id)
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 162, in async_get_device_data
    await self.async_refresh_token()
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 212, in async_refresh_token
    raise InvalidAuthError(
smartrent.utils.InvalidAuthError: Token not retrieved! Loggin probably not successful: [{'code': 'conflict', 'description': 'conflict'}]

2022-07-29 10:09:36 WARNING (MainThread) [smartrent.utils] Retrying fetches in 600 seconds...
2022-07-29 10:09:36 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 10:09:37 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 10:09:37 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '61'}
2022-07-29 10:09:37 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 10:09:37 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 10:09:38 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 10:09:38 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 10:11:23 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-07-29 10:11:23 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 10:13:59 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 60
2022-07-29 10:13:59 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 10:19:36 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 10:19:36 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 10:19:36 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 10:19:36 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 10:19:36 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 10:19:36 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 10:19:37 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 10:19:37 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 10:19:37 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 10:19:37 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '60'}
2022-07-29 10:19:37 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 10:19:37 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 10:24:43 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-07-29 10:24:43 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 10:29:37 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 10:29:37 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 10:29:37 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 10:29:37 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 10:29:37 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 10:29:37 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 10:29:37 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:29:37 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:29:37 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:29:37 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:29:37 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:29:37 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:29:37 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:29:37 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:29:37 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:29:37 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:29:37 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 10:29:37 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 10:29:37 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 10:29:37 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 10:29:37 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 10:29:37 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 10:29:37 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 10:29:37 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 10:29:37 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 10:29:37 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 10:29:38 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 10:29:38 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 10:29:38 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 10:29:38 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '60'}
2022-07-29 10:29:39 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 10:29:39 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 10:29:39 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 10:29:39 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 10:29:39 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 10:31:20 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 61
2022-07-29 10:31:20 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 10:32:43 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-07-29 10:32:43 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 10:36:41 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 62
2022-07-29 10:36:41 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 10:39:39 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 10:39:39 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 10:39:39 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 10:39:39 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 10:39:39 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 10:39:39 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 10:39:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 10:39:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 10:39:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 10:39:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '75', 'current_humidity': '62'}
2022-07-29 10:39:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 10:39:40 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 10:44:26 INFO (MainThread) [smartrent.utils] ThermostatSetpoint -> cooling_setpoint -> 75
2022-07-29 10:44:26 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 10:46:25 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_temp    -> 74
2022-07-29 10:46:25 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 10:47:42 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 60
2022-07-29 10:47:42 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 10:49:39 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 10:49:39 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 10:49:39 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 10:49:39 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 10:49:39 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 10:49:39 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 10:49:40 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:49:40 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:49:40 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:49:40 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:49:40 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:49:40 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:49:40 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:49:40 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:49:40 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 10:49:40 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 10:49:40 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 10:49:40 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 10:49:40 WARNING (MainThread) [smartrent.utils] Exception occured! InvalidAuthError <class 'smartrent.utils.InvalidAuthError'>
2022-07-29 10:49:40 WARNING (MainThread) [smartrent.utils] Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 159, in async_get_device_data
    res = await self._async_get_device_data(id)
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 181, in _async_get_device_data
    raise InvalidAuthError(device_dict.get("errors"))
smartrent.utils.InvalidAuthError: [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 324, in _async_update_state_via_fetch
    await self._async_fetch_subscribed_devices_status()
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 278, in _async_fetch_subscribed_devices_status
    await asyncio.gather(
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/device.py", line 89, in _async_fetch_state
    device_data = await self._client.async_get_device_data(self._device_id)
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 162, in async_get_device_data
    await self.async_refresh_token()
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 212, in async_refresh_token
    raise InvalidAuthError(
smartrent.utils.InvalidAuthError: Token not retrieved! Loggin probably not successful: [{'code': 'conflict', 'description': 'conflict'}]

2022-07-29 10:49:40 WARNING (MainThread) [smartrent.utils] Retrying fetches in 600 seconds...
2022-07-29 10:49:40 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 10:49:40 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 10:49:40 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 10:49:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '75', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '74', 'current_humidity': '60'}
2022-07-29 10:49:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 10:49:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 10:49:41 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 10:49:41 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 10:56:29 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> false
2022-07-29 10:56:29 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 10:56:29 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> KEY_OR_THUMBTURN_UNLOCK
2022-07-29 10:56:29 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 10:56:32 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> true
2022-07-29 10:56:32 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 10:56:32 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> PALM_TOUCH_LOCK
2022-07-29 10:56:32 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 10:56:34 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> KEY_OR_THUMBTURN_UNLOCK
2022-07-29 10:56:34 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 10:56:34 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> false
2022-07-29 10:56:34 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 10:56:38 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> true
2022-07-29 10:56:38 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 10:56:39 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> PALM_TOUCH_LOCK
2022-07-29 10:56:39 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 10:59:40 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 10:59:40 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 10:59:40 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 10:59:40 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 10:59:40 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 10:59:40 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 10:59:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 10:59:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 10:59:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-07-29 10:59:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '75', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '74', 'current_humidity': '60'}
2022-07-29 10:59:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 10:59:40 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 11:01:03 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 61
2022-07-29 11:01:03 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 11:06:57 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> false
2022-07-29 11:06:57 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 11:07:06 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> UNLOCK_VIA_RF
2022-07-29 11:07:06 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 11:07:44 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 64
2022-07-29 11:07:44 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 11:09:40 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 11:09:40 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 11:09:40 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 11:09:40 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 11:09:40 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 11:09:40 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 11:09:40 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 11:09:40 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 11:09:40 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 11:09:40 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 11:09:40 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 11:09:40 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 11:09:40 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 11:09:40 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 11:09:40 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 11:09:40 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 11:09:40 WARNING (MainThread) [smartrent.utils] Exception occured! InvalidAuthError <class 'smartrent.utils.InvalidAuthError'>
2022-07-29 11:09:40 WARNING (MainThread) [smartrent.utils] Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 159, in async_get_device_data
    res = await self._async_get_device_data(id)
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 181, in _async_get_device_data
    raise InvalidAuthError(device_dict.get("errors"))
smartrent.utils.InvalidAuthError: [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 324, in _async_update_state_via_fetch
    await self._async_fetch_subscribed_devices_status()
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 278, in _async_fetch_subscribed_devices_status
    await asyncio.gather(
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/device.py", line 89, in _async_fetch_state
    device_data = await self._client.async_get_device_data(self._device_id)
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 162, in async_get_device_data
    await self.async_refresh_token()
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 212, in async_refresh_token
    raise InvalidAuthError(
smartrent.utils.InvalidAuthError: Token not retrieved! Loggin probably not successful: [{'code': 'conflict', 'description': 'conflict'}]

2022-07-29 11:09:40 WARNING (MainThread) [smartrent.utils] Retrying fetches in 600 seconds...
2022-07-29 11:09:40 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 11:09:40 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 11:09:40 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 11:09:40 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 11:09:40 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 11:09:40 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 11:09:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 11:09:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 11:09:41 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 11:09:41 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 11:09:41 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 11:09:41 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '75', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '74', 'current_humidity': '64'}
2022-07-29 11:12:27 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-07-29 11:12:27 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 11:13:24 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 63
2022-07-29 11:13:24 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 11:15:20 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> KEY_OR_THUMBTURN_LOCK
2022-07-29 11:15:20 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 11:15:20 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> true
2022-07-29 11:15:20 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 11:18:47 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-07-29 11:18:47 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 11:19:40 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 11:19:40 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 11:19:40 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 11:19:40 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 11:19:40 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 11:19:40 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 11:19:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 11:19:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 11:19:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'KEY_OR_THUMBTURN_LOCK'}
2022-07-29 11:19:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '75', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '74', 'current_humidity': '63'}
2022-07-29 11:19:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 11:19:40 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 11:25:41 INFO (MainThread) [smartrent.utils] sending payload ["null", "null", "devices:2504080", "update_attributes", {"device_id": 2504080, "attributes": [{"name": "locked", "value": "false"}]}]
2022-07-29 11:25:42 DEBUG (MainThread) [smartrent.utils] Possible issue during send_payload: "server rejected WebSocket connection: HTTP 403" Refreshing token and retrying
2022-07-29 11:25:42 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 11:25:42 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 11:25:42 INFO (MainThread) [smartrent.utils] sending payload ["null", "null", "devices:2504080", "update_attributes", {"device_id": 2504080, "attributes": [{"name": "locked", "value": "false"}]}]
2022-07-29 11:25:42 INFO (MainThread) [smartrent.utils] Joining topic for Front Door - Lock:2504080 ...
2022-07-29 11:25:44 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> false
2022-07-29 11:25:44 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 11:25:52 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> UNLOCK_VIA_RF
2022-07-29 11:25:52 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 11:26:00 INFO (MainThread) [smartrent.utils] sending payload ["null", "null", "devices:2504080", "update_attributes", {"device_id": 2504080, "attributes": [{"name": "locked", "value": "true"}]}]
2022-07-29 11:26:00 INFO (MainThread) [smartrent.utils] Joining topic for Front Door - Lock:2504080 ...
2022-07-29 11:26:01 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> true
2022-07-29 11:26:01 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 11:26:05 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> ALARM_TYPE_24_LEVEL_1
2022-07-29 11:26:05 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 11:26:45 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 64
2022-07-29 11:26:45 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 11:29:40 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 11:29:40 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 11:29:40 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 11:29:40 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 11:29:40 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 11:29:40 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 11:29:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'ALARM_TYPE_24_LEVEL_1'}
2022-07-29 11:29:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 11:29:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 11:29:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '75', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '74', 'current_humidity': '64'}
2022-07-29 11:29:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 11:29:40 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 11:33:27 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-07-29 11:33:27 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 11:39:40 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 11:39:40 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 11:39:40 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 11:39:40 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 11:39:40 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 11:39:40 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 11:39:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '75', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '74', 'current_humidity': '64'}
2022-07-29 11:39:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'ALARM_TYPE_24_LEVEL_1'}
2022-07-29 11:39:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 11:39:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 11:39:40 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 11:39:40 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 11:43:26 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-07-29 11:43:26 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 11:43:47 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 63
2022-07-29 11:43:47 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 11:48:48 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 64
2022-07-29 11:48:48 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 11:49:40 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 11:49:40 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 11:49:40 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 11:49:40 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 11:49:40 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 11:49:40 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 11:49:41 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 11:49:41 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 11:49:41 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 11:49:41 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 11:49:41 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 11:49:41 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 11:49:41 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 11:49:41 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 11:49:41 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 11:49:41 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 11:49:41 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 11:49:41 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 11:49:41 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 11:49:41 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 11:49:41 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 11:49:41 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 11:49:41 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 11:49:41 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 11:49:41 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 11:49:41 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 11:49:42 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 11:49:42 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 11:49:42 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 11:49:42 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '75', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'on', 'current_temp': '74', 'current_humidity': '64'}
2022-07-29 11:49:43 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 11:49:43 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'ALARM_TYPE_24_LEVEL_1'}
2022-07-29 11:49:43 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 11:51:47 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-07-29 11:51:47 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 11:54:08 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 66
2022-07-29 11:54:08 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 11:58:15 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> false
2022-07-29 11:58:15 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 11:58:15 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> KEYPAD_UNLOCK_USER_ID__34
2022-07-29 11:58:15 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 11:59:43 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 11:59:43 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 11:59:43 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 11:59:43 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 11:59:43 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 11:59:43 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 11:59:43 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 11:59:43 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 11:59:43 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '75', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '74', 'current_humidity': '66'}
2022-07-29 11:59:43 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'false', 'notifications': 'KEYPAD_UNLOCK_USER_ID__34'}
2022-07-29 11:59:43 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 11:59:43 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 12:01:16 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> USER_DELETED_ID_4
2022-07-29 12:01:16 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-07-29 12:07:29 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 65
2022-07-29 12:07:29 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 12:09:43 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 12:09:43 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 12:09:43 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 12:09:43 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 12:09:43 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 12:09:43 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 12:09:43 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 12:09:43 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 12:09:43 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 12:09:43 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 12:09:43 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 12:09:43 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 12:09:43 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 12:09:43 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 12:09:43 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 12:09:43 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 12:09:43 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 12:09:43 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 12:09:43 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 12:09:43 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 12:09:43 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 12:09:43 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 12:09:43 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 12:09:43 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 12:09:43 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 12:09:43 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '75', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '74', 'current_humidity': '65'}
2022-07-29 12:09:44 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 12:09:44 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 12:09:44 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'false', 'notifications': 'USER_DELETED_ID_4'}
2022-07-29 12:09:44 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 12:09:45 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 12:09:45 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 12:09:45 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 12:09:45 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 12:09:45 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 12:13:10 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 63
2022-07-29 12:13:10 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 12:18:10 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 62
2022-07-29 12:18:10 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 12:19:45 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 12:19:45 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 12:19:45 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 12:19:45 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 12:19:45 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 12:19:45 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 12:19:45 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-07-29 12:19:45 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '75', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '74', 'current_humidity': '62'}
2022-07-29 12:19:45 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 12:19:45 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'false', 'notifications': 'USER_DELETED_ID_4'}
2022-07-29 12:19:45 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 12:19:45 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-07-29 12:25:11 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 63
2022-07-29 12:25:11 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-07-29 12:29:46 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-07-29 12:29:46 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-07-29 12:29:46 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-07-29 12:29:46 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-07-29 12:29:46 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-07-29 12:29:46 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-07-29 12:29:46 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 12:29:46 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 12:29:46 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 12:29:46 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 12:29:46 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 12:29:46 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 12:29:46 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 12:29:46 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 12:29:46 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-07-29 12:29:46 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-07-29 12:29:46 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 12:29:46 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 12:29:46 WARNING (MainThread) [smartrent.utils] Exception occured! InvalidAuthError <class 'smartrent.utils.InvalidAuthError'>
2022-07-29 12:29:46 WARNING (MainThread) [smartrent.utils] Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 159, in async_get_device_data
    res = await self._async_get_device_data(id)
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 181, in _async_get_device_data
    raise InvalidAuthError(device_dict.get("errors"))
smartrent.utils.InvalidAuthError: [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 324, in _async_update_state_via_fetch
    await self._async_fetch_subscribed_devices_status()
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 278, in _async_fetch_subscribed_devices_status
    await asyncio.gather(
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/device.py", line 89, in _async_fetch_state
    device_data = await self._client.async_get_device_data(self._device_id)
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 162, in async_get_device_data
    await self.async_refresh_token()
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 212, in async_refresh_token
    raise InvalidAuthError(
smartrent.utils.InvalidAuthError: Token not retrieved! Loggin probably not successful: [{'code': 'conflict', 'description': 'conflict'}]

2022-07-29 12:29:46 WARNING (MainThread) [smartrent.utils] Retrying fetches in 600 seconds...
2022-07-29 12:29:46 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 12:29:46 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 12:29:46 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 12:29:46 WARNING (MainThread) [smartrent.utils] Refreshing with refresh_token failed with [{'code': 'unauthorized', 'description': 'Must include valid Authorization credentials'}]. Trying with email and pass instead.
2022-07-29 12:29:46 INFO (MainThread) [smartrent.utils] Refreshing tokens with email
2022-07-29 12:29:46 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'false', 'notifications': 'USER_DELETED_ID_4'}
2022-07-29 12:29:47 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 12:29:47 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-07-29 12:29:47 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 12:29:47 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '75', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'on', 'current_temp': '74', 'current_humidity': '63'}
2022-07-29 12:29:47 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-07-29 12:29:48 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}

@ZacheryThomas
Copy link
Owner

ZacheryThomas commented Jul 29, 2022

Ok! Thanks for the logs. I think I have somewhat of an idea of whats going on. Looks like its trying to refresh some auth stuff too fast and ends up breaking itself. I'll try to write a fix for this soon.

@ZacheryThomas
Copy link
Owner

Should be fixed with the latest update. Can you give it another go?

@jerryc05
Copy link
Author

jerryc05 commented Aug 2, 2022

just updated. I might need a few days to test this fix. If i did not follow up after a week then probably this issue was fixed successfully

@jerryc05
Copy link
Author

jerryc05 commented Aug 2, 2022

still receiving these error message with v0.2.3

2022-08-02 13:30:03 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 13:30:03 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 13:30:03 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 13:30:03 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 13:30:03 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 13:50:04 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 13:50:04 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 13:50:04 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 13:50:04 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 13:50:04 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 14:10:04 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 14:10:04 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 14:10:04 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 14:10:04 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 14:10:04 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 14:50:05 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 14:50:05 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 14:50:05 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 14:50:05 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 14:50:05 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 15:30:06 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 15:30:06 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 15:30:06 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 15:30:06 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 15:30:06 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...

I turned off debug logging when I got these logging. I just turned on debug logging and I will update logs by tonight.

@ZacheryThomas
Copy link
Owner

ZacheryThomas commented Aug 2, 2022

The warning InvalidAuth detected. Trying again with updated token... is pretty normal. That just happens periodically if some auth tokens need to be refreshed.

If we still have logs like smartrent.utils.InvalidAuthError: Token not retrieved! Loggin probably not successful: [{'code': 'conflict', 'description': 'conflict'}] then that would indicate that underlying problem that causes the integration to stop working is still occurring.

Def let me know if you see anything like that once you turn back on debugging.

@jerryc05
Copy link
Author

jerryc05 commented Aug 2, 2022

There you go the logs. So far did not see any exception from smartrent module. Any idea?

2022-08-02 15:59:47 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-08-02 16:00:04 WARNING (MainThread) [zeroconf] Error with socket 9 (('0.0.0.0', 5353))): [Errno 65] No route to host
Traceback (most recent call last):
  File "~/Programs/miniconda3/lib/python3.10/asyncio/selector_events.py", line 1054, in sendto
    self._sock.sendto(data, addr)
OSError: [Errno 65] No route to host
2022-08-02 16:03:10 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-08-02 16:03:10 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-08-02 16:03:10 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-08-02 16:03:10 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-08-02 16:03:10 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-08-02 16:03:10 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-08-02 16:03:10 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:03:10 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-08-02 16:03:10 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:03:10 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:03:10 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:03:10 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-08-02 16:03:10 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 16:03:10 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'auto', 'current_temp': '74', 'current_humidity': '58'}
2022-08-02 16:03:10 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-08-02 16:03:10 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-08-02 16:03:10 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:03:10 INFO (MainThread) [smartrent.utils] Token not expired. Not refreshing.
2022-08-02 16:03:10 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 16:03:10 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-08-02 16:13:10 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-08-02 16:13:10 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-08-02 16:13:10 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-08-02 16:13:10 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-08-02 16:13:10 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-08-02 16:13:10 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-08-02 16:13:10 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'auto', 'current_temp': '74', 'current_humidity': '58'}
2022-08-02 16:13:10 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 16:13:10 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 16:13:10 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-08-02 16:13:10 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-08-02 16:13:10 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-08-02 16:17:42 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-08-02 16:17:42 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-08-02 16:18:09 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 56
2022-08-02 16:18:09 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-08-02 16:23:03 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-08-02 16:23:03 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-08-02 16:23:10 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-08-02 16:23:10 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-08-02 16:23:10 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-08-02 16:23:10 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-08-02 16:23:10 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-08-02 16:23:10 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-08-02 16:23:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:23:11 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-08-02 16:23:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:23:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:23:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:23:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:23:11 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-08-02 16:23:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'auto', 'current_temp': '74', 'current_humidity': '56'}
2022-08-02 16:23:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-08-02 16:23:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 16:23:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 16:23:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-08-02 16:23:11 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-08-02 16:32:10 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 55
2022-08-02 16:32:10 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-08-02 16:33:11 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-08-02 16:33:11 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-08-02 16:33:11 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-08-02 16:33:11 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-08-02 16:33:11 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-08-02 16:33:11 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-08-02 16:33:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-08-02 16:33:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'auto', 'current_temp': '74', 'current_humidity': '55'}
2022-08-02 16:33:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-08-02 16:33:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 16:33:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 16:33:11 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-08-02 16:40:11 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 56
2022-08-02 16:40:11 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-08-02 16:43:11 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-08-02 16:43:11 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-08-02 16:43:11 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-08-02 16:43:11 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-08-02 16:43:11 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-08-02 16:43:11 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-08-02 16:43:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:43:11 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-08-02 16:43:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:43:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:43:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:43:11 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-08-02 16:43:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 16:43:11 INFO (MainThread) [smartrent.utils] Token not expired. Not refreshing.
2022-08-02 16:43:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'auto', 'current_temp': '74', 'current_humidity': '56'}
2022-08-02 16:43:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 16:43:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 16:43:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'true', 'notifications': 'PALM_TOUCH_LOCK'}
2022-08-02 16:43:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-08-02 16:43:11 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-08-02 16:44:08 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> KEYPAD_UNLOCK_USER_ID__34
2022-08-02 16:44:08 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-08-02 16:44:08 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> false
2022-08-02 16:44:08 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-08-02 16:46:11 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 55
2022-08-02 16:46:11 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-08-02 16:47:03 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> true
2022-08-02 16:47:03 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-08-02 16:47:04 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> PALM_TOUCH_LOCK
2022-08-02 16:47:04 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-08-02 16:50:49 INFO (MainThread) [smartrent.utils] sending payload ["null", "null", "devices:2504080", "update_attributes", {"device_id": 2504080, "attributes": [{"name": "locked", "value": "false"}]}]
2022-08-02 16:50:49 INFO (MainThread) [smartrent.utils] Joining topic for Front Door - Lock:2504080 ...
2022-08-02 16:50:52 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> false
2022-08-02 16:50:52 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-08-02 16:51:00 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> UNLOCK_VIA_RF
2022-08-02 16:51:00 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-08-02 16:52:42 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> off
2022-08-02 16:52:42 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-08-02 16:53:11 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-08-02 16:53:11 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-08-02 16:53:11 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-08-02 16:53:11 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-08-02 16:53:11 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-08-02 16:53:11 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-08-02 16:53:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 16:53:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'false', 'notifications': 'UNLOCK_VIA_RF'}
2022-08-02 16:53:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 16:53:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'off', 'fan_mode': 'auto', 'current_temp': '74', 'current_humidity': '55'}
2022-08-02 16:53:11 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-08-02 16:53:11 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-08-02 16:55:32 INFO (MainThread) [smartrent.utils] MultiLvlSensor  -> current_humidity -> 56
2022-08-02 16:55:32 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-08-02 16:59:03 INFO (MainThread) [smartrent.utils] ThermostatOperatingState -> operating_state -> cooling
2022-08-02 16:59:03 INFO (MainThread) [smartrent.thermostat] Updating Thermostat
2022-08-02 17:03:11 INFO (MainThread) [smartrent.utils] Fetching current status for all devices...
2022-08-02 17:03:11 INFO (MainThread) [smartrent.device] Kitchen Sink - Leak Sensor: Fetching data from device endpoint...
2022-08-02 17:03:11 INFO (MainThread) [smartrent.device] Front Door - Lock: Fetching data from device endpoint...
2022-08-02 17:03:11 INFO (MainThread) [smartrent.device] Thermostat: Fetching data from device endpoint...
2022-08-02 17:03:11 INFO (MainThread) [smartrent.device] Washer - Leak Sensor: Fetching data from device endpoint...
2022-08-02 17:03:11 INFO (MainThread) [smartrent.device] Kitchen: Fetching data from device endpoint...
2022-08-02 17:03:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 17:03:11 INFO (MainThread) [smartrent.utils] Refreshing tokens with refresh token
2022-08-02 17:03:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 17:03:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 17:03:11 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 17:03:12 WARNING (MainThread) [smartrent.utils] InvalidAuth detected. Trying again with updated token...
2022-08-02 17:03:12 INFO (MainThread) [smartrent.utils] Tokens refreshed!
2022-08-02 17:03:12 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 17:03:12 INFO (MainThread) [smartrent.device] constructed attribute structure: {'access_codes_supported': 'true', 'locked': 'false', 'notifications': 'UNLOCK_VIA_RF'}
2022-08-02 17:03:12 INFO (MainThread) [smartrent.device] constructed attribute structure: {'on': 'true'}
2022-08-02 17:03:12 INFO (MainThread) [smartrent.device] constructed attribute structure: {'cooling_setpoint': '74', 'mode': 'cool', 'heating_setpoint': '71', 'operating_state': 'cooling', 'fan_mode': 'auto', 'current_temp': '74', 'current_humidity': '56'}
2022-08-02 17:03:12 INFO (MainThread) [smartrent.device] constructed attribute structure: {'leak': 'false'}
2022-08-02 17:03:12 INFO (MainThread) [smartrent.utils] Done fetching data!
2022-08-02 17:04:15 INFO (MainThread) [smartrent.utils] DoorLock        -> locked          -> true
2022-08-02 17:04:15 INFO (MainThread) [smartrent.lock] Updating DoorLock
2022-08-02 17:04:15 INFO (MainThread) [smartrent.utils] Notifications   -> notifications   -> KEY_OR_THUMBTURN_LOCK
2022-08-02 17:04:15 INFO (MainThread) [smartrent.lock] Updating DoorLock

@ZacheryThomas
Copy link
Owner

Those logs look pretty normal. Have you encountered an instance where the integration is not getting the right data still?

@jerryc05
Copy link
Author

jerryc05 commented Aug 3, 2022

Hmmm nothing went wrong so far tho. I'll update if anything failed to work

@jerryc05
Copy link
Author

jerryc05 commented Aug 3, 2022

Just a note, I got this exception printed to the terminal, but everything works fine.

2022-08-03 15:47:02.167 WARNING (MainThread) [smartrent.utils] Exception occured! ConnectionClosedError <class 'websockets.exceptions.ConnectionClosedError'>
2022-08-03 15:47:02.169 WARNING (MainThread) [smartrent.utils] Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/framing.py", line 70, in read
    data = await reader(2)
  File "~/Programs/miniconda3/lib/python3.10/asyncio/streams.py", line 706, in readexactly
    raise exceptions.IncompleteReadError(incomplete, n)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 2 expected bytes

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "~/hass_venv/lib/python3.10/site-packages/smartrent/utils.py", line 400, in _async_update_state_via_ws
    async for message in websocket:
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 482, in __aiter__
    yield await self.recv()
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 553, in recv
    await self.ensure_open()
  File "~/hass_venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 921, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: no close frame received or sent

@ZacheryThomas
Copy link
Owner

Alrighty! Going to close this one out since things seem to be working as expected. Feel free to open up a new issue if things end up breaking again.

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

2 participants