Reverse-engineered an NHS UPS's serial protocol to get it into HA via MQTT (no vendor software)

I have an NHS UPS (a common Brazilian brand) with a USB interface, and I wanted its telemetry in Home Assistant — but no open driver works with it: NUT (nhs_ser, nutdrv_qx, blazer_*) and the passive clyra/nhs2mqtt all fail. The device is reply-only: it never streams, it only answers one specific proprietary command.

So I tapped the official Windows/Linux software’s serial port with strace (-e trace=%desc to catch the readv/writev), captured the polling command, decoded the status frame, and wrote a small Python poller that publishes everything to MQTT with auto-discovery.

What you get in HA: input/output voltage, battery voltage, load %, temperature and an “on battery” binary sensor — plus a Mushroom + mini-graph dashboard.

  • Tested on: NHS Premium PDV GII 2200VA (USB-CDC /dev/ttyACM0, 0925:1241)
  • Runs on any Linux (mine is on a Proxmox host)
  • Full write-up + code + the reverse-engineering method (reusable for other NHS models):

:backhand_index_pointing_right: GitHub - Alltec12/nhs2mqtt-homeassistant: nhs2mqtt: telemetria de no-break NHS no Home Assistant via MQTT · GitHub

If anyone else has an NHS UPS, I’d love help mapping the whole family — run the poller and share the decode() values for your model. Feedback welcome!

1 Like