I'm new in scripting. I want to read the set point of a thermostat. But i don't know how to get only the set point value.
Below you can find the code i already have
Code: Select all
#!/bin/bash
#--Get Domotics Device
curl 'http://127.0.0.1:8080/json.htm?type=devices&rid=181'Code: Select all
{
"ActTime" : 1491285800,
"ServerTime" : "2017-04-04 08:03:20",
"Sunrise" : "07:11",
"Sunset" : "20:18",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "17.5",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 4,
"HardwareName" : "Dummy",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"HaveTimeout" : true,
"ID" : "0014105",
"LastUpdate" : "2017-04-02 23:05:27",
"Name" : "Schakel temperatuur verwarming",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"SetPoint" : "17.5",
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "SetPoint",
"Timers" : "false",
"Type" : "Thermostat",
"TypeImg" : "override_mini",
"Unit" : 1,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "181"
}
],
"status" : "OK",
"title" : "Devices"
}Can someone help me with that?
Kind regards
Koen