Import from http://home.solarlog-web.eu/

Hi all

 

The company where i rent my flat installed solar panels on the roof, 4 big arrays  on each building, and a smaller one on the common building

 

the data from each array is public avalible, for my building they can be found here: http://home.solarlog-web.eu/21549.html

 

i wonder if at all its possible to import these data in to emoncms as if it was connected directly ?

and if possible how would i go about it?

Robert Wall's picture

Re: Import from http://home.solarlog-web.eu/

You could ask if the underlying database is available?

Otherwise, you need to "scrape" the page containing the data and parse out the numbers you want.
You read the page, search for something unique that relates to the number, then copy what you find and put it into a variable. PHP has a lot of functions that will help you.

boelle's picture

Re: Import from http://home.solarlog-web.eu/

sadly the DB is not there... and teh data i want is no where to be found in the source code of the page

Robert Wall's picture

Re: Import from http://home.solarlog-web.eu/

But the data must be sent to your browser, therefore if you ask for the page (programmatically, like the browser does) and record everything that comes down, you should have it. I think the key is the JavaScript files. I disconnected from my router and the page still works, so the data has been downloaded and stored in the browser somewhere.

What does a tool like Wireshark reveal?

boelle's picture

Re: Import from http://home.solarlog-web.eu/

got arround to this one... there is a fight going on between the company i rent my flat from and various parts of the goverment... no clue what is going on but so far it means a bit more time before they switch out the electricity meter

 

anyways used wireshark and was able to get this link:

 

http://home.solarlog-web.eu/sds/module/solarlogweb/Statistik.php?s=fb7cc...

 

it does not update constantly, i have to figure if its once every 5 mins or 15 mins 

will have to eyeball for that but it seems to be in there as an array of some sort

 

EDIT: interval is 30 mins

boelle's picture

Re: Import from http://home.solarlog-web.eu/

even better when i digged arround this system, the current wattage and last time data was reported is out there in the open:

 

http://home.solarlog-web.eu/21556.html

look at top right corner.... 

 

there are just 5 plants to gather data from... 

 

but how would i go about importing in emoncms ? min you i'm not a programmer, i just have an idea

boelle's picture

Re: Import from http://home.solarlog-web.eu/

figured it out at last... php script that gathers the data from all 5 panel installs for a total capacity of 91,9 kwh: http://pastebin.com/6sQdfXSk

i run it with crontab every 5 mins as the web pages are updated every 30 mins on some odd minute figures. and they are not updated all at the same time

 

i have of course a combined feed for all 5 installs split with 178 since that is the number of flats that will share the generation

 

now i just have to figure how  to create an import/export feed from the 2 feeds 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.