pforret / sunnysideup
Solar monitoring site data retrieval
Fund package maintenance!
pforret
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 1
Language:HTML
Requires
- php: ^8.1
- ext-curl: *
Requires (Dev)
- laravel/pint: ^1.2
- phpunit/phpunit: ^9.5
README
works for
- FusionSolar (Huawei) - Kiosk URL
- SunnyPortal (SMA Solar) - PV System Overview URL
- ...
Installation
You can install the package via composer:
composer require pforret/sunnysideup
Usage
$sunny = new SunnySideUp(); $response = $sunny::get("https://region04eu5.fusionsolar.huawei.com/pvmswebsite/nologin/assets/build/index.html#/kiosk?kk=$id");
Retrieved data
Huawei/FusionSolar Kiosk URL
- Example URL: region04eu5.fusionsolar.huawei.com/pvmswebsite/nologin/assets/build/index.html#/kiosk?kk=(unique ID)
- Data:
{ "stationData": { "url": "https:\/\/region04eu5.fusionsolar.huawei.com\/rest\/pvms\/web\/kiosk\/v1\/station-kiosk-file?kk=(key)", "name": "(name)", "id": "(id)", "address": "(address)", "city": null, "country": null, "timezone": null, "panel_count": null, "watt_peak": null, "date_commissioning": null }, "dayWeather": { "timeSunrise": null, "timeSunset": null, "maxTemperature": null, "currentTemperature": null, "currentPrecipitation": null }, "currentData": { "currentPowerKw": 0.64, "timeSampled": null }, "dayProduction": { "kwhSystem": 8.72, "equivalentTrees": null, "equivalentKgCoal": null, "equivalentKgCo2": null }, "monthProduction": { "kwhSystem": 98.2, "equivalentTrees": null, "equivalentKgCoal": null, "equivalentKgCo2": null }, "yearProduction": { "kwhSystem": 129.46, "equivalentTrees": 1, "equivalentKgCoal": 51.78, "equivalentKgCo2": 61.49 }, "totalProduction": { "kwhSystem": 184.84, "equivalentTrees": 1, "equivalentKgCoal": 73.94, "equivalentKgCo2": 87.8 } }
SMA/SunnyPortal.com URL
- Example URL: www.sunnyportal.com/Templates/PublicPageOverview.aspx?page=(pageID)&plant=(plantID)&splang=en-US
- data:
{ "stationData": { "url": "https:\/\/www.sunnyportal.com\/Templates\/PublicPageOverview.aspx?page=3e371bac-b19a-4257-853c-aac4d3601c0b&plant=46e9985f-128a-4da8-a70d-e95f72085ca4&splang=en-US", "name": null, "id": null, "address": null, "city": null, "country": null, "timezone": "Romance Standard Time", "panel_count": null, "watt_peak": 1800, "date_commissioning": "" }, "dayWeather": { "timeSunrise": null, "timeSunset": null, "maxTemperature": null, "currentTemperature": null, "currentPrecipitation": null }, "currentData": { "currentPowerKw": 138, "timeSampled": "2023-02-24T09:45:00" }, "dayProduction": { "kwhSystem": 0.077, "equivalentTrees": null, "equivalentKgCoal": null, "equivalentKgCo2": 0.054 }, "monthProduction": { "kwhSystem": null, "equivalentTrees": null, "equivalentKgCoal": null, "equivalentKgCo2": null }, "yearProduction": { "kwhSystem": null, "equivalentTrees": null, "equivalentKgCoal": null, "equivalentKgCo2": null }, "totalProduction": { "kwhSystem": 16385, "equivalentTrees": null, "equivalentKgCoal": null, "equivalentKgCo2": 11000 } }
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.