UPS with EmonPi

I’ve touched on this subject before in another thread, but never really bottomed it out.

I have some power issues here and there (the wonders of living in the styx (out in the boonies I think is the US version of that phrase), anyway, I digress.

With power going off here and there, you get a dirty shutdown of the Pi, which is not its favourite thing, and I believe this may be the cause of some of the spurious inputs that get created. So, I have a UPS for networking kit (I work from home) and could relatively easily hook up the 5v Pi power supply to UPS, stopping the dirty shut downs.

I would leave the 240v sensor in raw power, but the power that feeds the Pi into UPS.

Now previously it was suggested this would only sort of work, as the power is only read at boot? I can understand the voltage sensor input needs to be on raw power, but the one that powers the actual Pi, I cant see why it would matter, this only powers the Pi at 5v yes/No?

We say both. Although we spell it sticks vice styx. :wink:

When I ran emonCMS, sometimes I’d get the spurious inputs too.
The difference being the lack of a power drop.
i.e. they’d show up even though the mains never went down.

IIRC, it’s a long-standing issue the cause of which, is still unknown.

I think something wasn’t written clearly or you’ve misunderstood. At power-up, if there isn’t a voltage detected from the a.c. adapter, the emonPi assumes there isn’t one and uses the nominal (and wrong) value of 230 V, and proceeds to calculate apparent power based on that. That decision is only made at power up. Thereafter, the a.c adapter can go away and come back as much as it likes, and the voltage recorded and hence the real power calculated will depend on what it sees.

The danger you face is if the UPS goes away and comes back before the mains power. Then, you’ll be stuck reading apparent power until you notice the voltage is stuck at 230 V and do a controlled power-down, power-up.

Is that a real danger? I’d have thought that if the UPS did go down, it would take longer to come back up when the mains returned than a simple transformer. Unless of course the user switched off the UPS output and then switched it back on again, but you can’t blame British Rail for that (as we used to say)

I think spurious inputs are normally created as a result of some radio interference (and inadequate checksums, I assume) are they not?

RFI could be one cause.

But… when I ran emonCMS, I didn’t use any RF connections.
My Elkor WattsOn power transducer was connected to a RasPi running emonCMS
via an RS-485 to USB adapter, yet I still got them every now and then.

If you accidentally switched the UPS off and back on again during an outage, would you expect the emonPi to switch over to reporting apparent power? No, neither would I unless I knew about the problem, which is why I warned Wratty about it.

Hi - thanks for the replies.

So in a nutshell, this would be fine as lone as the UPS doesn’t go off and on during the power outage, which is unlikely to be honest.

If the UPS drains to empty, then both UPS and voltage sensor will be in a power-down state and both will come live when power resumes. Generally my outages are brief, the UPS holds up all my networking, vDSL, and PC/Server estate, so a Pi shouldnt cause it any noticeable load

1 Like