I used to set variables with Better Logic via their API but that has effectively been broken by V2.0.
I’m now trying to do the same with the build in Logic. From a webapp my wife can set the desired temperature for the living room. This is a numerical value and a flow should check if the value is higher than the measured temp and then turn on the heating when needed. But via webhook it’s not possible to put the tag value into a numerical variable, only text variables van be used, and those can’t be used in numerical comparisons.
This all means that Homey is now on the low end of the WAF scale.
Figured out how to get the Better Logic API working again. The URL and parameters have changed and you need to update the bearer token.
Get all variables using GET method:
http://<homey_ip>/api/manager/apps/app/net.i-dev.betterlogic/setting/variables
with the authorization header of course:
Authorization: Bearer -your bearer token-
Set a variable using PUT method:
http://<homey_ip>/api/manager/apps/app/net.i-dev.betterlogic/setting/changedvariables
with the authorization header:
Authorization: Bearer -your bearer token-
and the following JSON:
{“value”:{“variable”:{“name”:“variable_name”,“value”:“desired_value”,“type”:“number”,“remove”:false}}}