accessing sensor values from Plugwise Sense

Plugwise Forum about Plugwise devices and the Source software.
Post Reply
mvh99
Starting Member
Starting Member
Posts: 1
Joined: Fri Nov 18, 2011 10:41 am

accessing sensor values from Plugwise Sense

Post by mvh99 »

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
%>
User avatar
nico_gh2
Member
Member
Posts: 133
Joined: Wed Apr 06, 2011 12:24 pm
Location: Betuwe, Netherlands
Contact:

Re: accessing sensor values from Plugwise Sense

Post by nico_gh2 »

It is not yet supported in the webserver AFAIK.
Thought this was mentioned in the release notes of Source.
WHB
Starting Member
Starting Member
Posts: 9
Joined: Mon Aug 02, 2010 12:25 pm
Location: Eindhoven, The Netherlands

Re: accessing sensor values from Plugwise Sense

Post by WHB »

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>
User avatar
Rene
Global Moderator
Global Moderator
Posts: 1689
Joined: Wed Oct 08, 2008 3:54 pm
Location: Netherlands

Re: accessing sensor values from Plugwise Sense

Post by Rene »

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.
Post Reply

Return to “Plugwise Forum”