This page last changed on Oct 13, 2014 by gesatecnico.

Hi everyone,
i have a little problem to read the state of sensor. I created with java a xml file situated in c:/xml/246.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

  • <cpu id="246">
    <s01>1</s01>
    <s02>0</s02>
    <s03>0</s03>
    <s04>0</s04>
    <s05>0</s05>
    <s06>0</s06>
    <s07>0</s07>
    <s08>0</s08>
    <s09>0</s09>
    <s10>1</s10>
    </cpu>

when i configured in Designer, i created a sensor with this configuration:
<command id="165" protocol="http">
<property name="pollingInterval" value="4s" />
<property name="method" value="GET" />
<property name="url" value="C://xml/246.xml" />
<property name="xpath" value="//cpu id="246"/s1" />
<property name="name" value="01-Lampadari Gazebo - Stato" />
</command>

and i created a custom sensor:
<sensor id="241227" name="01 - Lampadari Gazebo - Sensor" type="custom">
<include type="command" ref="165" />
<state name="ON" value="1" />
<state name="OFF" value="0" />
</sensor>
but when i start OR, it log me: Sensor not found.

I searched in forum and the site, but i don't found results. Do you help me?
Thanks

How about s01 instead of s1 in your XPATH

Posted by pz1 at Oct 14, 2014 07:30

Sorry... my error...

Posted by gesatecnico at Oct 14, 2014 15:37

You still haven't beaten me in making such errors

Posted by pz1 at Oct 14, 2014 16:34
Document generated by Confluence on Jun 05, 2016 09:38