Misiu / argon40

Home Assistant support for Argon ONE Pi 3 & 4 cases and Argon Fan HAT
MIT License
117 stars 22 forks source link

Argon40 services not loaded anymore since at least HA 2024.6 #74

Closed Tibronx closed 1 month ago

Tibronx commented 2 months ago

Hi,

It was working for years and now suddenly not recognized anymore - HA 2024.6 & 2024.7 got same behavior. Argon40 services (set fan speed) are not loaded anymore, not available via developer tools either. I suspect a change within HA that impact custom_components/argon40/init.py file.

Below logs: 2024-07-12 15:28:23.762 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration argon40 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 2024-07-12 15:28:27.155 WARNING (MainThread) [homeassistant.components.meteo_france] 1 hour rain forecast not available. Thusy - Rhône-Alpes (74) - FR is not in covered zone 2024-07-12 15:28:30.067 WARNING (ImportExecutor_0) [homeassistant.helpers.typing] HomeAssistantType was used from argon40, this is a deprecated alias which will be removed in HA Core 2025.5. Use homeassistant.core.HomeAssistant instead, please report it to the author of the 'argon40' custom integration 2024-07-12 15:28:30.075 ERROR (MainThread) [homeassistant.setup] Error during setup of component argon40 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 404, in _async_setup_component result = await task ^^^^^^^^^^ File "/config/custom_components/argon40/init.py", line 71, in async_setup GPIO.add_event_detect(shutdown_pin, GPIO.BOTH, callback=event_detect_callback) RuntimeError: Failed to add edge detection 2024-07-12 15:28:40.758 ERROR (MainThread) [homeassistant.components.automation.argon_one_fan_speed_0_50degc_init] Argon One: Fan speed 0% (<50°C) - INIT: Error executing script. Service not found for call_service at pos 1: Service argon40.set_fan_speed not found 2024-07-12 15:28:46.005 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/pysiaalarm/data/sia_codes.json', 'rb') in /usr/local/lib/python3.12/site-packages/pkg_resources/init.py, line 1758: return open(self._fn(self.module_path, resource_name), 'rb') inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.12/site-packages/pysiaalarm/aio/server.py", line 54, in handle_line event = self.parse_and_check_event(data) File "/usr/local/lib/python3.12/site-packages/pysiaalarm/base_server.py", line 64, in parse_and_check_event event = SIAEvent.from_line(line, self.accounts) File "/usr/local/lib/python3.12/site-packages/pysiaalarm/event.py", line 161, in from_line return SIAEvent( File "", line 28, in init File "/usr/local/lib/python3.12/site-packages/pysiaalarm/event.py", line 266, in post_init__ self.set_sia_code() File "/usr/local/lib/python3.12/site-packages/pysiaalarm/event.py", line 106, in set_sia_code self.sia_code = _load_sia_codes().get(self.code) # pylint: disable=E1101 File "/usr/local/lib/python3.12/site-packages/pysiaalarm/data/data.py", line 44, in _load_sia_codes data = _load_data(FILE_SIA_CODES) File "/usr/local/lib/python3.12/site-packages/pysiaalarm/data/data.py", line 38, in _load_data stream = pkg_resources.resource_stream(name, file) File "/usr/local/lib/python3.12/site-packages/pkg_resources/init.py", line 1248, in resource_stream return get_provider(package_or_requirement).get_resource_stream( File "/usr/local/lib/python3.12/site-packages/pkg_resources/init__.py", line 1758, in get_resource_stream return open(self._fn(self.module_path, resource_name), 'rb')

2024-07-12 15:33:30.670 ERROR (MainThread) [homeassistant.components.automation.argon_one_fan_speed_10_50degc] Argon One: Fan speed 10% (>50°C): Error executing script. Service not found for call_service at pos 1: Service argon40.set_fan_speed not found 2024-07-12 15:37:00.677 ERROR (MainThread) [homeassistant.components.automation.argon_one_fan_speed_10_50degc] Argon One: Fan speed 10% (>50°C): Error executing script. Service not found for call_service at pos 1: Service argon40.set_fan_speed not found 2024-07-12 15:38:40.478 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.home_to_gva_p51 is taking over 10 seconds

Tibronx commented 2 months ago

Other logs that might help:

Logger: homeassistant.setup Source: setup.py:404 First occurred: 3:28:30 PM (1 occurrences) Last logged: 3:28:30 PM

Error during setup of component argon40 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 404, in _async_setup_component result = await task ^^^^^^^^^^ File "/config/custom_components/argon40/init.py", line 71, in async_setup GPIO.add_event_detect(shutdown_pin, GPIO.BOTH, callback=event_detect_callback) RuntimeError: Failed to add edge detection

Misiu commented 2 months ago

Hi, sorry for the late reply. Take a look at https://github.com/Misiu/argon40/issues/69

The recent version of HAOS removed/changed GPIO access. I'm working on a new version of the integration with changed library.

Tibronx commented 1 month ago

@Misiu Thanks ! I missed that one. Workaround worked.