sandersjds / prtg-sensors

Quick-and-dirty PRTG sensors for various home devices. YMMV. A lot.
1 stars 1 forks source link

No longer works with CyberPower web interface #1

Closed phhowe17 closed 8 years ago

phhowe17 commented 8 years ago

I'm using CyberPower's PowerPanel Business Edition v2.4 and the powershell script fails on line 113

$RawStatusData = Invoke-WebRequest "http://hostname-or-ip-of-ppbe:3052/agent/ppbe.xml" -WebSession $ups -Method Post -Body '<?xml version="1.0" encoding="UTF-8" ?>battery.backup.status'

(yes I've replace

sandersjds commented 8 years ago

The version that mine is running against is 2.2.2 beta3. I'll see if I have a chance to update mine and see what the new version does differently.

Does that URL still resolve (/agent/ppbe.xml)? If so, could you send me the contents?

sandersjds commented 8 years ago

And as a matter of fact it looks like the version on Cyberpower's website is now version 3.0, so that's what I'll be testing it against.

sandersjds commented 8 years ago

It actually looks like version 3.0 (can't speak to 2.4, but it could be the same problem) moved away from ajax and instead now uses websockets. Best recommendation I can give for now is to find a 2.2 version of the download, if such a beast exists.

I might be able to update this to use websockets in the future, but that's a wild new frontier for me and needs time. Sorry!

phhowe17 commented 8 years ago

Thanks, not a rush. I'm a PS knob so I'll putter a bit.

  From: Josh Sanders <notifications@github.com>

To: sandersjds/prtg-sensors prtg-sensors@noreply.github.com Cc: phhowe17 phhowe@yahoo.com Sent: Saturday, November 28, 2015 1:56 PM Subject: Re: [prtg-sensors] No longer works with CyberPower web interface (#1)

It actually looks like version 3.0 (can't speak to 2.4, but it could be the same problem) moved away from ajax and instead now uses websockets. Best recommendation I can give for now is to find a 2.2 version of the download, if such a beast exists.I might be able to update this to use websockets in the future, but that's a wild new frontier for me and needs time. Sorry!— Reply to this email directly or view it on GitHub.

snadam commented 7 years ago

Just stumbled across your script and gave it a try but, like @phhowe17 pointed out above, it doesn't work with newer versions of PPBE. Were you ever able to tweak the script to get it working or is it a dead project? Thanks

sandersjds commented 7 years ago

I would not be offended if you considered it dead for now. I believe at this point PowerShell has some support for websockets that might work for this purpose, but I haven't had a chance to work on those yet.