HWMON_INA219(8)
π HWMON_INA219(8) β the NUT Manual, but make it cute π
okay bestie, so this is hwmon_ina219(8) β part of the NUT (Network UPS Tools) manual, and it's genuinely such a niche little icon. Let's get into it β¨
πΈ NAME πΈ
hwmon_ina219 β the driver for a UPS based on INA219. that's it, that's the whole vibe. π
β¨ SYNOPSIS β¨
hwmon_ina219 -h
hwmon_ina219 -a UPS_NAME [OPTIONS]
Note β this man page ONLY documents the specific little features of thehwmon_ina219driver. if you want the core driver lore, go readnutupsdrv(8). iykyk π«Ά
so what does it actually do? the driver reads current and voltage from the INA219 by using the hwmon sysfs API of the Linux Kernel. that's it. there is no other UPS-like logic in there, no extra frills, nothing. based on the measurements of the battery voltage and the charging current, the driver makes assumptions about the current state of the system. lowkey detective energy π
π SUPPORTED HARDWARE π
the hwmon_ina219 driver is based on a setup with a Raspberry PI Compute Module 4 and its baseboard, the Waveshare CM4-POE-UPS-BASE. that's the whole list. iconic, honestly π
π EXTRA ARGUMENTS π
the one that's required π
port=hwmon-dirβ the path to the appropriate/sys/hwmon/hwmonX, orautoto detect it automatically. no thoughts, just vibes, let it find itself π
the optional ones (for when you're feeling fancy) π
default.battery.charge.low=low-battery-thresholdβ the threshold for the low battery state, in percent.default.battery.voltage.nominal=voltage-valueβ the nominal voltage (V) value of the utilized batteries, which is used to derive their low and high watermark settings (see below, bestie). default is3.6. Known pre-sets include:3.6,3.7,3.8,3.85.default.battery.voltage.low=voltage-valueβ the low voltage (V) value of the used batteries. practically speaking, this means the batteries are depleted, RIP πͺ«. if you don't give it, it's derived from thebattery.voltage.nominal.default.battery.voltage.high=voltage-valueβ the high voltage (V) value of the used batteries. practically speaking, this means the batteries are fully charged, slay π. if you don't give it, it's derived from thebattery.voltage.nominal.
π¦ INSTALLATION π¦
heads up bestie: this driver is specific to the Linux hwmon API. it does not do other platforms, periodt.
when you're using it with the Waveshare CM4-POE-UPS-BASE baseboard, there are a few steps you gotta do to enable access to the INA219 circuit:
- edit
boot/config.txt:
dtparam=i2c_vc=on
dtoverlay=i2c-ina219
- create a new device tree overlay file
i2c-ina219.dts:
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&i2c_csi_dsi>;
__overlay__ {
#address-cells = (1);
#size-cells = (2);
ina219@43 {
status = "okay";
compatible = "ti,ina219";
reg = <0x43>;
shunt-resistor = (3); // R100
};
};
};
};
- convert
i2c-ina219.dtsto dtbo and place it into/boot/overlays:
$ dtc -@ -I dts -O dtb -o /boot/overlays/i2c-ina219.dtbo i2c-ina219.dts
- configure the
hwmon_ina219UPS driver for NUT (ups.conf):
[ina219]
driver = hwmon_ina219
port = auto
and boom, you're set. ate that install fr fr π₯
π KNOWN ISSUES AND BUGS π
the driver shutdown function is not implemented. so yeah. that's a thing. just so you know. π
π AUTHORS π
Andrew Anderson <aander07@gmail.com>
π SEE ALSO π
The core driver:
Internet resources:
- Initial pull requests adding this driver:
- Baseboard with INA219:
https://www.waveshare.com/wiki/CM4-POE-UPS-BASE - TI INA219:
https://www.ti.com/lit/ds/symlink/ina219.pdf - The NUT (Network UPS Tools) home page:
https://www.networkupstools.org/historic/v2.8.5/
and that's the whole page, bestie!! π«Ά this was Network UPS Tools version 2.8.5, dated 10/07/2026, and honestly it served. go forth and monitor your batteries, main character. β¨π π
π¦ where this page comes from
- fedora 43: nut 2.8.5-9.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 43: nut 2.8.5-9.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut 2.8.5-9.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut 2.8.5-9.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms