Last modified at 11/2/2013 9:11 PM by Koen Zomers

‚ÄčI found out that there's actually already a lot of good stuff available by default in the Plugwise webinterface that can perfectly be used to extract the live data. For example:

http://localhost:8080/api/data.xml?type=appliances

Will output a perfectly fine XML file with all your devices, its status, current usage, device name, status, etc:

Plugwise-APISample-DataAppliances.png

Turning a device on or off or setting its lock status can easily be done via:

http://localhost:8080/api/actions.html?option=switchon&id=1

In which the option can be: switchon, switchoff, lockon or lockoff and the Id represents the Id of the device in Plugwise.

Plugwise-APISample-ActionsTurnOff.png

The documentation about both of these can be found at http://localhost:8080/api/index.html

There's even a RSS feed to subscribe to by default. This can be found at:

http://localhost:8080/rss/example.xml

This displays the status of all devices in a nicely formatted RSS feed. The template of this RSS feed can easily be edited by customizing the file in C:\Program Files (x86)\Plugwise\Plugwise Source\www\rss\example.xml.

Plugwise-APISample-Rss.png

Each of these templates can easily be edited in notepad to suit your specific needs. The API options are extensibly described in the Plugwise Source Template Engine PDF.

In home self written home automation software I use the MAC address of the Plugwise devices to check for its status and switch it on or off. You can download my customized template here. Just put both files in C:\Program Files (x86)\Plugwise\Plugwise Source\www\api
Plugwise-APISample-ApiTemplatesFolder.png

You can acces them via http://localhost:8080/api/koen.xml to get an overview of all the Plugwise circles in your network or call http://localhost:8080/api/koen.xml?mac=<mac address> to return just the results of the Plugwise circle with the mac address. The result is a XML file, so it can be parsed easily by your software.

Plugwise-APISample-RetrieveCircleStatus.png

By calling http://localhost:8080/api/switch.xml?cmd=<on/off>&mac=<mac address> you can switch a specific Plugwise circle on or off.

Plugwise-APISample-SetCircleStatus.png

Of course you can rename these files or customize them further to suit your specific needs.