Help parsing XML/link data from embedded web device

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Black6spdZ
Posts: 5
Joined: Thu Mar 27, 2014 9:58 am

Help parsing XML/link data from embedded web device

Post by Black6spdZ »

I have discovered the device "a solar micro grid inverter" has an XML page that outputs just the basic information I am after. I just don't know where to even begin making this Cacti server poll the devices to retrieve and graph the output. The output changes slightly depending if the there is input power and the output is active. Here is the output from http://10.0.0.195/s.xml with no input and output "night mode".

<response>
<p1>03:06:16 | | 0</p1>
<p2>0.48V/0.38A/0W | | 0.0</p2>
</response>

and here is the unit active

<response>
<p1>00:15:44 | | 0</p1>
<p2>21.16V/2.56A/54W | | 117.00V/0.45A/53W/0.00VAR</p2>
</response>


Here is the labels for the data

Uptime "hh:mm:ss"| | Phase angle "degrees"
Input Voltage "volts"/Input Current "Amps"/input power "Watts" | | Output Voltage / Output current / output power / Reactive power "VAR"

It would also be nice to compute conversion efficiency using the input and output power and also summing the total input and output power into a single graph, but that can be saved for later.
If anyone is willing to help I could setup Teamviewer to access the cacti server and device output in real-time to help get it working. Thanks!
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Help parsing XML/link data from embedded web device

Post by cigamit »

You need to write a custom script to pull and parse the data. Just as an example, the lighttpd template has a script that you can use as a basis.

The gist of it is, you need to tell it to connect to the server, pull the data, parse out the data for each variable, and return them to cacti in the required formatting.
Not terribly hard.
Black6spdZ
Posts: 5
Joined: Thu Mar 27, 2014 9:58 am

Re: Help parsing XML/link data from embedded web device

Post by Black6spdZ »

wow that lighttpd XML script looks very complicated!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests