Skip to content

PHP Class for reading energy-consumption from Wiener Netze Smart meters.

License

Notifications You must be signed in to change notification settings

skainz92/wienernetze-smartmeter-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 

Repository files navigation

wienernetze-smartmeter-php

Read energy-consumption from Wiener Netze Smartmeters.

Available Methods:

  • 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 ).

Usage

<?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.";
	}

Requirements

  • php-curl

Disclaimer

This is not an official API of Wiener Netze.

About

PHP Class for reading energy-consumption from Wiener Netze Smart meters.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages