[Nut-upsuser] Using 'dummy.ups' for a real application, not just testing...

Greg Troxel gdt at lexort.com
Mon Feb 20 18:55:47 GMT 2023


Tom via Nut-upsuser <nut-upsuser at alioth-lists.debian.net> writes:

>>That makes sense.  So you'll have input voltage, output voltage, and
>>output current I would guess.  You might consider a nodemcu (ESP8266)
>>publishing via MQTT to reduce power and use of unobtainium.
>
> Yes, that is exactly what I was planning to instrument.  Maybe battery
> voltage too if I can access it.  I thought it might be useful to be able to
> see the open circuit battery voltage while charging, I dunno.

Actually, given that the output is a DC-DC converter, you really will
want to have some way to measure battery voltage so you can get
SOC/runtime.  I would suggest writing to their support and tell them
what you want.  From the site, they have higher than usual odds of being
cooperative.

> I'll look into this.  I have no experience with nodemcu's, and never heard
> of MQTT until your message, but I am always willing to learn
> something new.  Has NUT been deployed on a nodemcu?  It looks like these do
> not run traditional operating systems?

This would not run NUT or unix -- it's an arduino-class CPU.  I was
assuming you have another computer on that will and the RPI was just to
drive the i2c.

Basically:

  ESP8266: very small/low-power/cheap ($7?) arduino-ish dev board with
  wifi and GPIO/i2c/etc.

  nodemcu: software that lets you write in lua for the esp8266/esp32.
  Or you can write raw arduino code.

  MQTT: message bus for IOT where you have a broker and then some device
  writes values to a topic.  This lets you decouple the IO and the
  processing.

I have a python program that watches nut on a system and publishes a
json dictionary to an MQTT topic.  I have a remote Home Assistant that
ingests this and does display/logging/alerting.


So basically I am suggesting making a UPS that interfaces via MQTT and
an MQTT driver.  A lot more work that what you are proposing; I am
thinking the long game, which is not necessarily what you want to or
should do  -- but it's what I do....


If you don't have a machine that can run nut as part of the always on,
then your RPI0W approach makes a lot of sense.



More information about the Nut-upsuser mailing list