Update device property via Json?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
HoboCannibal
Posts: 3
Joined: Wednesday 20 April 2016 20:38
Target OS: Windows
Domoticz version:
Contact:

Update device property via Json?

Post 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
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Update device property via Json?

Post by Egregius »

If you can set it in the web interface you can also with json.
HoboCannibal
Posts: 3
Joined: Wednesday 20 April 2016 20:38
Target OS: Windows
Domoticz version:
Contact:

Re: Update device property via Json?

Post 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?
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Update device property via Json?

Post 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.
HoboCannibal
Posts: 3
Joined: Wednesday 20 April 2016 20:38
Target OS: Windows
Domoticz version:
Contact:

Re: Update device property via Json?

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest