Help with presenting current consumtion on webpage

Plugwise Forum about Plugwise devices and the Source software.

Help with presenting current consumtion on webpage

Postby Quart » Mon Dec 20, 2010 3:14 pm

Hi
I just got my plugwise and think its great.
I made a small webpage thats taking data from the accessdatabase that plugwise makes.
But now I want to see the consumtion thats right now.
Like the example website plugwise made.
Can anybody tell me how to do that ?
Here is my test page http://fiffi.gotdns.com/plugwise_test.php
Quart
Starting Member
Starting Member
 
Posts: 14
Joined: January 2009
Location: Sweden

Re: Help with presenting current consumtion on webpage

Postby LostDreamer » Mon Dec 20, 2010 3:39 pm

In the source software is a small webserver.
This webserver has XML files that show you the current power consumption.

LostDreamer
LostDreamer
Member
Member
 
Posts: 73
Joined: April 2009
Location: Netherlands

Re: Help with presenting current consumtion on webpage

Postby Bwired » Mon Dec 20, 2010 4:47 pm

agree with lostdreamer
lots of samples on this forum and in the plugwise directory.
check for example (old XMl) domoticaforum.eu/viewtopic.php?f=23& ... amp;t=1373
or use the XML from the HS plugin from Rene.

i use this one now:

Code: Select all
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<items type="array">
<% foreach Plugwise.Rooms %>   
   <%$room = .Name %>
   <% foreach .Appliances %>   
      <%
        if (.Module == null)
          continue;
      /if
        if (.Room == null)
          echo "No Room";
      /if
      $state=.StatusImageName.Replace("_locked","");
         $state=$state.SubString($state.LastIndexOf("_")+1);
      %>
   <appliance>
      <id><%=.Id%></id>
      <device><![CDATA[<%=.Name%>]]></device>
      <devicetype><%=.TypeText%></devicetype>
      <locked><%=.DoNotSwitchOff%></locked>
      <realstate><%=$state%></realstate>
      <powerstate><%=.PowerState%></powerstate>
      <powerusage><%=.PowerUsage%></powerusage>
      <totalusage><%=.TotalUsage%></totalusage>
      <moduleid><%=.Module.Id%></moduleid>
      <macaddr><%=.Module.MacAddress%></macaddr>
      <moduletype><%=.Module.TypeText%></moduletype>
      <room><%=$room%></room>
      <totalusagetoday><%=.TotalUsageToday%></totalusagetoday>
      <isonline><%=.IsOnline%></isonline>         
      <lastseendate><%=.LastSeenDate%></lastseendate>
      <lastseenseconds><%=.LastSeenSeconds%></lastseenseconds>   
      <firstseendate><%=.FirstSeenDate%></firstseendate>   
   </appliance>
   <% /foreach %>
<% /foreach %>
</items>
http://www.bwired.nl Online Home, Domotica, Home Automation. Weblog. http://www.bwired.nl/weblog.asp
User avatar
Bwired
Administrator
Administrator
 
Posts: 4733
Joined: March 2006
Location: Netherlands

Re: Help with presenting current consumtion on webpage

Postby Quart » Wed Dec 28, 2011 3:25 pm

I managed to solve it, look here http://www.sundshult.se/wxplugwise.php
Quart
Starting Member
Starting Member
 
Posts: 14
Joined: January 2009
Location: Sweden

Re: Help with presenting current consumtion on webpage

Postby Bwired » Wed Dec 28, 2011 6:46 pm

congrats!
exactly one year after :wink:
but looks good!
User avatar
Bwired
Administrator
Administrator
 
Posts: 4733
Joined: March 2006
Location: Netherlands

Re: Help with presenting current consumtion on webpage

Postby Quart » Thu Dec 29, 2011 9:50 am

Bwired wrote:congrats!
exactly one year after :wink:
but looks good!


I have had it running for a while now but forgot to write it here in this thread. :wink:
Quart
Starting Member
Starting Member
 
Posts: 14
Joined: January 2009
Location: Sweden

Re: Help with presenting current consumtion on webpage

Postby jrkalf » Fri Dec 30, 2011 10:18 pm

Do tell how did you solve this puppy?
If you can't fix it with a hammer, you've got an electrical problem!

Fibaro HC2, various z-wave switching, alerting, detection modules.
ELV FHT80b heating system.
User avatar
jrkalf
Member
Member
 
Posts: 271
Joined: November 2010
Location: Nootdorp


Return to Plugwise Forum

Who is online

Users browsing this forum: No registered users and 1 guest