usermods/MAX17048_v2/readme.md
This usermod reads information from an Adafruit MAX17048 and outputs the following:
Data is published over MQTT - make sure you've enabled the MQTT sync interface.
Add "MAX17048_v2" to your platformio.ini environment's custom_usermods and build.
To enable, compile with USERMOD_MAX17048 define in the build_flags (e.g. in platformio.ini or platformio_override.ini) such as in the example below:
[env:usermod_max17048_d1_mini]
extends = env:d1_mini
custom_usermods = ${env:d1_mini.custom_usermods} MAX17048_v2
The following settings can be set at compile-time but are configurable on the usermod menu (except First Monitor time):
Additionally, the Usermod Menu allows you to:
The following method is available to interact with the usermod from other code modules:
getBatteryVoltageV read the last battery voltage (in Volt) obtained from the sensorgetBatteryPercent reads the last battery percentage obtained from the sensorMQTT topics are as follows (<deviceTopic> is set in MQTT section of Sync Setup menu):
| Measurement type | MQTT topic |
|---|---|
| Battery Voltage | <deviceTopic>/batteryVoltage |
| Battery Percent | <deviceTopic>/batteryPercent |
Carlos Cruz @ccruz09
Jan 2024
readme.md