Il template TapHome API è un template PacketParser HTTP che integra la REST API nativa di TapHome Core in TapHome. Questo permette la comunicazione Core-to-Core — i dispositivi esposti su un TapHome Core possono essere replicati come dispositivi nativi su un altro Core. Il template comunica tramite HTTPS (cloud via api.taphome.com:443) o HTTP (rete locale via http://{core-ip}/api/...), utilizzando l’autenticazione bearer token.
Il template fornisce 15 tipi di dispositivi unici con 15 istanze ciascuno (225 dispositivi totali), che coprono interruttori, dimmer, sensori, contatori, tapparelle, illuminazione, termostati e altro. Ogni dispositivo legge e scrive valori tramite gli endpoint getDeviceValue e setDeviceValue con specifici parametri valueTypeId.
Configurazione
Il template TapHome API richiede due parametri di configurazione:
Token API — generato sul Core sorgente in Impostazioni > Esponi dispositivi > TapHome API. Il token utilizza un formato bearer personalizzato (Authorization: TapHome {token}). È attivo un solo token alla volta — la generazione di un nuovo token invalida il precedente.
ID dispositivo — ogni istanza del template è mappata a un ID dispositivo specifico sul Core sorgente. Utilizza l’endpoint discovery (/api/TapHomeApi/v1/discovery) per elencare tutti i dispositivi esposti con i relativi ID e tipi di valore supportati.
Il template supporta due modalità di accesso con struttura API identica:
Cloud — https://api.taphome.com/api/TapHomeApi/v1/ (accesso via internet, funziona ovunque)
L’accesso tramite rete locale elimina la dipendenza da internet e riduce la latenza. Assegna un IP statico o una prenotazione DHCP al Core sorgente, poiché TapHome Core non supporta il discovery mDNS.
Funzionalità dei dispositivi
Il template copre 15 tipi di dispositivi. Ogni tipo utilizza specifici ValueType ID per leggere e scrivere lo stato del dispositivo tramite la risposta JSON dell’API ($.values[?(@.valueTypeId == N)].value).
Commutazione e controllo uscite
Switch — controllo binario on/off tramite ValueType 48 (SwitchState). Legge e scrive 1 (ON) o 0 (OFF).
Analog Output — livello continuo 0–100 % tramite ValueType 42 (AnalogOutputValue). Utilizzato per dimmer, attuatori valvola o qualsiasi dispositivo di uscita analogico.
Multi-Value Switch — selettore di modalità numerico con valori 0–9 tramite ValueType 49. Si mappa a stati definiti dall’utente per il controllo di dispositivi multimodale.
Sensori e misurazione
Analog Input — ingresso numerico generico tramite ValueType 55 (AnalogInputValue). Solo lettura.
Temperature Sensor — temperatura (°C) tramite ValueType 5 (RealTemperature) e umidità (%) tramite ValueType 3. Solo lettura, intervallo di polling 15 secondi.
Brightness Sensor — livello di luminosità ambientale (lux) tramite ValueType 2. Solo lettura, intervallo di polling 15 secondi.
Wind Speed Sensor — velocità del vento (m/s) tramite ValueType 14. Solo lettura, intervallo di polling 15 secondi.
Electricity Meter — energia cumulativa (kWh) tramite ValueType 59 e potenza istantanea (kW) tramite ValueType 60. Solo lettura, intervallo di polling 15 secondi.
Reed Contact — stato binario aperto/chiuso tramite ValueType 44. Restituisce 1 (Aperto) o 0 (Chiuso). Solo lettura.
Illuminazione
Dual White Light — luminosità (%) tramite ValueType 65 (HueBrightness) e temperatura colore correlata tramite ValueType 89 (CCT).
RGB Light — controllo colore HSB completo: tonalità (0–360°) tramite ValueType 40, saturazione (0–100 %) tramite ValueType 41, luminosità tramite ValueType 65 e CCT tramite ValueType 89.
Clima e oscuramento
Thermostat — legge la temperatura attuale (ValueType 5), l’umidità (ValueType 3) e controlla il setpoint di temperatura (ValueType 6).
Blind — livello di posizione (%) tramite ValueType 46 (BlindsLevel) e angolo di inclinazione lamelle tramite ValueType 10 (BlindsSlope).
Slide — livello di posizione (%) tramite ValueType 46 (BlindsLevel). Condivide lo stesso ValueType di Blind ma senza controllo dell’inclinazione.
Generale
Variable — variabile numerica generica tramite ValueType 62 (VariableState). Può rappresentare qualsiasi valore personalizzato in TapHome.
Diagnostica di servizio
Il modulo espone un attributo di servizio — Devices — che elenca tutti i dispositivi esposti con i relativi ID e tipi chiamando l’endpoint /api/TapHomeApi/v1/discovery.
I dispositivi di tipo sensore (Brightness, Variable, Wind Speed) includono un attributo di servizio aggiuntivo a livello dispositivo — Value Types — che elenca tutti i ValueType ID e nomi disponibili per quel dispositivo specifico.
Funzionalità aggiuntive
La TapHome API espone anche diversi ValueType a livello di sistema che il template attualmente non interroga: Device Status (ID 7) per lo stato del dispositivo, Operation Mode (ID 22) e Manual Timeout (ID 23) per il controllo della modalità manuale/automatica. Esistono varianti di valore desiderato per Analog Output (ID 67), Hue Brightness (ID 68) e Multi-Value Switch (ID 71), oltre a un indicatore Blinds Is Moving (ID 66). Gli endpoint discovery e location forniscono informazioni diagnostiche sul Core. Le notifiche push webhook (limitazione 300 ms) offrono un’alternativa in tempo reale al polling. Queste funzionalità possono essere aggiunte in un futuro aggiornamento del template.
Risoluzione dei problemi
L’API restituisce 401 Unauthorized
Verifica che il token sia corretto e non sia stato rigenerato — la generazione di un nuovo token invalida tutti i token precedenti
Controlla il formato dell’header di autorizzazione: Authorization: TapHome {token} (nota il prefisso TapHome al posto di Bearer)
Assicurati che il token appartenga alla corretta posizione Core
L’API restituisce 403 Forbidden
Il dispositivo richiesto non è esposto tramite TapHome API. Sul Core sorgente, vai in Impostazioni > Esponi dispositivi > TapHome API e verifica che il dispositivo sia nell’elenco.
Valori memorizzati nella cache o obsoleti
L’API limita la frequenza delle richieste getDeviceValue a intervalli di 500 ms. Le richieste più rapide possono restituire valori memorizzati nella cache. Confronta il campo timestamp nella risposta — timestamp identici indicano dati memorizzati. Aumenta l’intervallo di polling ad almeno 1 secondo.
Le richieste di scrittura restituiscono HTTP 503
L’endpoint setDeviceValue restituisce 503 (Service Unavailable) se chiamato più frequentemente di ogni 500 ms. Distanzia le richieste di scrittura con un ritardo sufficiente.
Per ogni Core è attivo un solo token API alla volta. Se un altro sistema rigenera il token (ad es. durante la configurazione di Home Assistant), il template TapHome perderà l’accesso. Coordina l’utilizzo del token tra tutte le integrazioni.
Dispositivi disponibili
TapHome APIModulo
Attributi di servizio
Dispositivi
Variabili personalizzate
API_token(string)
TapHome API bearer token for authentication (generate in TapHome app under Settings → API)
TapHome API
Attributi di servizio
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (1)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (1)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (1)
Lettura
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
Attributi di servizio
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
Variabile (1)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (1)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (1)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (1)
Lettura luminosità
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
Sensore velocità del vento (1)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (1)
Lettura
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
Attributi di servizio
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
Contatto reed (1)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (1)
Lettura
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
Sensore di temperatura (1)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (1)
Lettura umidità
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
Lettura temperatura
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
Termostato (1)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (1)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (2)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (2)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (2)
Lettura
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
Attributi di servizio
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
Variabile (2)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (2)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (2)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (2)
Lettura luminosità
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
Sensore velocità del vento (2)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (2)
Lettura
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
Attributi di servizio
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
Contatto reed (2)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (2)
Lettura
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
Sensore di temperatura (2)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (2)
Lettura umidità
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
Lettura temperatura
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
Termostato (2)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (2)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (3)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (3)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (3)
Lettura
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
Attributi di servizio
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
Variabile (3)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (3)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (3)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (3)
Lettura luminosità
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
Sensore velocità del vento (3)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (3)
Lettura
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
Attributi di servizio
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
Contatto reed (3)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (3)
Lettura
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
Sensore di temperatura (3)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (3)
Lettura umidità
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
Lettura temperatura
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
Termostato (3)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (3)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (4)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (4)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (4)
Lettura
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
Attributi di servizio
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
Variabile (4)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (4)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (4)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (4)
Lettura luminosità
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
Sensore velocità del vento (4)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (4)
Lettura
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
Attributi di servizio
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
Contatto reed (4)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (4)
Lettura
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
Sensore di temperatura (4)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (4)
Lettura umidità
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
Lettura temperatura
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
Termostato (4)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (4)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (5)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (5)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (5)
Lettura
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
Attributi di servizio
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
Variabile (5)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (5)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (5)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (5)
Lettura luminosità
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
Sensore velocità del vento (5)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (5)
Lettura
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
Attributi di servizio
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
Contatto reed (5)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (5)
Lettura
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
Sensore di temperatura (5)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (5)
Lettura umidità
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
Lettura temperatura
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
Termostato (5)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (5)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (6)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (6)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (6)
Lettura
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
Attributi di servizio
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
Variabile (6)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (6)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (6)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (6)
Lettura luminosità
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
Sensore velocità del vento (6)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (6)
Lettura
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
Attributi di servizio
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
Contatto reed (6)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (6)
Lettura
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
Sensore di temperatura (6)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (6)
Lettura umidità
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
Lettura temperatura
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
Termostato (6)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (6)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (7)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (7)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (7)
Lettura
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
Attributi di servizio
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
Variabile (7)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (7)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (7)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (7)
Lettura luminosità
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
Sensore velocità del vento (7)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (7)
Lettura
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
Attributi di servizio
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
Contatto reed (7)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (7)
Lettura
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
Sensore di temperatura (7)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (7)
Lettura umidità
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
Lettura temperatura
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
Termostato (7)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (7)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (8)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (8)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (8)
Lettura
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
Attributi di servizio
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
Variabile (8)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (8)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (8)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (8)
Lettura luminosità
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
Sensore velocità del vento (8)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (8)
Lettura
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
Attributi di servizio
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
Contatto reed (8)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (8)
Lettura
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
Sensore di temperatura (8)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (8)
Lettura umidità
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
Lettura temperatura
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
Termostato (8)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (8)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (9)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (9)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (9)
Lettura
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
Attributi di servizio
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
Variabile (9)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (9)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (9)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (9)
Lettura luminosità
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
Sensore velocità del vento (9)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (9)
Lettura
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
Attributi di servizio
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
Contatto reed (9)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (9)
Lettura
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
Sensore di temperatura (9)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (9)
Lettura umidità
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
Lettura temperatura
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
Termostato (9)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (9)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (10)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (10)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (10)
Lettura
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
Attributi di servizio
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
Variabile (10)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (10)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (10)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (10)
Lettura luminosità
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
Sensore velocità del vento (10)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (10)
Lettura
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
Attributi di servizio
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
Contatto reed (10)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (10)
Lettura
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
Sensore di temperatura (10)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (10)
Lettura umidità
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
Lettura temperatura
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
Termostato (10)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (10)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (11)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (11)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (11)
Lettura
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
Attributi di servizio
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
Variabile (11)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (11)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (11)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (11)
Lettura luminosità
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
Sensore velocità del vento (11)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (11)
Lettura
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
Attributi di servizio
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
Contatto reed (11)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (11)
Lettura
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
Sensore di temperatura (11)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (11)
Lettura umidità
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
Lettura temperatura
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
Termostato (11)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (11)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (12)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (12)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (12)
Lettura
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
Attributi di servizio
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
Variabile (12)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (12)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (12)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (12)
Lettura luminosità
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
Sensore velocità del vento (12)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (12)
Lettura
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
Attributi di servizio
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
Contatto reed (12)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (12)
Lettura
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
Sensore di temperatura (12)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (12)
Lettura umidità
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
Lettura temperatura
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
Termostato (12)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (12)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (13)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (13)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (13)
Lettura
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
Attributi di servizio
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
Variabile (13)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (13)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (13)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (13)
Lettura luminosità
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
Sensore velocità del vento (13)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (13)
Lettura
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
Attributi di servizio
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
Contatto reed (13)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (13)
Lettura
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
Sensore di temperatura (13)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (13)
Lettura umidità
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
Lettura temperatura
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
Termostato (13)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (13)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (14)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (14)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (14)
Lettura
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
Attributi di servizio
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
Variabile (14)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (14)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (14)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (14)
Lettura luminosità
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
Sensore velocità del vento (14)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (14)
Lettura
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
Attributi di servizio
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
Contatto reed (14)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (14)
Lettura
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
Sensore di temperatura (14)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (14)
Lettura umidità
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
Lettura temperatura
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
Termostato (14)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (14)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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
Consumo energetico cumulativo (kWh) e potenza istantanea (kW)
numericUnità: kWh / kWjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatore elettrico (15)
Lettura consumo totale
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
Lettura domanda
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
Sensore di luminosità (15)VariabileSolo lettura
numericUnità: luxjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di luminosità (15)
Lettura
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
Attributi di servizio
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
Variabile (15)Variabile
numericjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Variabile (15)
Lettura
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
Scrittura
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
Attributi di servizio
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
Luce RGB (15)Luce HSB
Controllo colore HSB completo — tonalità, saturazione, luminosità e temperatura colore correlata
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Luce RGB (15)
Lettura luminosità
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
Sensore velocità del vento (15)VariabileSolo lettura
numericUnità: m/sjson_path
Attributi di servizio
Tipi di valore
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore velocità del vento (15)
Lettura
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
Attributi di servizio
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
Contatto reed (15)Contatto reedSolo lettura
numericjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Contatto reed (15)
Lettura
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
Sensore di temperatura (15)Sensore di temperaturaSolo lettura
Letture di temperatura (°C) e umidità (%)
numericUnità: °C / %json_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Sensore di temperatura (15)
Lettura umidità
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
Lettura temperatura
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
Termostato (15)Termostato
Temperatura attuale, umidità e setpoint di temperatura regolabile
numericUnità: °Cjson_path
Variabile: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostato (15)
Lettura temperatura
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
Lettura umidità
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
Lettura temperatura desiderata
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
Scrittura temperatura desiderata
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