Customer:
I have an Inkplate 10 with battery in a Home Assistant/ESPHome setup. Is it possible to get the battery charge level into ESPHome?
Originally submitted via email support on 22 June 2024. Migrated to the forum for community visibility.
Customer:
I have an Inkplate 10 with battery in a Home Assistant/ESPHome setup. Is it possible to get the battery charge level into ESPHome?
Originally submitted via email support on 22 June 2024. Migrated to the forum for community visibility.
Soldered Support:
The ESPHome driver for Inkplate was a community contribution, so native support for battery level isn’t built in. However, you can implement this yourself using the Inkplate library function at: Inkplate-Arduino-library/src/include/System.cpp at d33b0e7797eb42fdec34faf164216b547d32cbe3 · SolderedElectronics/Inkplate-Arduino-library · GitHub
This function reads the battery voltage using analogReadMilliVolts. Before calling it, you must set a pin HIGH or LOW (depending on your board version) to enable the battery measurement circuit. This prevents power drain when not measuring.
If you can write custom ESPHome scripts, you can call this function directly from the Inkplate library. If the library isn’t available in your code environment, follow this sequence: set the appropriate pin HIGH/LOW to enable the measurement circuit, then call analogReadMilliVolts to read the battery voltage.