Replies: 4 comments 1 reply
|
Let me have a look at that for you. |
0 replies
|
Can I check that the device that works is the 'upsservers' and the one that fails is the 'upsnetwork' please? |
0 replies
|
I believe it was the other way around. I had to leave for vacation. Unfortunately. can't check right now |
0 replies
|
I traced the error. It happened because one of your UPS devices does not send a battery.runtime value. This is most unusual but the app should have handled it properly. I have released a bug fix #66 which should fix this for you. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi, thanks for great app! Have a small issue however
I got one Rpi device with 2 UPSs on it. Configured correctly in Nutcase. Json comes thru fine, but the parsing thru nutcase errors out with 500 for one of the UPSes. Another one is OK
Here is JSON:
{ "nutcase_version": "NUTCase 0.4.0.1", "server_version": "2.8.0", "server_address": "192.168.4.99", "server_port": 3493, "logs": { "total": [ 0, 0, 0 ], "unread": [ 0, 0, 0 ] }, "upsnetwork": { "description": "Trip Lite 500VA Misc Equpment UPS", "battery.charge": "100", "battery.voltage": "13.90", "battery.voltage.nominal": "12", "device.mfr": "Tripp Lite", "device.model": "SMART500RT1U", "device.type": "ups", "driver.name": "tripplite_usb", "driver.parameter.pollinterval": "1", "driver.parameter.port": "auto", "driver.parameter.productid": "0001", "driver.parameter.synchronous": "auto", "driver.parameter.vendorid": "09AE", "driver.version": "2.8.0", "driver.version.internal": "0.33", "driver.version.usb": "libusb-1.0.26 (API: 0x1000109)", "input.voltage": "120", "input.voltage.maximum": "137", "input.voltage.minimum": " 0", "input.voltage.nominal": "120", "outlet.1.desc": "Load 1", "outlet.1.id": "1", "outlet.1.switch": "1", "outlet.1.switchable": "1", "outlet.2.desc": "Load 2", "outlet.2.id": "2", "outlet.2.switchable": "0", "ups.debug.D": "00 78 00 8b 0d 00 00 '.x.....'", "ups.debug.load_banks": "1", "ups.debug.M": "00 00 00 89 0d 00 00 '.......'", "ups.debug.P": "30 30 35 30 30 58 0d '00500X.'", "ups.debug.S": "01 04 00 00 64 00 0d '....d..'", "ups.debug.T": "23 00 02 58 01 58 0d '...X.X.'", "ups.debug.V": "02 00 0c 01 58 58 0d '....XX.'", "ups.delay.shutdown": "64", "ups.firmware": "F334401", "ups.firmware.aux": "protocol 3005", "ups.id": "0", "ups.load": "6", "ups.mfr": "Tripp Lite", "ups.model": "SMART500RT1U", "ups.power.nominal": "500", "ups.productid": "0001", "ups.status": "OL", "ups.temperature": "0", "ups.vendorid": "09ae", "clients": { "count": 0, "list": [] }, "logs": { "total": [ 0, 0, 0 ], "unread": [ 0, 0, 0 ] } }, "upsservers": { "description": "Tripp Lite 1500VA UPS", "battery.charge": "100", "battery.runtime": "864", "battery.type": "PbAC", "battery.voltage": "26.3", "battery.voltage.nominal": "24.0", "device.mfr": "Tripp Lite ", "device.model": "Tripp Lite UPS ", "device.type": "ups", "driver.name": "usbhid-ups", "driver.parameter.pollfreq": "30", "driver.parameter.pollinterval": "1", "driver.parameter.port": "auto", "driver.parameter.productid": "2012", "driver.parameter.synchronous": "auto", "driver.parameter.vendor": "Tripp Lite", "driver.parameter.vendorid": "09AE", "driver.version": "2.8.0", "driver.version.data": "TrippLite HID 0.84", "driver.version.internal": "0.47", "driver.version.usb": "libusb-1.0.26 (API: 0x1000109)", "input.frequency": "59.8", "input.voltage": "115.1", "input.voltage.nominal": "120", "output.frequency.nominal": "60", "output.voltage": "115.0", "output.voltage.nominal": "120", "ups.beeper.status": "enabled", "ups.delay.shutdown": "20", "ups.load": "39", "ups.mfr": "Tripp Lite ", "ups.model": "Tripp Lite UPS ", "ups.power": "0.0", "ups.power.nominal": "1500", "ups.productid": "2012", "ups.status": "OL", "ups.timer.reboot": "65535", "ups.timer.shutdown": "65535", "ups.vendorid": "09ae", "ups.watchdog.status": "0", "clients": { "count": 0, "list": [] }, "logs": { "total": [ 0, 0, 0 ], "unread": [ 0, 0, 0 ] } } }Here is the config.yml:
`
settings:
log_level: warning
order_metrics: True
coloured_log: True
default_log_lines: 20
servers:
port: 3493
default: true
`
Error from the logs:
[2024-10-10 01:02:08,983] ERROR in app: Exception on /api/status [GET] Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1463, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 872, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 870, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 855, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/app/api/routes.py", line 28, in route_status Result = gui_data_format.Process_Data_For_GUI(Scrape_Data, Device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/app/utils/gui_data_format.py", line 928, in Process_Data_For_GUI Chart_Runtime(UPS, Result) File "/app/app/utils/gui_data_format.py", line 400, in Chart_Runtime Data_Max = max(Clean_List(Runtime_Y)) ^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: max() arg is an empty sequenceAll reactions