Git Product home page Git Product logo

Comments (26)

thecode avatar thecode commented on September 12, 2024 2

I think I understand the problem now, I was not putting attention that your docker installation might be different. You need to add an environment variable to the wheels repo
This is how it looks like in Home Assistant OS:
image

Something like -e WHEELS_LINKS='https://wheels.home-assistant.io/musllinux/'
Or in compose:

  environment:
    - WHEELS_LINKS=[1](https://wheels.home-assistant.io/musllinux/)

from ha-rpi_gpio.

ScratMan avatar ScratMan commented on September 12, 2024 1

Delete the Rpi GPIO configuration (configuration.yaml). Update Rpi GPIO version 2022.7.0. Restart HA. After reboot, insert Rpi Gpio configuration and restart HA again.

Already done, not working.

The above should work. Your system should be supported and the wheel should be downloaded from https://wheels.home-assistant.io/musllinux/RPi.GPIO-0.7.1-cp310-cp310-musllinux_1_2_armv7l.whl automatically on new install.

You can try:

  1. Repeat the suggestion above again. Maybe remove the rpi_gpio completely, restart HA, do fresh install from HACS and add the configuration back.
  2. Download the wheel from the link above and manually install it: pip install RPi.GPIO-0.7.1-cp310-cp310-musllinux_1_2_armv7l.whl

Thanks, I could fix the issue.
Didn't use the step 1 (I did it several times unsuccessfully), so I had the error at container boot and config check.

So I first connected to the container's console as root, then I used the wget https://wheels.home-assistant.io/musllinux/RPi.GPIO-0.7.1-cp310-cp310-musllinux_1_2_armv7l.whl command to download the wheel.
After that your step 2 worked to install the missing dependency, and I could then check the config successfully and restart Home Assistant without issue, now rpi_gpio works perfectly.

But I really don't understand why the wheel installation could work with manual method and not when using HACS.

from ha-rpi_gpio.

ScratMan avatar ScratMan commented on September 12, 2024 1

After adding the variable to the environment, I could restart the container without issue 😃 . So it seems to be fixed, I'll wait for the next update to confirm.
Thanks a lot.

from ha-rpi_gpio.

ScratMan avatar ScratMan commented on September 12, 2024 1

I think I understand the problem now, I was not putting attention that your docker installation might be different. You need to add an environment variable to the wheels repo This is how it looks like in Home Assistant OS: image

Something like -e WHEELS_LINKS='https://wheels.home-assistant.io/musllinux/' Or in compose:

  environment:
    - WHEELS_LINKS=[1](https://wheels.home-assistant.io/musllinux/)

That definitely solved the issue. Updated to 2022.8.0 today without requiring to manually install the wheel package.

from ha-rpi_gpio.

thecode avatar thecode commented on September 12, 2024

Can you link to the container you are using? Home Assistant core container should not need this package

from ha-rpi_gpio.

ScratMan avatar ScratMan commented on September 12, 2024

Using homeassistant/home-assistant:stable sha256:c2ce05132aa81b4da7bbfff79eb8e82ad7baffd18f4f4b5d9be29e3670517837
https://hub.docker.com/r/homeassistant/home-assistant

from ha-rpi_gpio.

thecode avatar thecode commented on September 12, 2024

Can you add a picture from the first section in System Health?
image

from ha-rpi_gpio.

ScratMan avatar ScratMan commented on September 12, 2024

Here it is.

Screenshot_20220707-201432

from ha-rpi_gpio.

carsten-h avatar carsten-h commented on September 12, 2024

As soon as I uncomment this part in my configuration.yaml:
`
binary_sensor:

  • platform: rpi_gpio
    pull_mode: DOWN
    ports:
    4: Argon One Power Button
    `

my Home Assistant with all the newest versions (2022.7.x) will not restart.

This part is to use the power button of my Argon One Case which is attached to the Pi via gpio.

from ha-rpi_gpio.

pepe59 avatar pepe59 commented on September 12, 2024

Delete the Rpi GPIO configuration (configuration.yaml). Update Rpi GPIO version 2022.7.0. Restart HA. After reboot, insert Rpi Gpio configuration and restart HA again.

from ha-rpi_gpio.

ScratMan avatar ScratMan commented on September 12, 2024

Delete the Rpi GPIO configuration (configuration.yaml). Update Rpi GPIO version 2022.7.0. Restart HA. After reboot, insert Rpi Gpio configuration and restart HA again.

Already done, not working.

from ha-rpi_gpio.

thecode avatar thecode commented on September 12, 2024

Delete the Rpi GPIO configuration (configuration.yaml). Update Rpi GPIO version 2022.7.0. Restart HA. After reboot, insert Rpi Gpio configuration and restart HA again.

Already done, not working.

The above should work. Your system should be supported and the wheel should be downloaded from https://wheels.home-assistant.io/musllinux/RPi.GPIO-0.7.1-cp310-cp310-musllinux_1_2_armv7l.whl automatically on new install.

You can try:

  1. Repeat the suggestion above again. Maybe remove the rpi_gpio completely, restart HA, do fresh install from HACS and add the configuration back.
  2. Download the wheel from the link above and manually install it: pip install RPi.GPIO-0.7.1-cp310-cp310-musllinux_1_2_armv7l.whl

from ha-rpi_gpio.

ScratMan avatar ScratMan commented on September 12, 2024

The issue came back after updating the HA docker container to 2022.7.2

from ha-rpi_gpio.

thecode avatar thecode commented on September 12, 2024

I guessed the issue will come back for you, for some reason your system is not pulling the wheel from Home Assistant, on another PR someone suggested to reboot the host (not only core), can you try it?

from ha-rpi_gpio.

bepece1 avatar bepece1 commented on September 12, 2024

ha-rpi_gpio (v.2022.6.0) works but v.2022.7.0 no works, what's happens?
Testing in homeassistant docker (2022.6.7 and 2022.7.0)

from ha-rpi_gpio.

thecode avatar thecode commented on September 12, 2024

@bepece1 please create a separate issue

from ha-rpi_gpio.

ScratMan avatar ScratMan commented on September 12, 2024

I guessed the issue will come back for you, for some reason your system is not pulling the wheel from Home Assistant, on another PR someone suggested to reboot the host (not only core), can you try it?

I'll try on the next update.

from ha-rpi_gpio.

ScratMan avatar ScratMan commented on September 12, 2024

Today I tried to reboot the Raspberry pi hosting the docker
HA container, rpi_gpio was still working. Then I stopped the container and updated it to 2022.7.3, after restarting container the missing RPi.GPIO 0.7.1 issue raised again. Tried to reboot the host again, but issue is still there.

Fortunately the manual method is still working.

from ha-rpi_gpio.

ReaLogics avatar ReaLogics commented on September 12, 2024

I updated from a 2022.6.x version to 2022.7.5. I am using RPI 3B 32 bit. GPIO has been working for a year. I manually copied your rpi_gpio folder into the /config/custom_components folder. I did not make any changes within my configuration.yaml file. I get the same error on restart: "Requirements for rpi_gpio not found: ['RPi.GPIO==0.7.1a4']". If I can help by providing additional information or testing, let me know.

CONFIGURATION.YAML:

# GPIO#  4  5  6  G  17 22 23 G  24  25 26 G  27 16 19 G   
# PIN #
binary_sensor:
  - platform: rpi_gpio
    invert_logic: true
    ports:
      4: Living Room Front Door
      5: Dining Room Sliding Door
      6: Laundry Room Carport Door
      17: Kitchen Window
      22: Bathroom Window
      23: Living Room Window
      24: Master Bedroom Window
      25: Guest Bedroom Window West
      26: Guest Bedroom Window North
      27: Makerspace Room Window East
      16: Makerspace Room Window North
      19: Living Room PIR

switch:
  - platform: rpi_gpio
    ports:
      2: Alarm Annunciator   

SYSTEM INFORMATION:

Version	core-2022.7.5
Installation Type	Home Assistant OS
Supervisor	true
Docker	true
Python Version	3.10.5
Operating System Family	Linux
Operating System Version	5.15.32-v7
CPU Architecture	armv7l
Configuration Directory	/config
Home Assistant Supervisor
Host Operating System	Home Assistant OS 8.2
Supervisor Version	supervisor-2022.07.0
Agent Version	1.2.1
Docker Version	20.10.14
Board	rpi3

from ha-rpi_gpio.

thecode avatar thecode commented on September 12, 2024

I updated from a 2022.6.x version to 2022.7.5. I am using RPI 3B 32 bit. GPIO has been working for a year. I manually copied your rpi_gpio folder into the /config/custom_components folder. I did not make any changes within my configuration.yaml file. I get the same error on restart: "Requirements for rpi_gpio not found: ['RPi.GPIO==0.7.1a4']". If I can help by providing additional information or testing, let me know.

  1. You have a different issue than this one.
  2. From Home assistant 2022.7 and above you need a new version of the integration due to changes in the Home Assistant wheel system.

Please download the latest release from this repo, if you get an error that contains RPi.GPIO==0.7.1a4 (note the 1a4) you are not using the latest version. If it still doesn't work please create a new issue. Thanks

from ha-rpi_gpio.

ReaLogics avatar ReaLogics commented on September 12, 2024

Thank you for such a quick response! Yes, all is good now! Thank you!

from ha-rpi_gpio.

ScratMan avatar ScratMan commented on September 12, 2024

#83 (comment)

You mention the package now uses python 3.10. My RPI uses 3.7.3, I don't think it should have an impact, as HA is supposed to use it's own python environment from its container. Right ?

from ha-rpi_gpio.

thecode avatar thecode commented on September 12, 2024

#83 (comment)

You mention the package now uses python 3.10. My RPI uses 3.7.3, I don't think it should have an impact, as HA is supposed to use it's own python environment from its container. Right ?

At least from your picture #84 (comment) you are using Python 3.10, if it is not the case it may explain the issue.

from ha-rpi_gpio.

ScratMan avatar ScratMan commented on September 12, 2024

I discovered today that as soon as I stop, edit and then restart the HA docker container, the rpi_gpio package is gone, and I need to reinstall it manually. Even without changing nothing to the container's configuration, so it's not only when updating the image.

from ha-rpi_gpio.

sirjeannot avatar sirjeannot commented on September 12, 2024

I think I understand the problem now, I was not putting attention that your docker installation might be different. You need to add an environment variable to the wheels repo This is how it looks like in Home Assistant OS: image

Something like -e WHEELS_LINKS='https://wheels.home-assistant.io/musllinux/' Or in compose:

  environment:
    - WHEELS_LINKS=[1](https://wheels.home-assistant.io/musllinux/)

just thank you very much. this also solved the exact same issue on my setup.

from ha-rpi_gpio.

tazomatalax avatar tazomatalax commented on September 12, 2024

I am having this error after trying the suggested fixes, it still will not work
tried manually installing

❯ docker exec -it hass sh root@rpi4:/# wget https://wheels.home-assistant.io/musllinux/RPi.GPIO-0.7.1-cp310-cp310-musllinux_1_2_armv7l.whl Connecting to wheels.home-assistant.io (172.67.68.90:443) saving to 'RPi.GPIO-0.7.1-cp310-cp310-musllinux_1_2_armv7l.whl' RPi.GPIO-0.7.1-cp310 100% |************************************************************************| 26931 0:00:00 ETA 'RPi.GPIO-0.7.1-cp310-cp310-musllinux_1_2_armv7l.whl' saved root@rpi4:/# pip install RPi.GPIO-0.7.1-cp310-cp310-musllinux_1_2_armv7l.whl WARNING: The directory '/config/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag. ERROR: RPi.GPIO-0.7.1-cp310-cp310-musllinux_1_2_armv7l.whl is not a supported wheel on this platform. root@rpi4:/#

and have added

environment:
- WHEELS_LINKS=1

into my docker compose

HA version = Home Assistant 2023.10.5
Frontend 20231005.0 - latest

this is the logs entry

Logger: homeassistant.util.package
Source: util/package.py:108
First occurred: 9:11:24 AM (3 occurrences)
Last logged: 9:12:18 AM

Unable to install package RPi.GPIO==0.7.1: WARNING: Location '1' is ignored: it is either a non-existing path or lacks a specific scheme. error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [15 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-aarch64-cpython-311 creating build/lib.linux-aarch64-cpython-311/RPi copying RPi/init.py -> build/lib.linux-aarch64-cpython-311/RPi creating build/lib.linux-aarch64-cpython-311/RPi/GPIO copying RPi/GPIO/init.py -> build/lib.linux-aarch64-cpython-311/RPi/GPIO running build_ext building 'RPi._GPIO' extension creating build/temp.linux-aarch64-cpython-311 creating build/temp.linux-aarch64-cpython-311/source gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/config/lsiopy/include -I/usr/include/python3.11 -c source/c_gpio.c -o build/temp.linux-aarch64-cpython-311/source/c_gpio.o error: command 'gcc' failed: No such file or directory [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for RPi.GPIO error: subprocess-exited-with-error × Running setup.py install for RPi.GPIO did not run successfully. │ exit code: 1 ╰─> [28 lines of output] running install /config/lsiopy/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running setup.py directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() running build running build_py creating build creating build/lib.linux-aarch64-cpython-311 creating build/lib.linux-aarch64-cpython-311/RPi copying RPi/init.py -> build/lib.linux-aarch64-cpython-311/RPi creating build/lib.linux-aarch64-cpython-311/RPi/GPIO copying RPi/GPIO/init.py -> build/lib.linux-aarch64-cpython-311/RPi/GPIO running build_ext building 'RPi._GPIO' extension creating build/temp.linux-aarch64-cpython-311 creating build/temp.linux-aarch64-cpython-311/source gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/config/lsiopy/include -I/usr/include/python3.11 -c source/c_gpio.c -o build/temp.linux-aarch64-cpython-311/source/c_gpio.o error: command 'gcc' failed: No such file or directory [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> RPi.GPIO note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

Does this integration just not work anymore?

from ha-rpi_gpio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.