The TapHome API template is a PacketParser HTTP template that integrates TapHome Core’s own REST API back into TapHome. This enables Core-to-Core communication — devices exposed on one TapHome Core can be mirrored as native devices on another Core. The template communicates over HTTPS (cloud via api.taphome.com:443) or HTTP (local network via http://{core-ip}/api/...), using bearer token authentication.
The template provides 15 unique device types with 15 instances each (225 devices total), covering switches, dimmers, sensors, meters, blinds, lighting, thermostats, and more. Each device reads and writes values using the getDeviceValue and setDeviceValue endpoints with specific valueTypeId parameters.
Configuration
The TapHome API template requires two configuration parameters:
API token — generated in the source Core under Settings > Expose Devices > TapHome API. The token uses a custom bearer format (Authorization: TapHome {token}). Only one token is active at a time — generating a new token invalidates the previous one.
Device ID — each template device instance maps to a specific device ID on the source Core. Use the discovery endpoint (/api/TapHomeApi/v1/discovery) to list all exposed devices with their IDs and supported value types.
The template supports two access modes with identical API structure:
Cloud — https://api.taphome.com/api/TapHomeApi/v1/ (internet access, works from anywhere)
Local network access eliminates internet dependency and reduces latency. Assign a static IP or DHCP reservation to the source Core since TapHome Core does not support mDNS discovery.
Device capabilities
The template covers 15 device types. Each type uses specific ValueType IDs to read and write device state via the API’s JSON response ($.values[?(@.valueTypeId == N)].value).
Switching and output control
Switch — binary on/off control via ValueType 48 (SwitchState). Reads and writes 1 (ON) or 0 (OFF).
Analog Output — continuous 0–100 % level via ValueType 42 (AnalogOutputValue). Used for dimmers, valve actuators, or any analog output device.
Multi-Value Switch — numeric mode selector with values 0–9 via ValueType 49. Maps to user-defined states for multi-mode device control.
Sensors and metering
Analog Input — generic numeric input via ValueType 55 (AnalogInputValue). Read-only.
Temperature Sensor — temperature (°C) via ValueType 5 (RealTemperature) and humidity (%) via ValueType 3. Read-only, 15-second poll interval.
Electricity Meter — cumulative energy (kWh) via ValueType 59 and instantaneous demand (kW) via ValueType 60. Read-only, 15-second poll interval.
Reed Contact — binary open/closed state via ValueType 44. Returns 1 (Open) or 0 (Closed). Read-only.
Lighting
Dual White Light — brightness (%) via ValueType 65 (HueBrightness) and correlated color temperature via ValueType 89 (CCT).
RGB Light — full HSB color control: hue (0–360°) via ValueType 40, saturation (0–100 %) via ValueType 41, brightness via ValueType 65, and CCT via ValueType 89.
Climate and covers
Thermostat — reads current temperature (ValueType 5), humidity (ValueType 3), and controls the temperature setpoint (ValueType 6).
Blind — position level (%) via ValueType 46 (BlindsLevel) and tilt angle via ValueType 10 (BlindsSlope).
Slide — position level (%) via ValueType 46 (BlindsLevel). Shares the same ValueType as Blind but without slope control.
General purpose
Variable — general-purpose numeric variable via ValueType 62 (VariableState). Can represent any custom value in TapHome.
Service diagnostics
The module exposes one service attribute — Devices — which lists all exposed devices with their IDs and types by calling the /api/TapHomeApi/v1/discovery endpoint.
Sensor-type devices (Brightness, Variable, Wind Speed) include an additional per-device service attribute — Value Types — which lists all ValueType IDs and names available on that specific device.
Additional capabilities
The TapHome API also exposes several system-level ValueTypes not currently polled by the template: Device Status (ID 7) for device health, Operation Mode (ID 22) and Manual Timeout (ID 23) for manual/automatic mode control. Desired-value variants exist for Analog Output (ID 67), Hue Brightness (ID 68), and Multi-Value Switch (ID 71), as well as a Blinds Is Moving indicator (ID 66). The discovery and location endpoints provide diagnostic information about the Core. Webhook push notifications (300 ms throttle) offer a real-time alternative to polling. These capabilities can be added in a future template update.
Troubleshooting
API returns 401 Unauthorized
Verify the token is correct and has not been regenerated — generating a new token invalidates all previous tokens
Check the authorization header format: Authorization: TapHome {token} (note the TapHome prefix instead of Bearer)
Ensure the token belongs to the correct Core location
API returns 403 Forbidden
The requested device is not exposed via TapHome API. In the source Core, navigate to Settings > Expose Devices > TapHome API and verify the device is listed.
Cached or stale values
The API rate-limits getDeviceValue requests to 500 ms intervals. Requests faster than this may return cached values. Compare the timestamp field in the response — identical timestamps indicate cached data. Increase the poll interval to at least 1 second.
Write requests return HTTP 503
The setDeviceValue endpoint returns 503 (Service Unavailable) if called more frequently than every 500 ms. Space out write requests or queue them with sufficient delay.
Only one API token is active per Core at any time. If another system regenerates the token (e.g., during Home Assistant setup), the TapHome template will lose access. Coordinate token usage across all integrations.
Available devices
TapHome APIModule
Service Attributes
Devices
Custom Variables
API_token(string)
TapHome API bearer token for authentication (generate in TapHome app under Settings → API)
TapHome API
Service Attributes
Devices
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/discovery", "GET", "", "Authorization: TapHome " + API_token);
IF response.IsSuccess
var max := PARSEJSON(response.content, "$.devices[-1:].deviceId");
var ret := "";
var i := 0;
do
ret := ret + "(" + PARSEJSON(response.content, "$.devices[" + tostring(i) + "].deviceId", true) + ") ";
ret := ret + PARSEJSON(response.content, "$.devices[" + tostring(i) + "].name", true);
ret := ret + " - " + PARSEJSON(response.content, "$.devices[" + tostring(i) + "].type", true);
ret := ret + "\n";
i := i + 1;
loop while i < max
RETURN(ret);
END
Analog Input (1)Analog InputRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Analog Input (1)
Read input level
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Analog Output (1)Dimmer
Continuous output level (0-100 %) for dimmers, valve actuators, or analog output devices
numericUnit: %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Analog Output (1)
Read level
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write level
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Switch (1)Switch
numericjson_path
Values / States: ON · OFF
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Switch (1)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (1)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (1)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (1)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (1)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (1)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (1)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (1)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (1)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (1)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (1)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (1)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (1)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (1)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (1)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (1)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (1)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (2)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (2)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (2)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (2)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (2)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (2)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (2)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (2)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (2)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (2)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (2)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (2)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (2)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (2)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (2)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (2)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (3)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (3)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (3)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (3)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (3)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (3)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (3)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (3)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (3)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (3)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (3)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (3)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (3)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (3)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (3)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (3)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (4)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (4)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (4)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (4)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (4)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (4)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (4)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (4)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (4)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (4)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (4)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (4)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (4)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (4)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (4)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (4)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (5)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (5)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (5)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (5)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (5)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (5)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (5)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (5)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (5)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (5)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (5)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (5)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (5)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (5)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (5)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (5)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (6)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (6)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (6)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (6)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (6)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (6)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (6)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (6)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (6)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (6)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (6)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (6)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (6)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (6)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (6)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (6)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (7)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (7)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (7)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (7)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (7)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (7)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (7)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (7)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (7)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (7)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (7)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (7)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (7)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (7)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (7)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (7)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (8)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (8)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (8)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (8)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (8)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (8)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (8)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (8)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (8)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (8)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (8)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (8)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (8)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (8)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (8)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (8)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (9)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (9)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (9)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (9)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (9)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (9)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (9)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (9)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (9)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (9)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (9)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (9)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (9)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (9)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (9)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (9)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (10)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (10)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (10)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (10)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (10)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (10)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (10)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (10)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (10)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (10)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (10)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (10)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (10)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (10)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (10)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (10)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (11)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (11)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (11)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (11)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (11)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (11)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (11)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (11)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (11)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (11)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (11)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (11)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (11)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (11)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (11)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (11)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (12)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (12)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (12)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (12)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (12)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (12)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (12)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (12)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (12)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (12)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (12)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (12)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (12)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (12)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (12)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (12)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (13)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (13)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (13)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (13)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (13)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (13)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (13)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (13)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (13)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (13)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (13)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (13)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (13)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (13)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (13)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (13)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (14)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (14)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (14)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (14)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (14)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (14)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (14)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (14)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (14)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (14)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (14)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (14)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (14)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (14)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (14)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (14)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Cumulative energy consumption (kWh) and instantaneous power demand (kW)
numericUnit: kWh / kWjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Electricity Meter (15)
Read total consumption
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 59)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read demand
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 60)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Brightness Sensor (15)VariableRead-only
numericUnit: luxjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Brightness Sensor (15)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 2)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Variable (15)Variable
numericjson_path
Service Attributes
Value Types
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variable (15)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 62)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&value=" + Va, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
RGB Light (15)HSB Light
Full HSB color control — hue, saturation, brightness, and correlated color temperature
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
RGB Light (15)
Read brightness
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 65)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wind Speed Sensor (15)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 14)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Service Attributes
Value Types
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var ret := "";
var i := 0;
do
if ! isnull(PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true))
ret := ret + PARSEJSON(response.content, "$.values[" + i + "].valueTypeId", true);
ret := ret + " - " + PARSEJSON(response.content, "$.values[" + i + "].valueTypeName", true);
ret := ret + "\n";
end
i := i + 1;
loop while i < 10
RETURN(ret);
END
Reed Contact (15)Reed ContactRead-only
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Reed Contact (15)
Read
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 44)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Temperature Sensor (15)Temperature SensorRead-only
Temperature (°C) and humidity (%) readings
numericUnit: °C / %json_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Temperature Sensor (15)
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Thermostat (15)Thermostat
Current temperature, humidity, and adjustable temperature setpoint
numericUnit: °Cjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Thermostat (15)
Read temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 5)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read humidity
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 3)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Read desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 6)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Write desired temperature
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&value=" + Se, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END
Multi-Value Switch (15)Multi-value Switch
Numeric mode selector with values 0-9 for multi-mode device control
numericjson_path
Variable: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Multi-Value Switch (15)
Read switch state
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
IF ISNULL(value)
ADDERROR("Incorrect device type for ID " + Id);
RETURN(NaN);
ELSE
RETURN(TODOUBLE(value));
END
ELSE
ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
RETURN(NaN);
END