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

Errors after a while #13

Open
trottam opened this issue Jan 3, 2025 · 0 comments
Open

Errors after a while #13

trottam opened this issue Jan 3, 2025 · 0 comments

Comments

@trottam
Copy link

trottam commented Jan 3, 2025

Hi,

correctly installed the component and configured in a specific dashboard the Alarm Panel and sensors.
After a while (a random while) HA is sending the following error logs:

`Registratore: homeassistant
Fonte: data_entry_flow.py:590
Prima occorrenza: 00:32:05 (1308 occorrenze)
Ultimo accesso: 15:07:03

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/pyinim/cloud/abc.py", line 71, in get_devices_extended
response = self.resolver.str_to_devices(raw_response, device_id)
File "/usr/local/lib/python3.13/site-packages/pyinim/cloud/resolver.py", line 60, in str_to_devices
update = {device_id: getattr(devices.Data, device_id)}
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '<device_ID>'

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

Traceback (most recent call last):
File "/config/custom_components/minim/init.py", line 65, in async_fetch_minim
_, _, res = await inim_cloud_api.get_devices_extended(device_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyinim/cloud/abc.py", line 75, in get_devices_extended
raise MalformedResponseError(message) from e
pyinim.cloud.exceptions.MalformedResponseError: Failed to get Devices with status=200 and payload raw_response='{"Status":19,"ErrMsg":"Invalid Token","ts":"2025-01-02T23:30:12Z","Data":null}'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1093, in _async_init_reauth
result = await hass.config_entries.flow.async_init(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
)
^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1315, in async_init
flow, result = await self._async_init(flow_id, handler, context, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1350, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 513, in _async_handle_step
self._raise_if_step_does_not_exist(flow, step_id)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 590, in _raise_if_step_does_not_exist
raise UnknownStep(
f"Handler {self.class.name} doesn't support step {step_id}"
)
homeassistant.data_entry_flow.UnknownStep: Handler ConfigEntriesFlowManager doesn't support step reauth`

where <device_ID> is my ID

Additional log

`Registratore: pyinim.cloud.abc
Fonte: custom_components/minim/init.py:65
Integrazione: Minim Alarm (documentazione, problemi)
Prima occorrenza: 00:30:13 (1309 occorrenze)
Ultimo accesso: 15:07:06

Failed to get Devices with status=200 and payload raw_response='{"Status":19,"ErrMsg":"Invalid Token","ts":"2025-01-03T14:04:51Z","Data":null}'
Failed to get Devices with status=200 and payload raw_response='{"Status":19,"ErrMsg":"Invalid Token","ts":"2025-01-03T14:05:25Z","Data":null}'
Failed to get Devices with status=200 and payload raw_response='{"Status":19,"ErrMsg":"Invalid Token","ts":"2025-01-03T14:05:57Z","Data":null}'
Failed to get Devices with status=200 and payload raw_response='{"Status":19,"ErrMsg":"Invalid Token","ts":"2025-01-03T14:06:31Z","Data":null}'
Failed to get Devices with status=200 and payload raw_response='{"Status":19,"ErrMsg":"Invalid Token","ts":"2025-01-03T14:07:05Z","Data":null}'`

Additional log:

`Registratore: homeassistant
Fonte: custom_components/minim/binary_sensor.py:73
Integrazione: Minim Alarm (documentazione, problemi)
Prima occorrenza: 00:30:13 (1309 occorrenze)
Ultimo accesso: 15:07:06

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 267, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 478, in _async_refresh
self.async_update_listeners()
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 177, in async_update_listeners
update_callback()
~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 558, in _handle_coordinator_update
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1085, in __async_calculate_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1029, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/binary_sensor/init.py", line 294, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/minim/binary_sensor.py", line 73, in is_on
zones: list[Zone] = self.coordinator.data.Data[self._device_id].Zones
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'Data'`

Could it be worth to set up the polling rate to 10 secs?

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant