Giter Club home page Giter Club logo

Comments (4)

Hatfa avatar Hatfa commented on June 2, 2024

Hi, I was using it via HACS since the deprecation so the answer would be yes, you can. However I bumped into an issue where after updating HA OS to 2022.7.5 this no longer can be installed. So I'm hoping it's a global issue and something just needs a bit of tweaking. :)

from ha-raspberry-pi-gpio-pwm.

RedMeKool avatar RedMeKool commented on June 2, 2024

Hi, with the latest switch to gpiozero (from release 2022.7.0 ) the support for the PCA9685 driver has been removed. Not sure if can be easily added for gpiozero as well.

from ha-raspberry-pi-gpio-pwm.

gcs278 avatar gcs278 commented on June 2, 2024

However I bumped into an issue where after updating HA OS to 2022.7.5 this no longer can be installed.

I'm also in the boat of needing support for PCA9685. I was hoping I could keep the deprecated package like @Hatfa, but in the 2022.7 release, HA bumped to Python 3.10. As a result, HA now uses musllinux wheels (explanation: home-assistant/core#75672 (comment)). So if you install the previous version of this project with PCA9685, you can't use 2022.7+ because it will try to find muslinux wheels, and if it can't, it will try to build from source (which fails). The errors in your homeassistant log will look like:

2022-09-21 18:11:00.796 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package pwmled==1.6.10: 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
      Compiling ws281x library...
      creating build
      creating build/lib.linux-aarch64-cpython-310
      creating build/lib.linux-aarch64-cpython-310/rpi_ws281x
      copying rpi_ws281x/rpi_ws281x.py -> build/lib.linux-aarch64-cpython-310/rpi_ws281x
      copying rpi_ws281x/__init__.py -> build/lib.linux-aarch64-cpython-310/rpi_ws281x
      running build_ext
      building '_rpi_ws281x' extension
      creating build/temp.linux-aarch64-cpython-310
      creating build/temp.linux-aarch64-cpython-310/lib
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -DTHREAD_STACK_SIZE=0x100000 -fPIC -I. -I/usr/local/include/python3.10 -c lib/dma.c -o build/temp.linux-aarch64-cpython-310/lib/dma.o
      error: command 'gcc' failed: No such file or directory
      [end of output]

Sounds like our options are:

  1. Work with gpiozero to add support for PCA9685
  2. Get pwmled to build musllinux wheels (or if they don't, then we can build them in HA such as home-assistant/wheels-custom-integrations#648). RPI.gpio already has musllinux wheel.
  3. Don't use HA >= 2022.7

Those are my thoughts so far. Please let me know if you have any other ideas or I got something wrong. Thanks for the development on this product so far.

from ha-raspberry-pi-gpio-pwm.

gcs278 avatar gcs278 commented on June 2, 2024

Update: I have PCA9685 working again with HA 2022.10.0. Although very hacky, it satisfies my needs to keep things running. Follow at your own risk:

  1. Install Raspberry Pi GPIO PWM v2022.6.0, the last version with pwmled library support for PCA9685
  2. Upgrade to the latest version of HA (I'm at 2022.10.0)
  3. Build the wheels for Python 3.10:
    a. I started another instance of the latest version homeassistant docker image, installed gcc and musl-dev via apk add
    b. pip3 install pwmled==1.6.10
    c. pip3 install RPi.GPIO==0.7.1a4
    d. I ended up with RPi.GPIO-0.7.1a4-cp310-cp310-linux_aarch64.whl Adafruit_Blinka-7.4.0-py3-none-any.whl Adafruit_PlatformDetect-3.32.0-py3-none-any.whl Adafruit_PureIO-1.1.9-py3-none-any.whl, python_singleton-0.1.2-py3-none-any.whl
  4. Copy the wheels into the running homeassistant container via docker cp
  5. pip3 install <WHEEL_FILES>
  6. Restart HA

Because the homeassistant container is persistent across reboots, the packages stay installed and don't need to be re-installed again. Next upgrade or anytime your homeassistant container gets recreated (honestly not sure what those scenarios are), then you'd need to patch again. Not optimal, but working great for me so far.

from ha-raspberry-pi-gpio-pwm.

Related Issues (12)

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.