Page 1 of 1

Compatibility of API-strings

Posted: Tuesday 14 April 2020 10:50
by Toulon7559
Probably irrespective of versions and platforms.

Stumbled on this aspect while programming the transfer of a virtual device from one Domoticz to another Domoticz-instance.

If you make a JSON-call to a device which has Temperature and Humidity like

Code: Select all

http://<ip-address>:8080/json.htm?type=devices&rid=<device_number>
you get a response with HumidityStatus as text, e.g. "normal" or "wet"

If you want to update a comparable device, the string is

Code: Select all

/json.htm?type=command&param=udevice&idx=IDX&nvalue=0&svalue=TEMP;HUM;HUM_STAT

with HUM_STAT 0~3 [=normal/comfortable/dry/wet] = HumidityStatus as number

Probably for Domoticz applicable in every API/JSON-call where HumidityStatus is present.
Not difficult to solve the incompatibility by some scriptlines for translation, but would be 'nice-to-have' if HumidityStatus would be same layout in all applications = numbers.
Easy for handover.