Page 1 of 1

Update device property via Json?

Posted: Wednesday 20 April 2016 20:46
by HoboCannibal
Is it possible to update a particular property on a device (such as a Wind Sensor's Wind Speed property) using the Json API?

I'm aware that this command will update all values for a Wind Sensor:

/json.htm?type=command&param=udevice&idx=IDX&nvalue=0&svalue=WB;WD;WS;WG;22;24

Is it possible to specify which property to update and only supply that value with the Json API?

If it is not possible, is there another means of doing this?

-Thanks in advance

Re: Update device property via Json?

Posted: Wednesday 20 April 2016 20:49
by Egregius
If you can set it in the web interface you can also with json.

Re: Update device property via Json?

Posted: Wednesday 20 April 2016 21:00
by HoboCannibal
To my knowledge I don't think the web interface provides a way to change the individual properties of a device. So does that mean there is not a way to do it with the Json API?

Re: Update device property via Json?

Posted: Wednesday 20 April 2016 23:20
by Egregius
Sorry, was reading on mobile and didn't get it correctly.
Why would you only update one property?
If it's not possible, first get the current values, replace the one you want and sent them all back.

Re: Update device property via Json?

Posted: Wednesday 20 April 2016 23:57
by HoboCannibal
I was wondering if this is possible because not all properties that are exposed through the Json API when fetching hardware/devices are related to properties that affect the display values but would still be useful to be able to dynamically change in a 3rd party app that communicates with the Domoticz web interface through its Json API. I used the Wind Sensor as a basic example of what I'm trying to achieve to get the point of my intent conveyed as best as possible.