This page last changed on Feb 22, 2015 by hipperd.

I'm trying to use openremote to controll switches from domoticz.
I've made a new device with 3 commands;

Name: Schemerlamp ON
Protocol : HTTP
URL: http://192.168.x.xxx:xxxx/json.htm?type=command&param=switchlight&idx=9&switchcmd=On&level=0
HTTP Method: GET

And the rest is empty.

Name: Schemerlamp OFF
Protocol : HTTP
URL: http://192.168.x.xxx:xxxx/json.htm?type=command&param=switchlight&idx=9&switchcmd=Off&level=0
HTTP Method: GET

And the rest is empty.

Name: Schemerlamp Status
Protocol : HTTP
URL: http://192.168.x.xxx:xxxx/json.htm?type=devices&rid=9
HTTP Method: GET

Based on this I made a new sensor

Based off this a made a switch.
When i go to the UI designer and add a switch and try it the lamp goes on but the switch doesn't change state and it won't turn off.


Status.PNG (image/png)
Sensor.PNG (image/png)
IMG_0155.PNG (image/png)

Check the log files and see what the HTTP status command returns and what the regex makes out of it.

Posted by mredeker at Feb 23, 2015 09:09

Maybe a stupid question but I'm verry new with this.
Where can I find the logs? I've installed it on a synology nas.

Posted by hipperd at Feb 23, 2015 11:49

Try the forum or google search for details.
Log could be here but depends on Syno install: volume1/@appstore/OpenRemote/logs/

Posted by mredeker at Feb 23, 2015 12:00

This is what the dev log says.

    2015-02-27 16:12:07,220 TRACE [Polling thread for sensor: Schemerlamp ON/OFF]: Processed {
   "5MinuteHistoryDays" : 1,
   "ActTime" : 1425049927,
   "AllowWidgetOrdering" : true,
   "DashboardType" : 0,
   "Latitude" : "51.461586",
   "Longitude" : "5.611490",
   "MobileType" : 1,
   "TempScale" : 1.0,
   "TempSign" : "C",
   "WindScale" : 1.0,
   "WindSign" : "m/s",
   "dontcachehtml" : true,
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "RFXCOM",
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0E7F2BE",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2015-02-27 16:05:18",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Schemerlamp woonkamer",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 7,
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "true",
         "Type" : "Lighting 2",
         "TypeImg" : "dimmer",
         "Unit" : 3,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "9"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
, received {
   "5MinuteHistoryDays" : 1,
   "ActTime" : 1425049927,
   "AllowWidgetOrdering" : true,
   "DashboardType" : 0,
   "Latitude" : "51.461586",
   "Longitude" : "5.611490",
   "MobileType" : 1,
   "TempScale" : 1.0,
   "TempSign" : "C",
   "WindScale" : 1.0,
   "WindSign" : "m/s",
   "dontcachehtml" : true,
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "RFXCOM",
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0E7F2BE",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2015-02-27 16:05:18",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Schemerlamp woonkamer",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 7,
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "true",
         "Type" : "Lighting 2",
         "TypeImg" : "dimmer",
         "Unit" : 3,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "9"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

2015-02-27 16:12:07,221 INFO [HTTP-Thread-3]: Had waited the skipped sensor ids of statuses in DEVICEID:FFFFFFFFA025DD45E473402F82CA4566C0F2CFC1	sensorID:[106902340]statusChangedSensorID:[106902340]
2015-02-27 16:12:07,229 INFO [HTTP-Thread-3]: Querying changed data from StatusCache...
2015-02-27 16:12:07,229 INFO [HTTP-Thread-3]: Have queried changed data from StatusCache.
2015-02-27 16:12:07,230 INFO [HTTP-Thread-3]: Return the polling status.
2015-02-27 16:12:07,230 INFO [HTTP-Thread-3]: Finished polling at 2015-02-27 16:12:07

2015-02-27 16:12:07,370 INFO [HTTP-Thread-3]: Querying changed state from ChangedStatus table...
2015-02-27 16:12:07,370 INFO [HTTP-Thread-3]: Found: [device => FFFFFFFFA025DD45E473402F82CA4566C0F2CFC1, sensorIDs => 106902340] in ChangedStatus table.
2015-02-27 16:12:07,370 INFO [HTTP-Thread-3]: DEVICEID:FFFFFFFFA025DD45E473402F82CA4566C0F2CFC1	sensorID:[106902340]statusChangedSensorID:[]Waiting...
2015-02-27 16:12:08,266 INFO [Polling thread for sensor: Schemerlamp ON/OFF]: received message: {
   "5MinuteHistoryDays" : 1,
   "ActTime" : 1425049928,
   "AllowWidgetOrdering" : true,
   "DashboardType" : 0,
   "Latitude" : "51.461586",
   "Longitude" : "5.611490",
   "MobileType" : 1,
   "TempScale" : 1.0,
   "TempSign" : "C",
   "WindScale" : 1.0,
   "WindSign" : "m/s",
   "dontcachehtml" : true,
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "RFXCOM",
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0E7F2BE",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2015-02-27 16:05:18",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Schemerlamp woonkamer",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 7,
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "true",
         "Type" : "Lighting 2",
         "TypeImg" : "dimmer",
         "Unit" : 3,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "9"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

2015-02-27 16:12:08,266 TRACE [Polling thread for sensor: Schemerlamp ON/OFF]: Processed {
   "5MinuteHistoryDays" : 1,
   "ActTime" : 1425049928,
   "AllowWidgetOrdering" : true,
   "DashboardType" : 0,
   "Latitude" : "51.461586",
   "Longitude" : "5.611490",
   "MobileType" : 1,
   "TempScale" : 1.0,
   "TempSign" : "C",
   "WindScale" : 1.0,
   "WindSign" : "m/s",
   "dontcachehtml" : true,
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "RFXCOM",
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0E7F2BE",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2015-02-27 16:05:18",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Schemerlamp woonkamer",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 7,
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "true",
         "Type" : "Lighting 2",
         "TypeImg" : "dimmer",
         "Unit" : 3,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "9"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
, received {
   "5MinuteHistoryDays" : 1,
   "ActTime" : 1425049928,
   "AllowWidgetOrdering" : true,
   "DashboardType" : 0,
   "Latitude" : "51.461586",
   "Longitude" : "5.611490",
   "MobileType" : 1,
   "TempScale" : 1.0,
   "TempSign" : "C",
   "WindScale" : 1.0,
   "WindSign" : "m/s",
   "dontcachehtml" : true,
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "RFXCOM",
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0E7F2BE",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2015-02-27 16:05:18",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Schemerlamp woonkamer",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 7,
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "true",
         "Type" : "Lighting 2",
         "TypeImg" : "dimmer",
         "Unit" : 3,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "9"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

2015-02-27 16:12:08,267 INFO [HTTP-Thread-3]: Had waited the skipped sensor ids of statuses in DEVICEID:FFFFFFFFA025DD45E473402F82CA4566C0F2CFC1	sensorID:[106902340]statusChangedSensorID:[106902340]
2015-02-27 16:12:08,267 INFO [HTTP-Thread-3]: Querying changed data from StatusCache...
2015-02-27 16:12:08,268 INFO [HTTP-Thread-3]: Have queried changed data from StatusCache.
2015-02-27 16:12:08,268 INFO [HTTP-Thread-3]: Return the polling status.
2015-02-27 16:12:08,279 INFO [HTTP-Thread-3]: Finished polling at 2015-02-27 16:12:08

2015-02-27 16:12:08,393 INFO [HTTP-Thread-3]: Querying changed state from ChangedStatus table...
2015-02-27 16:12:08,393 INFO [HTTP-Thread-3]: Found: [device => FFFFFFFFA025DD45E473402F82CA4566C0F2CFC1, sensorIDs => 106902340] in ChangedStatus table.
2015-02-27 16:12:08,393 INFO [HTTP-Thread-3]: DEVICEID:FFFFFFFFA025DD45E473402F82CA4566C0F2CFC1	sensorID:[106902340]statusChangedSensorID:[]Waiting...
2015-02-27 16:12:09,296 INFO [Polling thread for sensor: Schemerlamp ON/OFF]: received message: {
   "5MinuteHistoryDays" : 1,
   "ActTime" : 1425049929,
   "AllowWidgetOrdering" : true,
   "DashboardType" : 0,
   "Latitude" : "51.461586",
   "Longitude" : "5.611490",
   "MobileType" : 1,
   "TempScale" : 1.0,
   "TempSign" : "C",
   "WindScale" : 1.0,
   "WindSign" : "m/s",
   "dontcachehtml" : true,
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "RFXCOM",
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0E7F2BE",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2015-02-27 16:05:18",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Schemerlamp woonkamer",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 7,
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "true",
         "Type" : "Lighting 2",
         "TypeImg" : "dimmer",
         "Unit" : 3,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "9"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

2015-02-27 16:12:09,296 TRACE [Polling thread for sensor: Schemerlamp ON/OFF]: Processed {
   "5MinuteHistoryDays" : 1,
   "ActTime" : 1425049929,
   "AllowWidgetOrdering" : true,
   "DashboardType" : 0,
   "Latitude" : "51.461586",
   "Longitude" : "5.611490",
   "MobileType" : 1,
   "TempScale" : 1.0,
   "TempSign" : "C",
   "WindScale" : 1.0,
   "WindSign" : "m/s",
   "dontcachehtml" : true,
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "RFXCOM",
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0E7F2BE",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2015-02-27 16:05:18",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Schemerlamp woonkamer",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 7,
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "true",
         "Type" : "Lighting 2",
         "TypeImg" : "dimmer",
         "Unit" : 3,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "9"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
, received {
   "5MinuteHistoryDays" : 1,
   "ActTime" : 1425049929,
   "AllowWidgetOrdering" : true,
   "DashboardType" : 0,
   "Latitude" : "51.461586",
   "Longitude" : "5.611490",
   "MobileType" : 1,
   "TempScale" : 1.0,
   "TempSign" : "C",
   "WindScale" : 1.0,
   "WindSign" : "m/s",
   "dontcachehtml" : true,
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "RFXCOM",
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0E7F2BE",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2015-02-27 16:05:18",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Schemerlamp woonkamer",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 7,
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "true",
         "Type" : "Lighting 2",
         "TypeImg" : "dimmer",
         "Unit" : 3,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "9"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

2015-02-27 16:12:09,297 INFO [HTTP-Thread-3]: Had waited the skipped sensor ids of statuses in DEVICEID:FFFFFFFFA025DD45E473402F82CA4566C0F2CFC1	sensorID:[106902340]statusChangedSensorID:[106902340]
2015-02-27 16:12:09,297 INFO [HTTP-Thread-3]: Querying changed data from StatusCache...
2015-02-27 16:12:09,298 INFO [HTTP-Thread-3]: Have queried changed data from StatusCache.
2015-02-27 16:12:09,298 INFO [HTTP-Thread-3]: Return the polling status.
2015-02-27 16:12:09,299 INFO [HTTP-Thread-3]: Finished polling at 2015-02-27 16:12:09

Thread-2]: Had waited the skipped sensor ids of statuses in DEVICEID:FFFFFFFFA025DD45E473402F82CA4566C0F2CFC1	sensorID:[106902340]statusChangedSensorID:[106902340]
2015-02-27 16:13:32,227 INFO [HTTP-Thread-2]: Querying changed data from StatusCache...
2015-02-27 16:13:32,227 INFO [HTTP-Thread-2]: Have queried changed data from StatusCache.
2015-02-27 16:13:32,227 INFO [HTTP-Thread-2]: Return the polling status.
2015-02-27 16:13:32,232 INFO [HTTP-Thread-2]: Finished polling at 2015-02-27 16:13:32

2015-02-27 16:13:32,361 INFO [HTTP-Thread-2]: Querying changed state from ChangedStatus table...
2015-02-27 16:13:32,362 INFO [HTTP-Thread-2]: Found: [device => FFFFFFFFA025DD45E473402F82CA4566C0F2CFC1, sensorIDs => 106902340] in ChangedStatus table.
2015-02-27 16:13:32,362 INFO [HTTP-Thread-2]: DEVICEID:FFFFFFFFA025DD45E473402F82CA4566C0F2CFC1	sensorID:[106902340]statusChangedSensorID:[]Waiting...
2015-02-27 16:13:33,255 INFO [Polling thread for sensor: Schemerlamp ON/OFF]: received message: {
   "5MinuteHistoryDays" : 1,
   "ActTime" : 1425050013,
   "AllowWidgetOrdering" : true,
   "DashboardType" : 0,
   "Latitude" : "51.461586",
   "Longitude" : "5.611490",
   "MobileType" : 1,
   "TempScale" : 1.0,
   "TempSign" : "C",
   "WindScale" : 1.0,
   "WindSign" : "m/s",
   "dontcachehtml" : true,
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "RFXCOM",
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0E7F2BE",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2015-02-27 16:05:18",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Schemerlamp woonkamer",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 7,
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "true",
         "Type" : "Lighting 2",
         "TypeImg" : "dimmer",
         "Unit" : 3,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "9"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

2015-02-27 16:13:33,255 TRACE [Polling thread for sensor: Schemerlamp ON/OFF]: Processed {
   "5MinuteHistoryDays" : 1,
   "ActTime" : 1425050013,
   "AllowWidgetOrdering" : true,
   "DashboardType" : 0,
   "Latitude" : "51.461586",
   "Longitude" : "5.611490",
   "MobileType" : 1,
   "TempScale" : 1.0,
   "TempSign" : "C",
   "WindScale" : 1.0,
   "WindSign" : "m/s",
   "dontcachehtml" : true,
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "RFXCOM",
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0E7F2BE",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2015-02-27 16:05:18",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Schemerlamp woonkamer",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 7,
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "true",
         "Type" : "Lighting 2",
         "TypeImg" : "dimmer",
         "Unit" : 3,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "9"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
, received {
   "5MinuteHistoryDays" : 1,
   "ActTime" : 1425050013,
   "AllowWidgetOrdering" : true,
   "DashboardType" : 0,
   "Latitude" : "51.461586",
   "Longitude" : "5.611490",
   "MobileType" : 1,
   "TempScale" : 1.0,
   "TempSign" : "C",
   "WindScale" : 1.0,
   "WindSign" : "m/s",
   "dontcachehtml" : true,
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "On, Level: 100 %",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "RFXCOM",
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0E7F2BE",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2015-02-27 16:05:18",
         "Level" : 100,
         "LevelInt" : 15,
         "MaxDimLevel" : 15,
         "Name" : "Schemerlamp woonkamer",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 7,
         "Status" : "On",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "true",
         "Type" : "Lighting 2",
         "TypeImg" : "dimmer",
         "Unit" : 3,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "9"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

2015-02-27 16:13:33,256 INFO [HTTP-Thread-2]: Had waited the skipped sensor ids of statuses in DEVICEID:FFFFFFFFA025DD45E473402F82CA4566C0F2CFC1	sensorID:[106902340]statusChangedSensorID:[106902340]
2015-02-27 16:13:33,308 INFO [HTTP-Thread-2]: Querying changed data from StatusCache...
2015-02-27 16:13:33,309 INFO [HTTP-Thread-2]: Have queried changed data from StatusCache.
2015-02-27 16:13:33,309 INFO [HTTP-Thread-2]: Return the polling status.
2015-02-27 16:13:33,310 INFO [HTTP-Thread-2]: Finished polling at 2015-02-27 16:13:33

2015-02-27 16:13:33,385 INFO [HTTP-Thread-2]: Querying changed state from ChangedStatus table...
2015-02-27 16:13:33,385 INFO [HTTP-Thread-2]: Found: [device => FFFFFFFFA025DD45E473402F82CA4566C0F2CFC1, sensorIDs => 106902340] in ChangedStatus table.
2015-02-27 16:13:33,385 INFO [HTTP-Thread-2]: DEVICEID:FFFFFFFFA025DD45E473402F82CA4566C0F2CFC1	sensorID:[106902340]statusChangedSensorID:[]Waiting...

Its seems that its not reading the status right.

Posted by hipperd at Feb 27, 2015 15:18

The JSON Path is probably wrong. You will have to test with some only JSONPath parser to figure out the correct syntax.

Posted by mredeker at Feb 27, 2015 20:32

I found the first JSON occuring in the list is invalid. http://jsonlint.com/
The second occurence was OK, so I tested $.result[*].Status using http://ashphy.com/JSONPathOnlineEvaluator/
It resulted in On So if this Status is the switch status indeed, you only have to adapt your custom sensor mappings

Posted by pz1 at Feb 28, 2015 07:46

Thanks for the reply.
I've also found out that the Jsonpath was right, but how do i get the right outcom

Posted by hipperd at Feb 28, 2015 08:15

Have your tried to remove the mappings from the Custom sensor and display the result in a Label? What is the result?

Posted by pz1 at Feb 28, 2015 08:48

Sorry i'm verry new with OR.
Do you mean remove the on and off in the custom state and put that in in a label?

Posted by hipperd at Feb 28, 2015 09:22

Yes, delete the Custom state items
Next add a label to one of your screens, and specify this customsensor for this label. Make the label 150 pixels wide, so long strinds fit in it.

Posted by pz1 at Feb 28, 2015 09:31

Thanks, will try it out.

Posted by hipperd at Feb 28, 2015 10:05

So I'ved remove the custom state items. Add a label with this custom sensor. The output is the same.

Posted by hipperd at Feb 28, 2015 10:28

Assuming you did specify my suggested JSONPath

$.result[*].Status

I fear there is something wrong with the resturned JSON block.
In the http command you could add the Content-type:

application/json

but I am afraid it won't help.

Posted by pz1 at Feb 28, 2015 10:52

Thanks for the help. I will keep trying

Posted by hipperd at Feb 28, 2015 11:37
Document generated by Confluence on Jun 05, 2016 09:35