Brandawg93 / PeaNUT

A tiny dashboard for Network UPS Tools
Apache License 2.0
323 stars 7 forks source link

[Bug]: Only two of my three ups are displaying output. Even though I can select the UPS the stats never change when selecting OR220LCDRT2U. #64

Closed diggitytech closed 1 month ago

diggitytech commented 2 months ago

Describe the bug

My NUT Server is running on a raspberry Pi4. I have three CPS UPS's. two of them CP1500PFCLCD and have serial numbers when polling with nut-scanner -U. The third is OR2200LCDRT2U this one does not show a serial number. In order to get all three UPS's to work in NUT Server I had to use the allow_duplicates variable in my ups.conf. I tried to use device ID but every time I rebooted the NUT Server the device id's would change. Which would make NUT Server not see the OR220LCDRT2U. After using allow_duplicates variable all three would establish a connection and would show up in nut-cgi (running on NUT server Pi) as well as Webnut (running on Proxmox host). I am running PeaNUT on my Proxmox host that also host Webnut. In Webnut I can view all three UPS's and can get all the stats from them. When I try to run Peanut all three of the UPS are available in dropdown. However only the CP1500PFCLCD's I get the stats on. When I select the OR2200LCDRT2U the stats are remaining from the previous selected CP1500 UPS. I am not certain if this is due to the allow duplicates variable that I had to use in the ups.conf to get all three UPS to show up. Maybe I am missing something. Hopefully I can figure this out would really like to get it integrated with Homepage. Thanks for the great work.

Debug Output

OR2200LCDRT2U stats are not viewable.

Steps to reproduce

Try to select OR2200LCDRT2U in drop down and stats are not available.

Device Type

Proxmox connecting to a raspberry pi NUTserver

UPS Device

CP1500PFCLCD, OR2200LCDRT2U usbhid-ups

Last Working Version

No response

Brandawg93 commented 2 months ago

Do you happen to see any logs in either docker or on the chrome web console?

diggitytech commented 2 months ago

Thank you for the reply. When I hit ctrl+shift+J I do not see any error messages in the console.

When I start my docker host this is what I get. I do get some errors when I am in the /api/docs but that is probably because I don't know what I am clicking on on in the window. I will add that as well Normal PeaNUT | > @.*** start PeaNUT | > HOSTNAME=$WEB_HOST PORT=$WEB_PORT node server.js PeaNUT | PeaNUT | ▲ Next.js 14.2.4 PeaNUT | - Local: http://localhost:8080 PeaNUT | - Network: http://0.0.0.0:8080 PeaNUT | PeaNUT | ✓ Starting... PeaNUT | ✓ Ready in 76ms

Me Clicking in the /api/docs

@.*** start HOSTNAME=$WEB_HOST PORT=$WEB_PORT node server.js

▲ Next.js 14.2.4

@.*** start HOSTNAME=$WEB_HOST PORT=$WEB_PORT node server.js

▲ Next.js 14.2.4

@.*** start HOSTNAME=$WEB_HOST PORT=$WEB_PORT node server.js

▲ Next.js 14.2.4

@.*** start HOSTNAME=$WEB_HOST PORT=$WEB_PORT node server.js

▲ Next.js 14.2.4

@.*** start HOSTNAME=$WEB_HOST PORT=$WEB_PORT node server.js

▲ Next.js 14.2.4

@.*** start HOSTNAME=$WEB_HOST PORT=$WEB_PORT node server.js

▲ Next.js 14.2.4

@.*** start HOSTNAME=$WEB_HOST PORT=$WEB_PORT node server.js

▲ Next.js 14.2.4

On Tue, Jul 30, 2024 at 3:58 PM Brandon McFarlin @.***> wrote:

Do you happen to see any logs in either docker or on the chrome web console?

— Reply to this email directly, view it on GitHub https://github.com/Brandawg93/PeaNUT/issues/64#issuecomment-2259197359, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVTC2C7CXE26D6HJT3KCGQTZO746RAVCNFSM6AAAAABLWIBCEGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJZGE4TOMZVHE . You are receiving this because you authored the thread.Message ID: @.***>

diggitytech commented 2 months ago

I am able to see each device when I use the API. Setting up my widget using the API http://{HOSTNAME}:{PORT}/api/v1/devices/ups for each individual UPS, I was able to add all three UPS's to my homepage dashboard. Just weird that the third one isn't available using the drop down menu.

Brandawg93 commented 2 months ago

Could you send me the api response for each of your devices? I can lock them on my end and test it.

Feel free to send it to brandawg93@proton.me if there is anything confidential.

Brandawg93 commented 1 month ago

Ok. Found the issue. Your third ups does not have a serial number. The issue should be fixed in the latest test build (brandawg93/peanut:test). Let me know if that fixes it for you!

diggitytech commented 1 month ago

Can confirm it is now working using brandawg93/peanut:test. Thought maybe the lack of serial number was an issue. Thanks!

lumper5 commented 1 month ago

I had the same issues as the OP and :test solved them. I can now switch between two APC units monitored by the same Rapb Pi. Previously working, 2.6.0 broke the selector. :test fixes it. Thanks.

Brandawg93 commented 1 month ago

This is now in the latest build (v2.6.1). Thanks for helping debug!