Help with JSON please
Posted: Monday 31 October 2016 17:50
Hello,
I'm new to web-coding and Domoticz, but have been dabbling with editing the 'FlatZ' frontpage for my purposes. In particular I'm attempting to update the 'setpoint' on my NEST thermostat by accessing the status of this via the JSON api, and then firing back a modified (up or down by 0.5 degree) value. I've got the 'outgoing' bit to work, but am struggling to read in the setpoint value via 'getJSON'. Currently I have:
...where I want to use the 'value' to set the new temp. However, at the moment the code is not working (obviously I've done something wrong due to inexperience)!
Any advice much appreciated!
I'm new to web-coding and Domoticz, but have been dabbling with editing the 'FlatZ' frontpage for my purposes. In particular I'm attempting to update the 'setpoint' on my NEST thermostat by accessing the status of this via the JSON api, and then firing back a modified (up or down by 0.5 degree) value. I've got the 'outgoing' bit to work, but am struggling to read in the setpoint value via 'getJSON'. Currently I have:
Code: Select all
$.getJSON("http://192.168.1.11:8086/json.htm?type=devices&rid=9", function(req) {
value = req.result.Data;
});
Any advice much appreciated!