home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.67k stars 30.42k forks source link

2022.4 break remote_rpi_gpio / is remote_rpi_gpio is deprecated please? not tell in the actual docs #69473

Closed Electronlibre2012 closed 2 years ago

Electronlibre2012 commented 2 years ago

The problem

my switch.remote_rpi_gpio doesnt work anymore

i am on Intel Nuc8, HassOs, works great for 2 years now

i used SSH&Terminal Add-on from @Frenck :

init_commands:
  - pip3 install gpiozero pigpio
  - GPIOZERO_PIN_FACTORY=pigpio PIGPIO_ADDR=192.168.1.113 python3

What version of Home Assistant Core has the issue?

2022.4

What was the last working version of Home Assistant Core?

2022.3.8

What type of installation are you running?

Home Assistant OS

Integration causing the issue

remote_rpi_gpio

Link to integration documentation on our website

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

Diagnostics information

Logger: homeassistant.config Source: components/remote_rpi_gpio/init.py:3 First occurred: 23:03:07 (1 occurrences) Last logged: 23:03:07 Platform error: switch

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config.py", line 877, in async_process_component_config platform = p_integration.get_platform(domain) File "/usr/src/homeassistant/homeassistant/loader.py", line 603, in get_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 620, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 972, in _find_and_load_unlocked File "", line 228, in _call_with_frames_removed File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/usr/src/homeassistant/homeassistant/components/remote_rpi_gpio/init.py", line 3, in from gpiozero.pins.pigpio import PiGPIOFactory File "/usr/local/lib/python3.9/site-packages/gpiozero/pins/pigpio.py", line 42, in import pigpio ModuleNotFoundError: No module named 'pigpio'

Example YAML snippet

switch:
  - platform: remote_rpi_gpio
    host: 192.168.1.113
    ports:
      17: Alim Ambilight

Anything in the logs that might be useful for us?

Collecting gpiozero
  Downloading gpiozero-1.6.2-py2.py3-none-any.whl (148 kB)
Collecting pigpio
  Downloading pigpio-1.78-py2.py3-none-any.whl (39 kB)
Collecting colorzero
  Downloading colorzero-2.0-py2.py3-none-any.whl (26 kB)
Requirement already satisfied: setuptools in /usr/lib/python3.9/site-packages (from colorzero->gpiozero) (52.0.0)
Installing collected packages: colorzero, pigpio, gpiozero

Additional information

cant restart core anymore because of the error :

Platform error switch.remote_rpi_gpio - No module named 'pigpio'

so need to restart host each time

Can someone help please?

parberge commented 2 years ago

My guess would be related to this: https://www.home-assistant.io/blog/2022/04/06/release-20224/#farewell-to-the-following

Electronlibre2012 commented 2 years ago

My guess would be related to this: https://www.home-assistant.io/blog/2022/04/06/release-20224/#farewell-to-the-following

Thanks,

you mean : pigpio Daemon PWM LED ?

i read this but...is it the same for remote_rpi_gpio, there nothing about deprecated in the docs https://www.home-assistant.io/integrations/remote_rpi_gpio/ ?

@bdraco hello, is it deprecated remote_rpi_gpio from now 2022.4 please?

parberge commented 2 years ago

My guess would be related to this: https://www.home-assistant.io/blog/2022/04/06/release-20224/#farewell-to-the-following

Thanks,

you mean : pigpio Daemon PWM LED ?

i read this but...is it the same for remote_rpi_gpio, there nothing about deprecated in the docs https://www.home-assistant.io/integrations/remote_rpi_gpio/ ?

Sorry I was just guessing without looking into any details since I saw GPIO.

Electronlibre2012 commented 2 years ago

Sorry I was just guessing without looking into any details since I saw GPIO.

no problem,

dont think its deprecated...wait for another reply, thanks

probot-home-assistant[bot] commented 2 years ago

remote_rpi_gpio documentation remote_rpi_gpio source (message by IssueLinks)

elupus commented 2 years ago

I think it's manifestfile is missing mentioning pigpio

Electronlibre2012 commented 2 years ago

thanks.

Any idea to fix? does i need to create one?

in /core/homeassistant/components/remote_rpi_gpio)/ there is a manifest.json , in the docs...and no mention of pigpio...you are right ;)

{
  "domain": "remote_rpi_gpio",
  "name": "remote_rpi_gpio",
  "documentation": "https://www.home-assistant.io/integrations/remote_rpi_gpio",
  "requirements": ["gpiozero==1.5.1"],
  "codeowners": [],
  "iot_class": "local_push",
  "loggers": ["gpiozero"]
}
thecode commented 2 years ago

Looking at the code the integration was broken and rely on requirement from removed integration, I will make a PR to fix it for the next release, in the meantime, the solution https://github.com/home-assistant/core/issues/69473#issuecomment-1090692413 can work for people who know how to edit this file.

Electronlibre2012 commented 2 years ago

thanks a lot! @thecode , like this :

{
  "domain": "remote_rpi_gpio",
  "name": "remote_rpi_gpio",
  "documentation": "https://www.home-assistant.io/integrations/remote_rpi_gpio",
  "requirements": ["gpiozero==1.5.1", "pigpio==1.78"],
  "codeowners": [],
  "iot_class": "local_push",
  "loggers": ["gpiozero"]
}

? thanks

elupus commented 2 years ago

Your log do indicate pigpio was installed though.

Electronlibre2012 commented 2 years ago

yes...dont understand how to temporary fix, modify the manifest and put remote_rpi_gpio folder into custom_component doesnt work for me but i dont really know if its correct syntax and if i just add the

, "pigpio==1.78"

any idea please @thecode ?