Skip to content

v1.14.0

Choose a tag to compare

@github-actions github-actions released this 06 Nov 13:08
· 71 commits to main since this release

The board can now send its log to a syslog server, keep the time from NTP, and give NUT clients custom values for the variables your UPS gets wrong or does not report. When the USB link gets stuck, the board now power-cycles its USB port instead of restarting, so network, web UI and NUT stay up.

⚠️ Upgrade notes

  • NTP is on by default. After the update the board asks pool.ntp.org for the time, with UTC as the time zone. Change the server or the zone, or turn NTP off, in Board Settings → Time. Nothing on the board waits for the time: without it the board works as before.
  • Fewer restarts, more USB reconnections. When a USB control transfer gets stuck, the board now switches its USB port off and on instead of restarting. In the System Log this appears as [USB] Control transfer stuck: power-cycling the USB port, and the UPS comes back in a few seconds. The restart is still the safety net: the board restarts if the port cycle does not help or after more than 12 cycles in an hour.
  • Overridden variables are read-only. If you set a custom value for a writable variable, NUT clients and the UPS Settings page can no longer change it until you remove the custom value.

New features

  • Custom NUT variables (#37, #44). In the new Custom variables panel of the NUT Server tab, you can add a variable the UPS does not report (for example battery.date) or replace a wrong value (for example ups.model). It works like override.<var> in ups.conf.
    • Up to 16 variables, each with a key, a value and an optional description. They are kept across OTA updates.
    • Only NUT clients see the custom values. The dashboard and the board logic keep the real values from the UPS.
    • NUT clients also see driver.parameter.override.<var>, as with NUT.
    • ups.status, ups.status.*, device.type and driver.parameter.* cannot be overridden.
  • Remote logging (syslog) (#69). The new Remote logging panel, under the terminal of the System Logs page, sends the System Log to a syslog server over UDP, in RFC 3164 or RFC 5424 format. It is off by default.
    • You can set the server, the port (default 514), the facility and the minimum level.
    • A status indicator next to Auto-refresh shows whether remote logging is working.
    • Settings apply without a restart and are kept across OTA updates. Nothing is sent while the board is in setup (AP) mode.
    • RFC 5424 lines carry the hostname set in the Network page. Once the board has the NTP time, RFC 3164 lines carry the time and the hostname too.
    • Syslog over UDP is not encrypted and has no delivery receipt. If the server stops while the network is up, the indicator can keep showing it as active.
  • Network time and time zone. The new Time section of Board Settings has NTP on or off, the server, and a time zone list with automatic daylight saving time. It also shows whether the time is synchronized and the board time. With the time synchronized, syslog lines carry the time they were written.
  • Board time in the System Log. Once the board has the NTP time, the System Log terminal and its export show the board time of each line, even for lines written before the synchronization. Without NTP, the terminal keeps the browser clock.

Fixes

  • No more restarts on UPSes that send few INPUT reports (#111). Some UPSes, such as the MGE Protection Center, send an INPUT report about once a minute while they answer every request of the board. After 5 minutes without one, the board marked the data stale (Home Assistant showed Unavailable), tried to recover the link and then restarted with INPUT reports stopped after recovery. Now the board checks whether the poll already reads every value the INPUT reports carry. If it does, a silence only writes one INFO line to the System Log. NUT's usbhid-ups does not watch INPUT reports at all. The Export USB Diagnostics file shows whether the watch is active (link.input_watchdog).
  • UPS absent after an automatic restart (#78). Some UPSes were still busy right after the board restarted and failed to enumerate. ESP-IDF does not retry, so the UPS could stay absent for hours. Now, if the UPS does not show up after an automatic restart, the board power-cycles its USB port after 1 and 2 minutes, and then restarts again. If the UPS still does not come back, the web UI banner asks you to unplug and replug the UPS USB cable.
  • Stuck USB control transfers (#120, #78, #123). Instead of restarting the whole board, the board power-cycles its USB port and the UPS comes back in about 6 seconds (see the upgrade notes). The [USB] Last 60 s line counts the cycles, and the USB diagnostics export shows them as link.port_cycles.
  • Errors on reports with no values (#123). The full poll now asks only for the reports that carry a value shown to NUT, as NUT does. On the APC Back-UPS BXR1200MI this removes the errors on the empty vendor report 227.
  • CyberPower battery.mfr.date (#108). On CP1350C, CP1500, CP1600 and CP2000, the board now reads the report that carries battery.mfr.date, as NUT does. On the CP2000EIPFCRM2U the UPS reports CPS there, as with NUT. You can replace it with a custom variable.

Other changes

  • USB diagnostics: Export USB Diagnostics now asks the board to read once every FEATURE report of the UPS, including the ones the poll does not use. Those reports are marked on_demand in the file, and export_read reports how the read went. This gives a full picture of a new UPS from a single export (#123).
  • Tested hardware: APC Back-UPS BXR1200MI (#123).

Thanks

  • @fox1047 and @x-magic for asking for custom NUT variables (#37, #44).
  • @tda2806 for the remote logging request (#69) and the BXR1200MI report and diagnostics (#123).
  • @rtadams89 for the remote logging core of PR #104, which the syslog support is built on.
  • @miskor-bgd for the reports and serial logs of a UPS that stayed absent after the restart (#78).
  • @tevaadarelsol for the serial log of the stuck control transfers (#120).
  • @Eric-IOT for the MGE Protection Center report and logs (#111).
  • @kobbybest for the CyberPower CP2000 report (#108).
  • Everyone who supported the project on Ko-fi and PayPal: thank you!

Install

Flash it from the web installer or upload firmware.bin (or the whole zip of your board) through OTA in the web UI.

Full Changelog: v1.13.0...v1.14.0