dalinicus / homeassistant-acinfinity

AC Infinity integration for Home Assistant for UIS based controllers
MIT License
75 stars 4 forks source link

Unable to refresh from data update coordinator. #47

Closed towerrh closed 7 months ago

towerrh commented 7 months ago

Hello, It appears Im experiencing an issue with the API this morning.

'msg': 'Something went wrong with your request.\nPlease try again later.', 'code': 100001} (home_assistant_error)

Unable to update settings. Retry attempt limit exceeded

Are these API rate limits? If so, what are those rate limits?

towerrh commented 7 months ago

`Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:238 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 12:15:16 PM (3 occurrences) Last logged: 12:18:33 PM

[140590697487040] {'msg': 'Something went wrong with your request.\nPlease try again later.', 'code': 100001} Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2149, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2186, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 882, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 952, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/ac_infinity/switch.py", line 256, in async_turn_off await self.entity_description.set_value_fn( File "/config/custom_components/ac_infinity/ac_infinity.py", line 228, in set_device_port_setting await self.set_device_port_settings(device_id, port_id, [(setting, value)]) File "/config/custom_components/ac_infinity/ac_infinity.py", line 237, in set_device_port_settings await self._client.set_device_port_settings( File "/config/custom_components/ac_infinity/client.py", line 105, in set_device_portsettings = await self.post(API_URL_ADD_DEV_MODE, payload, headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ac_infinity/client.py", line 119, in post raise ACInfinityClientRequestFailed(json) custom_components.ac_infinity.client.ACInfinityClientRequestFailed: {'msg': 'Something went wrong with your request.\nPlease try again later.', 'code': 100001} `

Vandewaetere commented 7 months ago

@dalinicus I can confirm the issue that @towerrh has, I am seeing the same thing in the logs.

`Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:238 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 3:48:16 PM (4 occurrences) Last logged: 3:57:59 PM

[140563107183168] {'msg': 'Something went wrong with your request.\nPlease try again later.', 'code': 100001} [140561580358336] {'msg': 'Something went wrong with your request.\nPlease try again later.', 'code': 100001} [140561578258880] {'msg': 'Something went wrong with your request.\nPlease try again later.', 'code': 100001} Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2149, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2186, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 882, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 952, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/number/init.py", line 111, in async_set_value await entity.async_set_native_value(native_value) File "/config/custom_components/ac_infinity/number.py", line 380, in async_set_native_value await self.entity_description.set_value_fn(self.ac_infinity, self.port, value) File "/config/custom_components/ac_infinity/ac_infinity.py", line 228, in set_device_port_setting await self.set_device_port_settings(device_id, port_id, [(setting, value)]) File "/config/custom_components/ac_infinity/ac_infinity.py", line 237, in set_device_port_settings await self._client.set_device_port_settings( File "/config/custom_components/ac_infinity/client.py", line 105, in set_device_portsettings = await self.post(API_URL_ADD_DEV_MODE, payload, headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ac_infinity/client.py", line 119, in post raise ACInfinityClientRequestFailed(json) custom_components.ac_infinity.client.ACInfinityClientRequestFailed: {'msg': 'Something went wrong with your request.\nPlease try again later.', 'code': 100001} `

towerrh commented 7 months ago

I did speak with their customer service last night. It appears they were performing a server upgrade to the service that might have caused API degradation. I power cycled the pro + and that seemed to have resolved my issue at least for now. Im not sure if it was the controller itself having issues or the API. It appears to be both.

Vandewaetere commented 7 months ago

I did speak with their customer service last night. It appears they were performing a server upgrade to the service that might have caused API degradation. I power cycled the pro + and that seemed to have resolved my issue at least for now. Im not sure if it was the controller itself having issues or the API. It appears to be both.

Ok I will check this evening if a reboot of the controller helps.

dalinicus commented 7 months ago

Sounds like the issue with the API is solved, and I'm not noticing anything wrong on my end. Closing this ticket since we unfortunately don't have any control over when the API is down. Thanks for reporting the issue though.