Read energy-consumption from Wiener Netze Smartmeters.
- login(): Login with Wiener Netze webpage credentials
- getProfile(): Get your profile info
- welcome(): Get all Infos on the welcome-page
- getConsumption($meterpoint, $start, $end): Does no longer work. See getConsumptionByDay()
- getConsumptionByDay($meterpoint, $customerid, $day): Get energy-consumption by $day.
- getMeasurements($meterpoint, $customerid, $start, $end, $type): Get energy-consumption (full days) limited by start and end parameters
- getEvents($meterpoint, $start, $end): Get Events limited by start and end parameters
- createEvent($meterpoint, $name, $start, $end): Create Event
- deleteEvent($id): Delete event by id. The id is returned with getEvents().
- getLimits(): Get limits set by the user.
- createLimit($name, $end, $period, $threshold, $type, $meterpoint): Create new Limit.
- deleteLimit($id): Delete limit. The id is returned with getLimits().
- getNotifications($limit, $order): Gets notifications limited by $limit and ordered by $order.
- getMeterPoints(): Gets all Meterpoints assinged to your account ( full detail ).
- getMeterPointIds(): Gets all Meterpoints assinged to your account ( id's only ).
<?php
require_once("smartmeter-vienna.class.php");
$sm = new ViennaSmartmeter("[yourusername]", "[yourpassword]", $debug=false);
if($sm->login()){
$profile = $sm->getProfile();
print_r($profile);
$meterpoint = $profile->defaultGeschaeftspartnerRegistration->zaehlpunkt;
$customerid = $profile->defaultGeschaeftspartnerRegistration->geschaeftspartner;
$yesterday = date('Y-m-d',strtotime("-1 days"));
$consumption = $sm->getConsumptionByDay($meterpoint, $customerid, $yesterday);
print_r($consumption);
}else{
echo "WN login error.";
}
- php-curl
This is not an official API of Wiener Netze.