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 the hwmon_ina219 driver. if you want the core driver lore, go read nutupsdrv(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, or auto to 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 is 3.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 the battery.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 the battery.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:

  1. edit boot/config.txt:
dtparam=i2c_vc=on
dtoverlay=i2c-ina219
  1. 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
            };
        };
    };
};
  1. convert i2c-ina219.dts to dtbo and place it into /boot/overlays:
$ dtc -@ -I dts -O dtb -o /boot/overlays/i2c-ina219.dtbo i2c-ina219.dts
  1. configure the hwmon_ina219 UPS 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:


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