Compatibility of API-strings

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Compatibility of API-strings

Post 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.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest