HELP: Exception importing custom_components.rpi_gpio.switch

I have an elementary grasp of all of this. Ive been googling for hours. I am trying to control a relay on a remote pi running raspbian lite. im trying to create some swimming pool controls. I am running HomeAssistant on a virtual machine on windows. I am using a GPIO on raspberrypi 1 connected via LAN.

i have updated the config.yaml with:

# Basic configuration.yaml entry switch:
  - platform: rpi_gpio
      - port: 18
        name: "Fan Office"
      - port: 27
        name: "Light Desk"

pinout command in the pi said im using 18 and 27. the names are fillers until i can get it right.

i have a config error:
Platform error switch.rpi_gpio - Exception importing custom_components.rpi_gpio.switch

I have used the newest integration “Home Assistant Raspberry Pi GPIO Integration” from github.

I think i might be stuck here. I dont know what this means our where to input this command…
The simplest way to use devices with remote pins is to set the [PIGPIO_ADDR]environment variable to the IP address of the desired Raspberry Pi. You must run your Python script or launch your development environment with the environment variable set using the command line. For example, one of the following:

$ PIGPIO_ADDR= python3
$ PIGPIO_ADDR= python3
$ PIGPIO_ADDR= ipython3
$ PIGPIO_ADDR= idle3 &

is it in pi command, somewhere in HA, somewhere on the virtual machine??
Or maybe its something else entirely (Rpi 1 to old)?

Please help. And speak slowly and dumbly for me.

This is the github you are referring too?
This does not look like like it will achieve what you want. It looks like it would be for a local pi.
Not vm to pi.

Remote cover

This remote part might do it… Perhaps.

No idea where abouts the commands are referenced. Although it looks like they should be in a python script, so the script can call the device.


Seems abit overkill use case for a pi. Esp8266 or esp32 with tasmota or esphome would be a better option.

Thanks for the reply. Are esp’s easy to integrate into HA?

Fairly easy. Tasmota is more gui based. Esphome is like arduino for HA.

Can i connect temperature sensons to them? I have one valve that i need to turn on and off at certain temperatures.

Esp8266 has 8 or so GPIO
Esp32 has about 30gpio

Tasmota and esphome both support temp sensors, and a ton of other sensors.

Cool. Ill take a look. Its amazing that i could replace 1000$ worth of control with that.

1 Like

These can flashed to esphome or tasmota too, or you use the ewelink firmware.