Closed OliverBalfour closed 1 year ago
Do you have a mechanism already set up for testing different UPS statuses? like something on the dev server?
Ohh, good point! We don't have this, no!
So there's a command we use, apcaccess status
, and we grep the output for the right string. This means if you plug your computer into a UPS with a USB-B cable it'll work (ie take the UPS and USB A to B cables from the green box in Ian Ross, plug USB A into your laptop, USB B into the side of the UPS, plug UPS into the wall, don't bother powering anything with the UPS power points), so you might have to test this on campus and find a way into that room. I'm happy to help with this when I'm out of isolation.
You could also do some preliminary work by temporarily hardcoding src/server.py
to return something of your choosing in get_UPS_status
.
when do you get out of isolation?
Thursday
do you mind if I use this library for snackbars? https://mui.com/material-ui/react-snackbar/ It looks fairly good
if not, it doesn't seem that hard to make custom
yep that's okay
We've got a universal power supply (UPS) that our RPi etc plugs into so that if the generator power cuts, we can still run on battery long enough to solve the problem.
We have an indicator on the frontend to warn operators when it's running on battery charge and might cut out soon. At the moment it just prints a Python enum and looks like this:
What we really want is
This isn't a rigid set of requirements, but any solution to this ticket should make status changes more obvious
The snackbar when power is lost should probably warn the operator to depressurise the system safely before the UPS battery runs out