Removal of GPIO support

There are hundreds of custom integrations out there that can be installed manually, or, as most people use HACS for that nowadays.

2 Likes

tbh I’m struggling here. All of the documentation on the HA website points to Raspberry GPIO but as it isn’t available from the integrations list there seems to be no other way to get it. Is there an option to install from Github and do it that way manually through the terminal?

On Github you have it down as depreciated.

frenck Deprecate Raspberry Pi GPIO (ADR-0019) (#63503)

In the current stable release it is available?

What integration list? If you mean the UI, than indeed, it is not there. These integrations are only configured via YAML, as documented in our current documentation

1 Like

Maybe I’m missing something then? I’m running the December release, Home Assistant 2021.12.9, it isn’t there. Sorry, but I’m so used to just going into the integrations menu and installing it from there and hey presto, everything works. Not in this version though.

RPi GPIO has only ever been configurable via YAML.

One Wire is done via GUI:

1 Like

If you mean via the configuration.yaml then I’ve already tried that. In my previous version of HA Core that I ran up until yesterday morning the following yaml code worked, now it doesn’t

binary_sensor:

  • platform: rpi_gpio
    ports:
    06: Door Switch
    19: Living Room PIR
    13: Con PIR
    12: Door PIR
    pull_mode: “up”

Yes I know all of that but since changing over to the newer version nothing works now. Obviously I have everything setup and working with regards to HA being able to read my GPIO pins otherwise it wouldn’t be able to read the 1-wire sensors that I have connected.

Have you got errors in the log to point you to the issue?

No errors at all

I’m a little confused…

but then

So which bit isn’t working?

Even the syntax of the yaml seems to have changed too, I’ll give you the 1-wire as an example.

Old syntax

` - platform: onewire
names:
28-000004eaeeba: Lounge
28-041662a412ff: Cons
28-031663e24fff: Outside
28-041662c9f9ff: Cupboard
28-031663e951ff: Central Heating
28-031663aa3fff: Hot Water
28-0416631752ff: Upstairs
28-03166396e7ff: Loft
28-03166372f7ff: Loft Heater

New syntax

    title: Binary Sensor
  - type: entities
    entities:
      - entity: sensor.28_041662c9f9ff_temperature
      - entity: sensor.28_031663e24fff_temperature
      - entity: sensor.28_03166372f7ff_temperature
      - entity: sensor.28_041662a412ff_temperature
      - entity: sensor.28_03166396e7ff_temperature
      - entity: sensor.28_000004eaeeba_temperature

I’m not able to read/write to GPIO pins such as reading the closed/open state for the connected PIR sensors as well as being able to pull up/down GPIO pins to switch a relay on or off. All of this used to be done through the use of the configuration.yaml

So, just to be clear, that is not about (or related to) anything that concerns the depreciation of GPIO in Home Assistant 2022.2; as that hasn’t been released yet.

Therefore a bit off-topic maybe?

1 Like

That’s the config

This is a lovelace card

Sorry, Home Assistant 2021.12.9 but it looks as though it’s already been depreciated as it’s no longer available as an integration from the UI.

As I mentioned above, RPi GPIO was never in the Integrations GUI. It must be configured via YAML, and still can be.

I think you have other issues here that aren’t to do with the future deprecation.

OK, a few things going on here. I think you’re saying that there was no change to the GPIO support in version 12. So the problems @Reena is seeing may be due to some other change.

And thank you @frenck for posting here. It seems you’re the best one to answer a few questions I have.

For one thing, I’m very curious about how we’re supposed to monitor or control GPIO pins using an integration. The “GP” in GPIO stands for “General Purpose.” There are countless ways in which these pins can be used. Sounds like @Reena has a very elegant solution for her needs, and I have a very different one which suits mine. Is there a “General Purpose” integration we’ll both be able to use to access GPIO pins? Or does someone have to develop a specific integration for each possible purpose?

Then I wonder about communication. The HA documentation doesn’t give any indication that new users shouldn’t be using this function. In fact, throughout the HA beginner documentation, the use of a Raspberry Pi is encouraged.

Which brings me to my biggest question: Why?

Again, you’re probably the best one to answer that. GPIO pins are such a fundamental part of the RPi hardware. It seems like deliberately crippling this important function is short-sighted. The way both @Reena and I are using HA, the only solution I’ve heard proposed so far is to put another small, single-board computer like an ESP right next to the RPi, just to handle the GPIO communication and pass that, over WiFi, to the RPi running HA. Surely you can see how inelegant that solution is, given that the RPi running HA is already well suited to doing exactly that.

I think the point was made earlier that this change makes HA one of the only, if not the only, home automation system to cripple this core hardware function.

4 Likes

The deprecation is not “active” yet.
I’m sure the documentations will be updated when it is deprecated. Or anyone can do it via GitHub.

I believe very few have their RPi next to what they are trying to control.
Looking at the analytics about 1000 use some type of GPIO compared to 130 000 installations.
Sure, not everyone has opted in to analytics but I doubt it has much effect on the percentage.

1 Like

I totally agree with @CaptTom the reason I use HA Core with the Pi is because of the functionality of the Pi and the fact that you have these pins that do all sorts of wonderful things. Sort of takes me back to the days of the ZX80/81 and the early days of home robotics.

I used NodeRed extensively for my home automation before I came across HA, for the very reason that it utilises everything to do with GPIO. It’s one of the coolest things about the Pi.

5 Likes