I have a Raspberry Pi 4 running Home Assistant on a boat, where the power can be switched off at any time. I can use the Witty L3V7 as a UPS for as long as the battery lasts.
I don't think I can have the Witty software running on the Pi under HAOS (or can I?) so I want to be able to read the i2C data via a Wemos Di mini, which will then feed the data to HA automations to e.g. perform a soft shutdown. Using Arduino IDE I can see that data is being received by the Wemos over i2C. I would like to program the Wemos using EspHome in HA to create data entities to then perform the automations.
Has anyone done this before and can you give me any guidance?
Although HAOS is also based on Linux, it is quite different than Raspberry Pi OS. Considering Witty Pi's software is developed and tested under Raspberry Pi OS, it may not be easy to have it run under HAOS.
If you are willing to work on it, it can be done though. Witty Pi's software communicates with the hardware only via I2C and GPIO signals.
I will try. Does the Witty software need to be running on the Pi within HAOS in order to be generating the right signals or can the Witty L3V7 run as stand alone?
@wallace running the software is necessary for Witty Pi 4 (any model). Some functionalities are not working without software.
I have added an INA219 sensor into the battery positive wire connected via a wemos d1 mini that tells home assistant when the current changes from negative to positive. This enable an automation to close down home assistant safely