PCA9505, 40 channel GPIO IC, hardware support needed (paid offer)

Hello everyone,

newbie here, both on this forum and HASS in general.
Five years ago I started building a custom home automation system, as I could not find any existing system with focus on security, privacy and FLOSS.
Years later, living in a house with around 10km Cat7 cabling in the walls, but still no light in the basement, I finally gave up on the “completely custom hardware & firmware” plan. And, as luck had it, found ESPHome and HASS.
The setup is ESP32-POE and ethernet based, a perfect fit for ESPHome.
Several I2C parts are already supported too, yay!

A central I2C part is a custom-made board with a PCA9505 chip. It’s a 40 bit/channel GPIO IC over I2C. With variable I2C address even, to use several of those with one ESPHome! All binary sensors/switches end in a PCA9505 board, like lightswitches, shutter switches, door sensors etc.

Now, of course, the PCA9505 is not yet supported in ESPHome. I myself am not a developer (else the initial custom project might have worked out), my little python knowledge is of little use here.
As I understand it, there are other GPIO ICs, like the PCA9554 with 8 bit/channels, that are already supported in ESPHome. Their “driver” might be a good starting point for writing the necessary code.

  • is writing hardware support a “normal C++” job? Or does it need or profit from specialized knowledge?
  • is the home assistant community a good place to ask for paid help? Is that frowned upon (“stealing” from their communitytime?)? Any recommended spot to look for paid, professional help? Directly the mothership, Nabu Casa, maybe?
  • is an external component much easier to create, or should I ask for proper HASS sourcecode integration from the start? Is “converting” an external component to integrated project code much effort, or a reasonable strategy?

I will gladly post about the hardware bits and pieces on the hardware category too.
Thank you for any hints and pointers!

Kobel
(eastern Germany)

Have a look at datasheets / arduino libraries of 9554. If they share a lot with 9505, you could use that native component as a start point for making external component.

You are right, the PCA9505 support surely won’t have to be written from scratch.

Is support for such I2C devices strictly ESPHome related, or relevant to HASS as well? Is there any better, other place where I should ask for paid development help?

Else I would start looking for local devs with (generic) C++ expertise.

Cheers,

Kobel

It’s only esphome related.

Doesn’t make sense, since that chip already has c++ library. You just need to adapt that to Esphome.

Another option would be to swap the i/o expander with few that are supported be Esphome. There are plenty of them.
It probably takes less time than finding someone to write new component…

Why don’t you use AI? You just need to tell the AI to write an ESPHome external component and generate __init__.py, pca9505.h, and pca9505.cpp.
When the AI gets stuck, you can provide the PCA9505 datasheet, Arduino library, and the source code of other ESPHome I2C expanders as references to help solve the problem.

Have you tried?

Try my code that generate by AI.

external_components:
  - source: github://patrick3399/esphome_components
    components: [ pca9505 ]

i2c:
  sda: 41
  scl: 40
  scan: true

pca9505:
  - id: 'my_pca9505'
    address: 0x20 # Ensure this matches your PCA9505's I2C address (A0-A2 jumpers)

switch:
  - platform: gpio
    name: "PCA9505 LED 1 (Pin 0)"
    pin:
      pca9505: my_pca9505
      number: 0
      mode:
        output: true
      inverted: false # Or true, depending on your LED circuit
  - platform: gpio
    name: "PCA9505 Output Pin 15"
    pin:
      pca9505: my_pca9505
      number: 15
      mode:
        output: true

binary_sensor:
  - platform: gpio
    name: "PCA9505 Button 1 (Pin 32)"
    pin:
      pca9505: my_pca9505
      number: 32
      mode:
        input: true # PCA9505 has internal pull-ups, PCA9506 does not [cite: 5, 6]
                   # If using PCA9506, an external pull-up might be needed for buttons.
      # inverted: true # If your button pulls LOW when pressed and you