Apologies in advance if I didn’t tag/format things properly, not used to this forum style.
I have HA running supervised on a laptop using Debian 12. Not 100% sure it’s a fully supported install, but I think that’s a separate problem… the idea was that I’d be able to run other stuff on the laptop, but that hasn’t materialized so at some point I may revert to HA OS. But that’s neither here nor there.
Anyhow, in my garage I have a Raspberry Pi 4 running Raspbian. Currently all it’s doing is monitoring a UPS for some network gear via NUT, and that’s being picked up by HA perfectly. I’d like to expand that capability to use the GPIO for various tasks, one of which is to monitor the temperature and humidity in the garage.
So a while back I went and bought a DHT20 sensor (this one here: Humidity and Temperature Sensor - DHT20 - SEN-18364 - SparkFun Electronics). Plugged it in to the RPI and never got around to integrating it. It seems to talk to the Pi, but that’s all the further I’ve got. Haven’t had a chance to really dig in and try to get the data from it.
I’ve done some searching and seen the recommendations to use remote_RPI_GPIO. However this seems to only support binary_sensor and switch types. I can’t see that there’s any way to successfully get I2C data from this interface.
Seems to me that this needs to be a three step process: first I need to process the I2C data somehow on the RPI and make it available somewhere. Step 2 would be to use a 3rd party service to grab and publish that data somehow, and then step 3 would be to have HA use an intergration for that 3rd party service to grab that data.
And that’s where I’m completely lost… all 3 steps, frankly. Honestly I’m pretty inexperienced when it comes to Linux stuff, so a lot of this is opaque to me. I can stumble through individual guides and make things work, but I don’t even know where to start here.
So with all that, right now it’s looking like:
- Write a python or C/C++ script/program that runs periodically (how?) to acquire and process/scale the sensor data to real world units, then store that data <somewhere??>
- Use some 3rd party thing to publish the data (MQTT? no idea here)
- Use whatever HA integration supports the above 3rd party thing.
Step 3 seems to be the easiest here, once I figure out the rest that is. For step 1 I can find plenty of guides on how to get and process the sensor data, but I don’t know how to store it somewhere that would be accessible to whatever is used in step 2.
The other thing I’ve noticed is a lot of suggestions revolve around using ESP32 chips. I’d like to avoid this because I just don’t want extra hardware and I don’t want to add more devices to my network. Maybe I’m being irrational and stubborn, but it seems to me that I already have the RPI, so I feel like this should be fairly straight forward.
tl;dr: I have a DHT20 temp/humidity sensor that talks via I2C. It’s connected a remote Raspberry Pi via the GPIO, and I need to get this data over to a separate computer running HA as a sensor. Trying to figure out the best strategy to do so that doesn’t require additional hardware.