Script for getting 30min values

Avatar

kevinf
2012-03-05 11:35

Is there a way to run a script to get 30min values (similar to doing a download of the profile graph)
I have a number of meter accounts that I need to get the 30min csv file for. if it's in XML that's fine, I can convert and extract in csv quite easily myself as I have done so. At the moment I run the getprovbill script but it doesn't give me the data in 30min segments.
I also just need the raw P, Q and S values
Kevin

Avatar

sdg.marinusvz
2012-03-06 16:54

I remember I've had this query before. Basically it comes down to calling the 'Download' option that is normally selected from a view of the 'Profile Graph' via wget on linux.
The url would be something in the general format of:
https://adam.pnpscada.com/_DataDownload?CSV=Yes&GSTARTH=$$$$$$$$&GSTARTN=$$$$$$$$&GENDH=$$$$$$&GENDN=$$$$$$&GSTARTD=$$$$$$$$&GSTARTY=$$$$$$$$&GSTARTM=$$$$$$$$&GENDD=$$$$$$&GENDY=$$$$$$&GENDM=$$$$&selGNAME_UTILITY=$$$$&TGIDX=$$$
Where the TGIDX is the index of the tariff: 0 for the default one.
Where selGNAME_UTILITY is a composite of the key1 of the meter account (some unique number); a $ as divisor, and the UTILITY being measured, e.g. Electricity, in other words something like 123$Electricity.
Where GSTARTH is the start hours, GSTARTM is the start month, GSTARTN is the start minute, and so forth. And the same for those starting with GEND.
I think you'll also need LOGIN, being something like mysubdomain.myloginhere, and PWD with your password.
That should work. I haven't tested it yet, but it should work. Will post here when I've tested it.

Avatar

sdg.marinusvz
2012-03-07 20:00

Ok, here is an example of one that works (I've changed the login details, though)
https://wspgroup.pnpscada.com/_DataDownload?CSV=Yes&LOGIN=vxx.notreal&PWD=oasswird&GSTARTH=0&GSTARTN=0&GENDH=0&GENDN=0&GSTARTY=2011&GSTARTM=12&GSTARTD=1&GENDY=2012&GENDM=3&GENDD=1&selGNAME_UTILITY=808$Electricity&TGIDX=0

Avatar

kevinf
2012-03-08 06:54

Thanks, this works for anything on adam, but not amminadab ?

Avatar

sdg.marinusvz
2012-03-08 07:43

Ok, I see that you also need PNPENTID=xxx&PNPENTCLASID=109, as explained in the web documentation (http://www.pnpscada.com/webservices.jsp).
So the new URL you should use:
https://wspgroup.pnpscada.com/_DataDownload?CSV=Yes&LOGIN=vxx.notreal&PWD=oasswi rd&GSTARTH=0&GSTARTN=0&GENDH=0&GENDN=0&GSTARTY=201 1&GSTARTM=12&GSTARTD=1&GENDY=2012&GENDM=3&GENDD=1& selGNAME_UTILITY=808$Electricity&TGIDX=0&PNPENTID=xxx&PNPENTCLASID=109
109 is the class id for Meter Account, and in place of xxx you should put the entity id (eid); which you can get by in the overview screen as a tooltip when hovering your mouse over the top line in the selected entity's block.

Please log in to post a comment