<div dir="ltr"><div class="gmail_default" style="font-size:small">Greg:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for your inputs...</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">>That makes sense.  So you'll have input voltage, output voltage, and</div><div class="gmail_default" style="font-size:small">>output current I would guess.  You might consider a nodemcu (ESP8266)</div><div class="gmail_default" style="font-size:small">>publishing via MQTT to reduce power and use of unobtainium.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">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.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">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?</div><div class="gmail_default" style="font-size:small"><table cellpadding="0" style="border-spacing:0px;line-height:20px;font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px"><tbody><tr><td colspan="2" style="vertical-align:top;width:auto;padding:2px 0px"><span style="vertical-align:top"><br><br></span></td></tr></tbody></table></div></div><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 20, 2023 at 11:43 AM Greg Troxel <<a href="mailto:gdt@lexort.com" target="_blank">gdt@lexort.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Tom via Nut-upsuser <<a href="mailto:nut-upsuser@alioth-lists.debian.net" target="_blank">nut-upsuser@alioth-lists.debian.net</a>> writes:<br>
<br>
> 1.  Yes, I plan to use a Raspberry Pi Zero W with an I2C interface wired to<br>
> it which can monitor multiple channels of voltage and current.  Here is an<br>
> example I am considering:<br>
> <a href="https://www.amazon.com/Comimark-INA3221-Triple-Channel-Current-Voltage/dp/B07X524KSK" rel="noreferrer" target="_blank">https://www.amazon.com/Comimark-INA3221-Triple-Channel-Current-Voltage/dp/B07X524KSK</a><br>
> It is based on the TI INA3221.<br>
<br>
That makes sense.  So you'll have input voltage, output voltage, and<br>
output current I would guess.  You might consider a nodemcu (ESP8266)<br>
publishing via MQTT to reduce power and use of unobtainium.<br>
<br>
> 3.  Although 'dummy' doesn't feel right, why not?  It could allow me to<br>
> just use NUT right out of the box without having to muck with it.  I will<br>
> look at other drivers (you mention JSON).  Maybe there is something else<br>
> that can work straight out of the box...<br>
<br>
It doesn't feel right to me because<br>
<br>
  dummy is documented for testing and you aren't testing<br>
<br>
  there is not, as far as I can tell, a path to write variables and<br>
  perform instant commands<br>
<br>
That doesn't mean it won't work.<br>
<br>
> 4.  Logging, etc.  Perhaps...  My 'c' or 'Python' code that performs the<br>
> smart UPS functionality can log information, at least during debug.<br>
<br>
What I meant is that I log voltage in, power use, battery voltage,<br>
reported runtime always, in Home Assistant and this is useful to<br>
understand behavior.  Without a manufacturer determined mapping from<br>
battery voltage and load to remaining runtime you have to do that.<br>
Keeping those logs will let you figure it out.  My experience is pretty<br>
much every time I log something about the world and look at them I learn<br>
something.<br>
<br>
> 5.  Perhaps there could be some general interest, but most just buy a UPS<br>
> and don't want to gin up extra add-ons / interfaces.  They just want to<br>
> plug & Play.  If I like the result, I could consider writing it up if there<br>
> is some general interest.  Of course right now, Raspberry pi's are<br>
> virtually non-existent due to supply chain issues.<br>
<br>
Sure, but among the set of DIY people, sharing results is nice.<br>
<br>
> 6.  My example .dev file was totally fake and I used it just to test my<br>
> concept of using 'dummy'.  On the other hand, I feel like it is a<br>
> reasonable set of parameters that I wll strive to provide.  Certainly the<br>
> voltages and current.  The capacity and runtime will take more work, but<br>
> they are really not required just to inform the NAS when line power has<br>
> failed and it needs to consider shutting down.<br>
<br>
Yes, although NUT is based on "LB" to trigger shutdown.  But that's easy<br>
to synthesize.<br>
<br>
> 8.  Realistic numbers? - I have a Qnap TS233 which is quite<br>
> power-efficient.  I have measured the input current and when fully running<br>
> it draws between 0.8 and 1.0 amps.  My router is about 0.7A, so this is a<br>
> grand total of ~ 20 Watts.  The Battery Backup unit is this:<br>
> <a href="https://cuttingedgepower.com/en-at/products/mini-ups?variant=42778989691115" rel="noreferrer" target="_blank">https://cuttingedgepower.com/en-at/products/mini-ups?variant=42778989691115</a><br>
> It is rated at 75 Watt Hours so I should be good for 3+ hours with the 20<br>
> watt load.<br>
<br>
So 1.9A, which seems fine.  I just thought 3.5A was high -- but I guess<br>
you agree.<br>
<br>
Thanks for the link - that site looks like it has lots of interesting<br>
things.  You should hook up a wind turbine to charge the battery...<br>
<br>
> 9.  My motivation here is this - Our power grid is excellent here.  I<br>
> don't think we have had an outage greater than an hour since we have lived<br>
> here (10 years).  We do have (a few times per year) momentary outages (less<br>
> than a minute).  So, for 99.9% of the time, the battery will seamlessly<br>
> keep the NAS running and it will glide through the short outage.  So the<br>
> status doesn't need to be very fast.  This is mostly to ensure the NAS can<br>
> shut down safely when there is an outage that lasts more than a couple<br>
> hours (data protection rather than extended operation).<br>
<br>
Where I live has a much higher ratio of trees that can fall on lines to<br>
electric customers so I get outages more than an hour once a year or so,<br>
depending on storms and 12h+ every 5-10 years.  But, I didn't mean to<br>
question your motivation for this setup -- it makes a lot of sense and<br>
is not so different functionally than the hour+ UPS I have on my router.<br>
I just like to know right away when the power is out, even though that<br>
is not actually useful vs 30s later.  And I want to be notified of 2s<br>
outages.  These are not that rare when a fault happens and a recloser<br>
opens and closes and by the time it closes some other protection device<br>
has opened and thus the main distribution line doesn't see the fault.<br>
<br>
_______________________________________________<br>
Nut-upsuser mailing list<br>
<a href="mailto:Nut-upsuser@alioth-lists.debian.net" target="_blank">Nut-upsuser@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
</blockquote></div>