Way to send i2c and receive i2c through Raspberry Pi?

I’ve worked out a way open or close my garage door using a Raspberry Pi, a Tiva Launchpad (very much like an arduino), and a sun-visor garage door remote. The Launchpad is wired to the remote with constant 3.3v to the positive battery terminal, ground to the negative battery terminal. This powers the remote so no battery is necessary. A 3.3v digital out pin is connected to one side of the tact switch one would normally press to open or close the garage door. The RPi and Launchpad communicate using i2c. If the RPi sends an arbitrary byte, the Launchpad lights an onboard LED and sends 3.3v out to the tact switch, causing the remote to activate and the garage door opener to operate. This allows me to avoid running wires and installing relays as I have seen others do.

Is there an existing way for Home Assistant running on a Raspberry Pi to send i2c data?

1 Like

I don’t know of a way to use i2c directly, but you could use a command_line switch to run a script to send the i2c commands. Presumably, you have a script to do that now.

The command-line switch platform could be used here.

Yep, that was going to be my route if there was nothing already in Home Assistant, thanks.

Hi did you manage to get the i2c running,

We have a script to send commands to a dimming module but we are stuck with issues in the virtual environment with smbc etc did you have any of these?

thanks

I believe I did. But I ran into some issue (knowing the state of the door I think) and decide to just buy a myQ.

I’ll check to see if I have any of the configuration left, but I think the SD card on my pi died and was replaced since then.

I also might not have been running HA virtualized, or in the same virtualization as you, at the time.

Oh. I did some back reading and see that I didn’t. I just switched to commercial product.

Hi mate, I’m actually experiencing the same need, I’ve found a solution using RasPiArduino, and some libraries for Arduino when compatible (if not you can use I2C commands directly and access your hardware knowing its datasheets), I’m figuring out now how to exchange datas between MQTT with HA, you may write me if interested barabba.furlan at email.it (please use a topic that I can recognize and not consider a spam, thank you)