[Nut-upsuser] [dev] Minimal HID that NUT should accept

Kelly Byrd kbyrd at memcpy.com
Tue Oct 28 16:32:40 GMT 2025


This likely isn't the minimal set of attributes, but I found this library
very useful as a base for making a HID-UPS reporting device.
https://github.com/abratchik/HIDPowerDevice

-- Kelly

On Mon, Oct 27, 2025 at 5:24 PM Alexey D. Filimonov <alexey at filimonic.net>
wrote:

> Hello. I'm trying to add MeanWell LAD-360 (non-UART version) PSU with
> UPS as a NUT device. I want it to be connected as USB HID UPS through
> ESP32-S3 or STM32 as a bridge.
>
> Please suggest me minimal HID Report descriptor to make NUT recognize
> such device as UPS, at least to report if it's on AC or on Batteries,
> without writing it's own driver for NUT.
>
> More details:
>
> I found that those devices are very good to replace 53.5v PSUs for small
> TP-Link PoE switches to power small LAN (like, 1-2 PoE switches, few
> Access Points, Router, Modem, media converter).
>
> The problem that device is not actually exposes full UPS interface, but
> only 5 output boolean signals:
> * AC OK
> * Discharging
> * Battery Full
> * Battery Low
> * Battery disconnected or wrong polarity
>
> And one input boolean signal : forced start (start from battery with no
> AC power present)
>
> For now, I have a USB bridge on ESP32-S3 that bridges MeanWell LAD
> outputs as USB HID device like this (simplified a little):
>
> ```
> USAGE_PAGE(Power Page)
> USAGE(Power Page/UPS)
> UNIT(NONE)
> COLLECTION(APPLICATION)
>      USAGE(Power Page/Power Summary)
>      COLLECTION (PHYSICAL)
>      FEATURE 1:
>          Power Page/Power Summary ID = 1 (4 bit)
>          USAGE_PAGE(Battery System Page)
>          Battery System Page/Capacity mode = 2 (%, 2 bit)
>          Battery System Page/Rechargable = 1 (1 bit)
>          PAD (1 bit)
>          Battery System Page/Capacity Granularity 1 = 1 (8 bit)
>          Battery System Page/Capacity Granularity 2 = 1 (8 bit)
>          Battery System Page/Full Charge Capacity   = 100 (8 bit)
>      INPUT 1:
>          Battery System Page/AC Present (1 bit)
>          Battery System Page/Battery present (1 bit)
>          Battery System Page/Discharging (1 bit)
>          Battery System Page/Fully Charged (1 bit)
>          Battery System Page/Fully Discharged (1 bit)
>          PAD (3 bit)
>          Battery System Page/Remaining Capacity (8 bit, 0-100)
>      END_COLLECTION(PHYSICAL)
> END_COLLECTION(APPLICATION)
> ```
>
> For `Remaining Capacity`, I report emulated value based on flags device
> exposes have (Full + AC => 100%, Full + Discharging => 80%, etc..).
>
> Windows 11 catches this device as UPS quite good.
>
> Please suggest me minimal HID Report descriptor to make NUT recognize
> such device as UPS, at least to report if it's on AC or on Batteries,
> without writing it's own driver for NUT.
>
> Alexey
>
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20251028/e53dffbe/attachment.htm>


More information about the Nut-upsuser mailing list