ironsheep / RPi-Reporter-MQTT2HA-Daemon

Linux service to collect and transfer Raspberry Pi data via MQTT to Home Assistant (for RPi Monitoring)
GNU General Public License v3.0
442 stars 62 forks source link

Pijuice Integration #74

Open xstrex opened 1 year ago

xstrex commented 1 year ago

Is your feature request related to a problem? Please describe. Not a problem, just wondering if it would be possible to enable additional modules, for various add-on boards. Specifically the PiJuice; there's a separate project that monitors the Pijuice locally via i2c, would be nice if your reported could pull in this data as a sensor.

Describe the solution you'd like Possibly utilize this project code to add an additional set of sensors to your RPi-Reporter

Describe alternatives you've considered Writing my own Pijuce sensor daemon to send the data from remote RPi's with a PiJuice via MQTT

Additional context Would be great for remote PIs, or PIs that aren't constantly connected to mains power, like a robot or remote sensor node for example. Be nice to know in HA when those batteries are getting low and need to be recharged.

ironsheep commented 1 year ago

They have their own integration. I'm not sure we'd provide any benefit over theirs. Are you maybe saying their integration only works if the piJuice is on the RPi running the HA?

ironsheep commented 1 year ago

@xstrex see question ^^^^^^

xstrex commented 1 year ago

They have their own integration. I'm not sure we'd provide any benefit over theirs.

Are you maybe saying their integration only works if the piJuice is on the RPi running the HA?

I'm sorry, didn't see that. Yes their integration only work if the RPi is running HA, and has a PiJuice connected to the same machine. HA talks directly to the i2c bus. Doesn't handle remote machines at all.

ironsheep commented 1 year ago

@xstrex ok, that makes sense. What would you think of our creating a separate project that reports identically to their own reporter but runs on any RPi with a piJuice device?

I'll take a look at it from this approach to see how feasible it would be. Seems like between this project and theirs it would seem most of the things are figured out... just a bit of mashing the two together. Seems to be better than rolling it all into the current Daemon.

xstrex commented 1 year ago

Funny you mention that, I've actually been working on a project that connects mqtt to OS commands, or scripts. I'm not great at Python, but the basics are there. Initially I created it to turn on/off the screen of the official Rpi, as well as set the brightness. I need todo some more work on it but the basics are there.

Might be able to mash that project in with the PiJuice sensor one, and just poll data from the i2c buss as well.

I'll post what I've got so far tomorrow.

I'm a fan of your daemon/card and it would be nice to send that data via the same connection, instead of relying on mqtt. Just an idea.