Help with JSON please

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
stavroshamster
Posts: 6
Joined: Saturday 01 October 2016 21:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Help with JSON please

Post by stavroshamster »

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:

Code: Select all

  $.getJSON("http://192.168.1.11:8086/json.htm?type=devices&rid=9", function(req) {
			value = req.result.Data;
		});
...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!
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest