Hi everyone,
I believe a lot of you know about the API behind pimatic which you can use to access variables and their values for various reasons. Now I know how to like read the values using a GET request for a specific variable
curl -X GET --user "user:password" http://XXX.XXX.XXX.XXX/api/variables/weather.temperature
And that all works fine so far, as retrieving goes. The output you get is like
{
"variable": {
"name": "weather.temperature",
"readonly": true,
"type": "attribute",
"value": 16.2,
"unit": "°C"
},
"success": true
}
Now comes the question: I want a device to update the value of such a device using API calls. Is it possible to do so? Because it says that the attribute is readonly (it says for every device) and my returns for the PATCH curl have been as follows:
{
"success": false,
"message": "Variable name must only contain alpha numerical symbols, \"-\" and \"_\""
}
I don’t know, maybe I can only set variables that I defined myself but really I don’t get this. If anyone has an idea how to do the right patch (or if Int is the variables name) help would be very much appreciated.
Best regards,
Overflow