This is actually ignoring the real world.

The UPS has things in it that CANNOT be read instantaneously.

For example take battery discharge.  If a battery is under light load powering an inverter it may take many minutes before the voltage at the battery terminals drops even a tenth of a volt. Batteries do not discharge linearly.  Discharge percentages in the real world may plateau along for maybe 15 minutes with just a 2% loss then suddenly in the last 2 minutes might start dropping like a stone.  This is normal for the battery and the load but the amateur user sees that and flips out thinking "the UPS is broken"

If you are hell-bent on getting so-called "accurate current" information then you can query the battery every minute or every 30 seconds or even every 2 minutes and even if you had the most instantly responding measuring device on the battery - your going to get the same readings back.

Same goes for battery temperature.  Temperature changes that are slow often take many minutes to respond to.

The UPS has a CPU in it and cheap UPSes have the CPU doing a lot of things, maybe even supplying the clock frequency for the inverter.

If an app author reads a real world sensor too quickly than the actual analog world out there changes that just shows the app author knows absolutely nothing about what he's reading.

It's like the engineer who was told the glacier flows downhill - he goes to the glacier, stares at all day, then starts whining because "it hasn't moved"

Similarly it's like the engine computer designer who does not realize that it takes many minutes for heat generated by the combustion to radiate out through the cast iron engine block and reach the temperature sensor so in reality the engine will be at operating temperature for a while before the temp sensor says it is, running too rich the entire time.

If you read a UPS more frequently than the UPS has time to process your read request then your going to get garbage data back.  And if the UPS CPU is busy doing stuff including updating the graphics on some fancy screen then it's going to de-prioritize your query and may not have time to respond and so drops it.  That isn't a communications failure it's YOU not understanding how the system works and not understanding that you are abusing the system.

If the UPS app has no mechanism for handling errors like network disconnections then you are just going to get a crash/abnormal termination.  If the API the app is querying is expected to always return something unless some very abnormal thing happens like the UPS signaling cable falls out, then the app will not be written to gracefully handle anything other than that.

This is how real software is written.  If you plug your crappy Cyberpower UPS into a Windows box it will show it green even though behind the scenes it may be disconnecting/reconnecting or failing to return values dozens of times in the hour.

Software is written like this because it's expected that the amateur who buys the $50 Cyberpower UPS does not understand any of this and will flip out when their $50 UPS starts going off and online, whereas the professional who buys the $500 UPS is expected to understand all of this and expects that behind the scenes there never be disconnects/reconnects.

The amateur then complains to Cyberpower and they give him some cockamamie story about the driver being "incompatible with a new build of Windows" then email him a driver that is identical code to the old driver including making it disconnect reconnect except that the new driver just hides that it's doing that and the amateur thinks Cyberpower "fixed" the driver.  Yes, they "fixed" the brake warning light by putting black tape over the bulb.

You are getting affronted because your $50 UPS is not as good as a $500 UPS.

This is why it is so hard to get good industrial control programmers.  Most programmers spend all day in an office and have probably never once in their lives picked up a wrench it is no wonder they fall on their faces when tasked to write a software program that controls an assembly line.

I get your desire to know what's really going on - but 99.99% of the customers buying the cyberpower UPS do NOT want to REALLY know what's going on.  They just want "blinkin lights"

Ted

On 11/16/2026 2:26 AM, Lucas Willian Bocchi via Nut-upsdev wrote:
Disclosure: This message was prepared from my dictated comments, with AI 
assistance for editing and translation into English.

Hello everyone,

In a critical environment, where accurate, current information is essential, I 
do not see room for an approach that silently presents old data as if it were 
current. In my view, that is a design flaw: UPS monitoring and shutdown 
decisions depend on trustworthy information about the actual state of the 
equipment.

Using stale values without making their status clear undermines the user's 
confidence in the information being received. That information must be as 
faithful as possible to reality, including the fact that the driver can no 
longer communicate with the device or obtain fresh data.

For example, a UPS may have lost mains power while the software is still 
reporting an old online status. If the monitoring daemon is acting on outdated 
information, it may be unable to do what it was designed to do: shut down the 
protected equipment when necessary.

For that reason, I think detecting communication problems and attempting 
reconnection is the better approach. The driver should be capable of detecting 
disconnections and a lack of fresh data, attempting recovery, and reporting the 
situation transparently to the user. It must not leave a communication failure 
looking like a healthy, up-to-date reading.

Regarding AI, I believe its use is inevitable. The real question is how we use 
it. I often describe two kinds of programmers: those who tell the AI to press 
the correct button, and those who tell it to press every button to discover 
which one is correct. What I would like to see in this community is the former 
approach: a developer who understands the problem and directs, checks, and 
takes responsibility for the work, rather than relying on blind trial and error.

We should not accept driver contributions produced through vibe coding by 
someone who lacks even a basic understanding of the device's protocol and 
behaviour.

I am hardly in a position to claim that everything must begin with complete 
documentation. I developed my own driver through inference, experimentation, 
and educated guesswork because the manufacturer provided no protocol 
documentation. However, I know the behaviour of these devices well, having used 
them for more than twenty years. AI helped me identify some issues outside my 
normal test environment, but that did not remove my responsibility for the 
result.

My approach has always been: the AI implements something, I inspect it, and 
then I make adjustments with or without its help, depending on the complexity. 
I test again and repeat the cycle. I believe this is a sound approach; if I am 
mistaken, I would genuinely welcome help from colleagues in understanding how 
to improve it.

On the question of stale information, however, it does not meet the needs of my 
environment. Current information is crucial, and making the necessary efforts 
to obtain it is fundamental. I cannot rely on erroneous or outdated telemetry, 
because it compromises the operation, especially at remote sites where knowing 
whether the equipment is actually online or unreachable is essential.

Of course, there are many nuances, including communication methods, device 
types, and update schedules, as others have already pointed out. I therefore 
think each driver should have an approach appropriate to the equipment it 
supports.

In particular, I would recommend an explicit per-driver option to disable the 
use of stale cached data. In that mode, the information must be fresh; if fresh 
data cannot be obtained, the driver must clearly report that failure instead of 
presenting an old value as a current measurement. I mean disabling the use of 
stale values, not disabling the indication of their age or the reporting of a 
communication failure.

That is my perspective, based on the operational requirements I have to meet.

Best regards,
Lucas Willian Bocchi

_______________________________________________
Nut-upsdev mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev

_______________________________________________
Nut-upsdev mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev

Reply via email to