This page last changed on Nov 29, 2014 by beting.

Bonjour

Francais:
J'utilise une box DOMOTICZ, avec openremote, j'arrive à allumer et éteindre une lumiére. Je n'arrive pas à avoir de status comme la température.

Name: Température
URL: http://192.168.1.2:8080/json.htm?type=devices&rid=65
Polling interval: 1s
JSONPath Expression: $.Temp

Anglais:
I use a box DOMOTICZ with OpenRemote, I can turn on and off a light. I can not have status such as temperature.

Name: Temperature
URL: http://192.168.1.2:8080/json.htm?type=devices&rid=65
Polling interval: 1s
JSONPath Expression: $ .temp

Merci

When you call this URL (http://192.168.1.2:8080/json.htm?type=devices&rid=65) in a browser, do you get back a JSON document ?

Can you see on the DOMOTICZ box calls that are made ?

Just to be sure, the polling will only happen if the command is linked to a sensor. Have you done that ? Is the sensor used by any UI elements (that should not matter but if you link it to a label you'll be able to see what's returned).

Also, any information in the OpenRemote logs ?

Posted by ebariaux at Dec 02, 2014 15:01

Thank you for your reply. Here is the return of the Internet request.
In OpenRemote, appears only the beginning and not the filter { "5MinuteHistoryDays" ....

{ "5MinuteHistoryDays" : 1, "ActTime" : 1417548152, "AllowWidgetOrdering" : true, "DashboardType" : 0, "Latitude" : "45.744175", "Longitude" : "-0.633389", "MobileType" : 0, "TempScale" : 1.0, "TempSign" : "C", "WindScale" : 3.600000143051147, "WindSign" : "km/h", "dontcachehtml" : true, "result" : [

Unknown macro: { "AddjMulti" }
], "status" : "OK", "title" : "Devices" })

Posted by beting at Dec 02, 2014 19:23

Please do include your code in {code}..{code} tags for better rendering on this forum

Posted by pz1 at Dec 02, 2014 20:29

It's ok

{ "5MinuteHistoryDays" : 1, "ActTime" : 1417556804, "AllowWidgetOrdering" : true, "DashboardType" : 0, "Latitude" : "45.744175", "Longitude" : "-0.633389", "MobileType" : 0, "TempScale" : 1.0, "TempSign" : "C", "WindScale" : 3.600000143051147, "WindSign" : "km/h", "dontcachehtml" : true, "result" : [ { "AddjMulti" : 1.0, "AddjValue" : 0.0, "BatteryLevel" : 90, "CustomImage" : 0, "Data" : "24.0 C", "Favorite" : 0, "HardwareID" : 6, "HardwareName" : "Stick 2", "HaveTimeout" : false, "ID" : "4609", "LastUpdate" : "2014-12-02 18:45:51", "Name" : "Température SALON", "Notifications" : "false", "PlanID" : "0", "Protected" : false, "ShowNotifications" : true, "SignalLevel" : 12, "SubType" : "TFA 30.3133", "Temp" : 24.0, "Timers" : "false", "Type" : "Temp", "TypeImg" : "temperature", "Unit" : 1, "Used" : 1, "XOffset" : "0", "YOffset" : "0", "idx" : "65" } ], "status" : "OK", "title" : "Devices" }
Posted by beting at Dec 02, 2014 21:47

Given the above, then expression should be

$.result[0].Temp

There are online tools to test JSON Path expression, so you can see if the problem is in OR or in your path

Posted by ebariaux at Dec 12, 2014 10:58
Document generated by Confluence on Jun 05, 2016 09:30