accessing sensor values from Plugwise Sense

Plugwise Forum about Plugwise devices and the Source software.

accessing sensor values from Plugwise Sense

Postby mvh99 » Wed Nov 23, 2011 12:27 pm

Hello everyone,

I am using the Sense temperature and humidity sensor from Plugwise.
In the Plugwise Source program (v2.21) I can read these 2 values and they are nicely updated and displaye graphically

However when I want to access these 2 values from the webserver, the fields turn out to be empty.
Does any one have experience with these sensors?

The webscript I use is the following:

<%
$list=Plugwise.Modules
ForEach $list
%>

<% If $list[$_Index] != null %>
"<%=$list[$_Index].Name%>",
<%=$list[$_Index].LastSeenDate%>,
<% if ($list[$_Index].Name == "C....") || ($list[$_Index].Name == "C...")
%>
Temp = <% $list[$_Index].Temperature %>
Hum = <% $list[$_Index].Humidity %>
<%/If
%>

<%Else%>
,,,
<%/If
%>
<br>
<%
/Foreach
%>
mvh99
Starting Member
Starting Member
 
Posts: 1
Joined: November 2011

Re: accessing sensor values from Plugwise Sense

Postby nico_gh2 » Wed Nov 23, 2011 6:19 pm

It is not yet supported in the webserver AFAIK.
Thought this was mentioned in the release notes of Source.
User avatar
nico_gh2
Member
Member
 
Posts: 88
Joined: April 2011
Location: Betuwe, Netherlands

Re: accessing sensor values from Plugwise Sense

Postby WHB » Wed Nov 23, 2011 10:11 pm

It works as advertised for me with Source 2.21. I put it into some debugging XML with the following template code:
Code: Select all
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<modules>
<%
foreach Plugwise.Modules   
%>
   <module>
      <appliance><%=.Appliance%></appliance>
      <humidity><%=.Humidity%></humidity>
      <lastCompletedLogIndex><%=.LastCompletedLogIndex%></lastCompletedLogIndex>
      <lastSeenDate><%=.LastSeenDate%></lastSeenDate>
      <lastSeenSeconds><%=.LastSeenSeconds%></lastSeenSeconds>
      <macAddress><%=.MacAddress%></macAddress>
      <name><%=.Name%></name>
      <status><%=.Status%></status>
      <temperature><%=.Temperature%></temperature>
   </module>
<%
/foreach
%>
</modules>
WHB
Starting Member
Starting Member
 
Posts: 8
Joined: August 2010
Location: Eindhoven, The Netherlands

Re: accessing sensor values from Plugwise Sense

Postby Rene » Wed Nov 23, 2011 10:33 pm

For me too:

Code: Select all
<% foreach Plugwise.Modules %>   
  <% If (.Type == 5) %>
    <sense>
   <moduleid><%=.Id%></moduleid>
   <macaddr><%=.MacAddress%></macaddr>
   <typetext><%=.TypeText%></typetext>
   <image><%=Plugwise.ImagesPath%>32/<%=.StatusImageName%>.png</image>
   <online><%=.IsOnline%></online>
   <lastseen><%=.LastSeenSeconds%></lastseen>
   <humidity><%=.Humidity%></humidity>
   <temperature><%=.Temperature%></temperature>
   <firmwaredate><%=.FirmwareDate%></firmwaredate>
   <firmwareversion><%=.FirmwareVersion%></firmwareversion>
   <hardwareversion><%=.HardwareVersion%></hardwareversion>
    </sense>
  <% /if %>
<% /foreach %>
Rene.
User avatar
Rene
Global Moderator
Global Moderator
 
Posts: 1580
Joined: October 2008
Location: Netherlands


Return to Plugwise Forum

Who is online

Users browsing this forum: No registered users and 3 guests