Hey Terry
@terrypacker said:
Every time I go to the pages there is no live data available. I'm starting to wonder if you need to be logged in somehow?
It looks like you are right (once again). The URLs above weren't updating for me either, so I just tried logging in (with a private browser session) and navigating to one of our plants, then opening the 'PV system overview' page, and it does update every 10 seconds or so. When logged in, the 'PV system overview' page URL in the browser is https://www.sunnyportal.com/FixedPages/Dashboard.aspx
Without logging out, I can browse to the ../publicpageoverview.aspx/.. URL above and see the same page, but the data doesn't update and is ~30 minutes old. So it seems that you must be logged in to get the data dynamically updating, and even then, the page URL to access that is different. Sorry to send you on a wild goose chase.
Whilst logged in, I can see requests being made by sma.scripts.min.js to https://www.sunnyportal.com/Dashboard?t=1443694513741, and if I access that directly in the same browser session, this is returned:
{"__type":"LiveDataUI","Timestamp":{"__type":"DateTime","DateTime":"2015-10-01T10:20:24","Kind":"Unspecified"},"PV":25004,"FeedIn":null,"GridConsumption":null,"DirectConsumption":null,"SelfConsumption":null,"SelfSupply":null,"TotalConsumption":null,"DirectConsumptionQuote":null,"SelfConsumptionQuote":null,"AutarkyQuote":null,"BatteryIn":null,"BatteryOut":null,"BatteryChargeStatus":null,"OperationHealth":{"__type":"StateOfHealth","Ok":1,"Warning":0,"Error":0,"Unknown":0},"BatteryStateOfHealth":null,"InfoMessages":[],"WarningMessages":[],"ErrorMessages":[],"Info":{}}
For every couple of requests to t=nnnnnn, the nnnnn value increments by one, and always returns the current measurement. If I try https://www.sunnyportal.com/Dashboard?t=0 then I get the same JSON with the current measurement and timestamp.
I'm not really sure where to go from there - If you have any further ideas, I'd be happy to share my Sunny Portal login with you so you can poke around.
I found that someone has roughed up a node.js script: https://github.com/mkorthuis/sunnyportal-api
I might have a play with this to see if I can get it to write multiple plant data to a text file.
Kind regards
Jeremy