Just one thing that doesn't seem to work: I cannot set a setpoint through an event?

Moderators: leecollings, remb0
Code: Select all
commandArray['Thermostat Away']='On'
Code: Select all
commandArray['Thermostat Away']='Off'
Code: Select all
commandArray['Thermostat Away']='2'
Code: Select all
/json.htm?type=command¶m=thermostatstate&idx=99&state=2
Code: Select all
2017-01-22 23:53:31.946 User: user initiated a Thermostat State change command
2017-01-22 23:53:31.946 Setting Thermostat State....
Code: Select all
{
"status" : "OK",
"title" : "Set Thermostat State"
}
Code: Select all
commandArray[0]={['UpdateDevice']='ThermostatDeviceIdx|1|17.5'}
Code: Select all
#!/bin/bash
#request token
curl -s -d "grant_type=password&client_id=123456&client_secret=1234567890&[email protected]&password=anypwd&scope=read_thermostat write_thermostat" "https://api.netatmo.net/oauth2/token" >/tmp/netatmo_token
#extract token values
access=`jq -r '.access_token' /tmp/netatmo_token`
refresh=`jq -r '.refresh_token' /tmp/netatmo_token`
#use token to request data
curl -s -d "access_token=$access&device_id=xx:xx:xx:xx:xx:xx" "https://api.netatmo.net/api/getthermostatsdata" >/tmp/netatmo_data
relay=`jq -r '[.body.devices[].modules[].therm_relay_cmd] | unique | .[]' /tmp/netatmo_data`
echo "$relay"
Users browsing this forum: Google [Bot] and 1 guest