devWaves / SwitchBot-MQTT-BLE-ESP32

Allows for multiple SwitchBot bots and curtains to be controlled via MQTT sent to ESP32. ESP32 will send BLE commands to switchbots and return MQTT responses to the broker. Also supports Temperature, Motion, Contact sensors
MIT License
531 stars 66 forks source link

[Featheresp32]: Monitor battery voltage #49

Closed samip5 closed 2 years ago

samip5 commented 2 years ago

Do you happen to have ideas on how one would implement monitoring battery voltage from on-board JST connector as entry in HA?

Ref: https://learn.adafruit.com/adafruit-huzzah32-esp32-feather/pinouts

devWaves commented 2 years ago

this is not an issue. This code also probably shouldnt be used with a battery

samip5 commented 2 years ago

Why shouldnt it be uaed with a battery? It's used only as backup power for the esp.

devWaves commented 2 years ago

battery would not last very long I am guessing, so ya backup is only if esp32 loses power. your mqtt server still needs to be working so you would need your router and HA on UPS/battery also

you can look on HA forum here for adding a sensor https://community.home-assistant.io/t/switchbot-bot-curtain-meter-contact-motion-mqtt-esp32-bridge-local-control/286468/436?u=devwaves

the esp32 code has wifi/mqtt and bluetooth on all the time