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

Unavailable devices after Error requesting Fujitsu HVAC data #130612

Closed
Danglot-EM opened this issue Nov 14, 2024 · 13 comments · Fixed by #135202
Closed

Unavailable devices after Error requesting Fujitsu HVAC data #130612

Danglot-EM opened this issue Nov 14, 2024 · 13 comments · Fixed by #135202

Comments

@Danglot-EM
Copy link

The problem

Sometimes my Aircon devices are unavailable in Home Assitant.
It seems that it is related to a requesting error, I found this in the logs:
`Logger: homeassistant.components.fujitsu_fglair.coordinator
Source: helpers/update_coordinator.py:395
integration: FGLair (documentation, issues)
First occurred: 13 November 2024 at 21:34:13 (17 occurrences)
Last logged: 12:16:26

Error requesting Fujitsu HVAC data data: 429, message='Attempt to decode JSON with unexpected mimetype: ', url='https://ads-eu.aylanetworks.com/apiv1/dsns/AC000W00******/properties.json'
Error requesting Fujitsu HVAC data data: 429, message='Attempt to decode JSON with unexpected mimetype: ', url='https://ads-eu.aylanetworks.com/apiv1/dsns/AC000W00******/properties.json'
Error requesting Fujitsu HVAC data data: 429, message='Attempt to decode JSON with unexpected mimetype: ', url='https://ads-eu.aylanetworks.com/apiv1/dsns/AC000W00******/properties.json'
Error requesting Fujitsu HVAC data data: 429, message='Attempt to decode JSON with unexpected mimetype: ', url='https://ads-eu.aylanetworks.com/apiv1/dsns/AC000W00******/properties.json'`

If I reload the integration it is fixed, also, after a while it is automatically fixed. Maybe the integration should be more tolerant to this error.

What version of Home Assistant Core has the issue?

core-2024.11.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

fujitsu_fglair

Link to integration documentation on our website

https://www.home-assistant.io/integrations/fujitsu_fglair

Diagnostics information

2024-11-14 13:09:15.049 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140732845430608] Unexpected exception
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/core.py", line 2802, in async_call
response_data = await coro
^^^^^^^^^^
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/core.py", line 2845, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/service.py", line 1007, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/climate/init.py", line 786, in async_handle_set_swing_mode_service
await self.async_set_swing_mode(swing_mode)
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/fujitsu_fglair/climate.py", line 136, in async_set_swing_mode
await self.device.async_set_swing_mode(HA_TO_FUJI_SWING[swing_mode])
File "/srv/homeassistant/lib/python3.12/site-packages/ayla_iot_unofficial/fujitsu_hvac.py", line 387, in async_set_swing_mode
await self.async_set_horizontal_swing(False)
File "/srv/homeassistant/lib/python3.12/site-packages/ayla_iot_unofficial/fujitsu_hvac.py", line 405, in async_set_horizontal_swing
raise SettingNotSupportedError("Device does not support horizontal swing")
ayla_iot_unofficial.fujitsu_hvac.SettingNotSupportedError: Device does not support horizontal swing
2024-11-14 13:10:11.191 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140732845430608] Unexpected exception
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/core.py", line 2802, in async_call
response_data = await coro
^^^^^^^^^^
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/core.py", line 2845, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/service.py", line 1007, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/climate/init.py", line 786, in async_handle_set_swing_mode_service
await self.async_set_swing_mode(swing_mode)
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/fujitsu_fglair/climate.py", line 136, in async_set_swing_mode
await self.device.async_set_swing_mode(HA_TO_FUJI_SWING[swing_mode])
File "/srv/homeassistant/lib/python3.12/site-packages/ayla_iot_unofficial/fujitsu_hvac.py", line 387, in async_set_swing_mode
await self.async_set_horizontal_swing(False)
File "/srv/homeassistant/lib/python3.12/site-packages/ayla_iot_unofficial/fujitsu_hvac.py", line 405, in async_set_horizontal_swing
raise SettingNotSupportedError("Device does not support horizontal swing")
ayla_iot_unofficial.fujitsu_hvac.SettingNotSupportedError: Device does not support horizontal swing
2024-11-14 13:10:19.485 ERROR (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Error requesting Fujitsu HVAC data data: 429, message='Attempt to decode JSON with unexpected mimetype: ', url='https://ads-eu.aylanetworks.com/apiv1/dsns/AC000W002538549/properties.json'
2024-11-14 13:10:19.485 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.174 seconds (success: False)

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @crevetor, mind taking a look at this issue as it has been labeled with an integration (fujitsu_fglair) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of fujitsu_fglair can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign fujitsu_fglair Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


fujitsu_fglair documentation
fujitsu_fglair source
(message by IssueLinks)

@balouken
Copy link

I have the same problem.
After installing the new integration, from time to time i have unavailible devices.
I was allready happy that the minimum temperature in heating was possible to set to minimal 16°C without errors.
But this is what i have from logs:

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1304, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 182, in update
self._fujitsu_device.refresh_properties()
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/splitAC.py", line 30, in refresh_properties
self._properties = self._api._get_device_properties(self._dsn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 70, in _get_device_properties
response = self._call_api("get",self._API_GET_PROPERTIES_URL.format(DSN=dsn),access_token=access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 164, in _call_api
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://ads-field-eu.aylanetworks.com/apiv1/dsns/AC000W002408022/properties.json
2024-11-17 17:18:22.655 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.599 seconds (success: True)
2024-11-17 17:23:14.408 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.woonkamer fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1304, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 182, in update
self._fujitsu_device.refresh_properties()
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/splitAC.py", line 30, in refresh_properties
self._properties = self._api._get_device_properties(self._dsn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 70, in _get_device_properties
response = self._call_api("get",self._API_GET_PROPERTIES_URL.format(DSN=dsn),access_token=access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 164, in _call_api
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://ads-field-eu.aylanetworks.com/apiv1/dsns/AC000W002535834/properties.json
2024-11-17 17:23:23.558 ERROR (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Error requesting Fujitsu HVAC data data: 429, message='Attempt to decode JSON with unexpected mimetype: ', url='https://ads-eu.aylanetworks.com/apiv1/dsns/AC000W002535834/properties.json'
2024-11-17 17:23:23.558 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.502 seconds (success: False)
2024-11-17 17:25:14.260 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.woonkamer fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1304, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 182, in update
self._fujitsu_device.refresh_properties()
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/splitAC.py", line 30, in refresh_properties
self._properties = self._api._get_device_properties(self._dsn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 70, in _get_device_properties
response = self._call_api("get",self._API_GET_PROPERTIES_URL.format(DSN=dsn),access_token=access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 164, in _call_api
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://ads-field-eu.aylanetworks.com/apiv1/dsns/AC000W002535834/properties.json
2024-11-17 17:25:35.368 INFO (MainThread) [alexapy.alexalogin] Exchanged refresh token for 5 .amazon.com cookies: ['session-id', 'ubid-main', 'x-main', 'at-main', 'sess-at-main']
2024-11-17 17:25:40.496 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 1.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 17:25:41.685 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 2.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 17:25:43.880 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 4.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 17:25:48.070 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 8.0s (alexapy.errors.AlexapyTooManyRequestsError)
2024-11-17 17:25:50.281 WARNING (MainThread) [alexapy.helpers] alexaapi.get_customer_history_records((<alexapy.alexalogin.AlexaLogin object at 0x7ff6e28c1df0>,), {'max_record_size': 10}): Timeout error occurred accessing AlexaAPI: An exception of type CancelledError occurred. Arguments:
()
2024-11-17 17:26:13.972 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.bureau fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1304, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 182, in update
self._fujitsu_device.refresh_properties()
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/splitAC.py", line 30, in refresh_properties
self._properties = self._api._get_device_properties(self._dsn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 70, in _get_device_properties
response = self._call_api("get",self._API_GET_PROPERTIES_URL.format(DSN=dsn),access_token=access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 164, in _call_api
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://ads-field-eu.aylanetworks.com/apiv1/dsns/AC000W002408022/properties.json
2024-11-17 17:27:14.342 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.woonkamer fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1304, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 182, in update
self._fujitsu_device.refresh_properties()
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/splitAC.py", line 30, in refresh_properties
self._properties = self._api._get_device_properties(self._dsn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 70, in _get_device_properties
response = self._call_api("get",self._API_GET_PROPERTIES_URL.format(DSN=dsn),access_token=access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 164, in _call_api
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://ads-field-eu.aylanetworks.com/apiv1/dsns/AC000W002535834/properties.json
2024-11-17 17:28:23.665 INFO (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Fetching Fujitsu HVAC data data recovered
2024-11-17 17:28:23.665 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.609 seconds (success: True)
2024-11-17 17:33:24.668 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.612 seconds (success: True)
2024-11-17 17:35:54.821 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 1.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 17:35:56.223 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 2.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 17:35:58.627 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 4.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 17:36:03.038 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 8.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 17:36:04.350 WARNING (MainThread) [alexapy.helpers] alexaapi.get_customer_history_records((<alexapy.alexalogin.AlexaLogin object at 0x7ff6e28c1df0>,), {'max_record_size': 10}): Timeout error occurred accessing AlexaAPI: An exception of type CancelledError occurred. Arguments:
()
2024-11-17 17:38:25.923 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.866 seconds (success: True)
2024-11-17 17:43:26.687 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.630 seconds (success: True)
2024-11-17 17:46:08.557 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 1.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 17:46:10.201 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 2.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 17:46:12.366 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 4.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 17:46:16.564 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 8.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 17:46:18.313 WARNING (MainThread) [alexapy.helpers] alexaapi.get_customer_history_records((<alexapy.alexalogin.AlexaLogin object at 0x7ff6e28c1df0>,), {'max_record_size': 10}): Timeout error occurred accessing AlexaAPI: An exception of type CancelledError occurred. Arguments:
()
2024-11-17 17:48:27.706 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.649 seconds (success: True)
2024-11-17 17:49:14.409 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.woonkamer fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1304, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 182, in update
self._fujitsu_device.refresh_properties()
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/splitAC.py", line 30, in refresh_properties
self._properties = self._api._get_device_properties(self._dsn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 70, in _get_device_properties
response = self._call_api("get",self._API_GET_PROPERTIES_URL.format(DSN=dsn),access_token=access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 164, in _call_api
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://ads-field-eu.aylanetworks.com/apiv1/dsns/AC000W002535834/properties.json
2024-11-17 17:53:28.823 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.766 seconds (success: True)
2024-11-17 17:56:22.814 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 1.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 17:56:23.962 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 2.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 17:58:29.740 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.682 seconds (success: True)
2024-11-17 18:01:14.021 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.bureau fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1304, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 182, in update
self._fujitsu_device.refresh_properties()
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/splitAC.py", line 30, in refresh_properties
self._properties = self._api._get_device_properties(self._dsn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 70, in _get_device_properties
response = self._call_api("get",self._API_GET_PROPERTIES_URL.format(DSN=dsn),access_token=access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 164, in _call_api
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://ads-field-eu.aylanetworks.com/apiv1/dsns/AC000W002408022/properties.json
2024-11-17 18:02:18.025 INFO (MainThread) [custom_components.hacs] Loading known repositories
2024-11-17 18:03:30.741 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.685 seconds (success: True)
2024-11-17 18:07:14.057 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.bureau fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1304, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 182, in update
self._fujitsu_device.refresh_properties()
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/splitAC.py", line 30, in refresh_properties
self._properties = self._api._get_device_properties(self._dsn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 70, in _get_device_properties
response = self._call_api("get",self._API_GET_PROPERTIES_URL.format(DSN=dsn),access_token=access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 164, in _call_api
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://ads-field-eu.aylanetworks.com/apiv1/dsns/AC000W002408022/properties.json
2024-11-17 18:08:31.748 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.691 seconds (success: True)
2024-11-17 18:10:13.735 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.keuken fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1304, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 182, in update
self._fujitsu_device.refresh_properties()
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/splitAC.py", line 30, in refresh_properties
self._properties = self._api._get_device_properties(self._dsn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 70, in _get_device_properties
response = self._call_api("get",self._API_GET_PROPERTIES_URL.format(DSN=dsn),access_token=access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 164, in _call_api
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://ads-field-eu.aylanetworks.com/apiv1/dsns/AC000W000815628/properties.json
2024-11-17 18:13:32.726 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.669 seconds (success: True)
2024-11-17 18:16:35.819 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 1.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 18:18:33.675 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.619 seconds (success: True)
2024-11-17 18:23:34.778 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.722 seconds (success: True)
2024-11-17 18:26:37.606 INFO (MainThread) [alexapy.alexalogin] Exchanged refresh token for 5 .amazon.com cookies: ['session-id', 'ubid-main', 'x-main', 'at-main', 'sess-at-main']
2024-11-17 18:26:42.540 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 1.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 18:26:43.953 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 2.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 18:28:35.664 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.609 seconds (success: True)
2024-11-17 18:30:14.138 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.bureau fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1304, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 182, in update
self._fujitsu_device.refresh_properties()
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/splitAC.py", line 30, in refresh_properties
self._properties = self._api._get_device_properties(self._dsn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 70, in _get_device_properties
response = self._call_api("get",self._API_GET_PROPERTIES_URL.format(DSN=dsn),access_token=access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 164, in _call_api
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://ads-field-eu.aylanetworks.com/apiv1/dsns/AC000W002408022/properties.json
2024-11-17 18:33:36.738 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.682 seconds (success: True)
2024-11-17 18:36:50.507 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 1.0s (alexapy.errors.AlexapyTooManyRequestsError)
2024-11-17 18:38:27.307 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new climate.tuya entity: climate.r_aqua_thermostat_vdevo
2024-11-17 18:38:27.308 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new switch.tuya entity: switch.r_aqua_thermostat_vdevo_child_lock
2024-11-17 18:38:37.772 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.716 seconds (success: True)
2024-11-17 18:40:09.690 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new climate.tuya entity: climate.r_aqua_thermostat_vdevo
2024-11-17 18:40:09.691 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new switch.tuya entity: switch.r_aqua_thermostat_vdevo_child_lock
2024-11-17 18:43:38.784 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.727 seconds (success: True)
2024-11-17 18:46:56.547 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 1.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-11-17 18:48:39.740 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.684 seconds (success: True)
2024-11-17 18:51:13.802 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.keuken fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1304, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 182, in update
self._fujitsu_device.refresh_properties()
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/splitAC.py", line 30, in refresh_properties
self._properties = self._api._get_device_properties(self._dsn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 70, in _get_device_properties
response = self._call_api("get",self._API_GET_PROPERTIES_URL.format(DSN=dsn),access_token=access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 164, in _call_api
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://ads-field-eu.aylanetworks.com/apiv1/dsns/AC000W000815628/properties.json
2024-11-17 18:53:40.708 DEBUG (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Finished fetching Fujitsu HVAC data data in 0.651 seconds (success: True)
2024-11-17 18:57:02.648 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 1.0s (alexapy.errors.AlexapyTooManyRequestsError)
2024-11-17 18:57:14.503 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.woonkamer fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1304, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 182, in update
self._fujitsu_device.refresh_properties()
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/splitAC.py", line 30, in refresh_properties
self._properties = self._api._get_device_properties(self._dsn)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 70, in _get_device_properties
response = self._call_api("get",self._API_GET_PROPERTIES_URL.format(DSN=dsn),access_token=access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitseu/api.py", line 164, in _call_api
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://ads-field-eu.aylanetworks.com/apiv1/dsns/AC000W002535834/properties.json

@crevetor
Copy link
Contributor

@balouken your error comes from the other integration, not fujitsu_fglair as far as I can tell from your logs. @Danglot-EM I'll look into what can be done so that these errors don't cause your device to become unavailable.

@balouken
Copy link

image

@crevetor but my devices getting unavailable every hour or so.
Before when i use another integration, this was not the case.

I take a look to deleta the other integrations config files.... maybe the problems are related with post beginner...

@crevetor
Copy link
Contributor

@balouken maybe it is because both integrations are trying to fetch the same data from the backend at the same time. Try to disable the old integration and see if it fixes it.

@balouken
Copy link

The integration was already deleted.
But login credentials where still available in config.yaml and also the python scripts still where in the folders from Homeassistant.
I manual deleted them now and rebooted my system.
Debug is activated.

For now no errors to see.
I keep you informed tomorow

@balouken
Copy link

Still happening.
See line in log and history of device unavailable state.

became unavailable
21:28:35 - 3 minutes ago

2024-11-17 21:28:35.070 ERROR (MainThread) [homeassistant.components.fujitsu_fglair.coordinator] Error requesting Fujitsu HVAC data data: 429, message='Attempt to decode JSON with unexpected mimetype: ', url='https://ads-eu.aylanetworks.com/apiv1/dsns/AC000W000815628/properties.json'

@allansari
Copy link

It's happening also with, it keep showing unavailable most of the time & I have to restart the Homeassistant every time to reconnect. Here is the log:

Logger: homeassistant.components.fujitsu_fglair.coordinator
Source: helpers/update_coordinator.py:379
integration: FGLair (documentation, issues)
First occurred: 1:10:05 PM (7 occurrences)
Last logged: 10:17:17 PM

Unexpected error fetching Fujitsu HVAC data data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/fujitsu_fglair/coordinator.py", line 59, in _async_update_data
await dev.async_update()
File "/usr/local/lib/python3.13/site-packages/ayla_iot_unofficial/fujitsu_hvac.py", line 69, in wrapped
raise DeviceOffline
ayla_iot_unofficial.fujitsu_hvac.DeviceOffline

@allansari
Copy link

It seems that if one device goes offline, the integration stops & all entities becames unavailable!!!

@allansari
Copy link

Any update, can the code the be updated by which if one device goes offline , it should not impact others??

@allansari
Copy link

Any luck pls @crevetor !!! :(

@crevetor
Copy link
Contributor

crevetor commented Jan 7, 2025

I am working on a patch to address this issue. I should have a PR up in a few days.

@allansari
Copy link

I am working on a patch to address this issue. I should have a PR up in a few days.

Really appreciate it 🙏

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

Successfully merging a pull request may close this issue.

4 participants