TapHome

TapHome API

Packet Parser → HTTP
Inviato da
Ultimo aggiornamento: 03. 2026

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:

  1. 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.

  2. 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:

  • Cloudhttps://api.taphome.com/api/TapHomeApi/v1/ (accesso via internet, funziona ovunque)
  • Rete localehttp://{core-ip}/api/TapHomeApi/v1/ (accesso LAN/VPN, latenza inferiore, richiede Core 2021.3+)

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
  1. Verifica che il token sia corretto e non sia stato rigenerato — la generazione di un nuovo token invalida tutti i token precedenti
  2. Controlla il formato dell’header di autorizzazione: Authorization: TapHome {token} (nota il prefisso TapHome al posto di Bearer)
  3. 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 API Modulo
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
Ingresso analogico (1) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (1)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (1) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (1)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (1) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (1)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (1) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (1) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (1) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (1)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (1) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (1) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (1)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (1) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (1)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (2) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (2)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (2) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (2)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (2) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (2)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (2) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (2) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (2) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (2)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (2) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (2) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (2)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (2) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (2)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (3) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (3)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (3) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (3)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (3) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (3)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (3) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (3) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (3) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (3)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (3) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (3) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (3)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (3) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (3)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (4) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (4)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (4) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (4)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (4) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (4)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (4) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (4) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (4) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (4)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (4) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (4) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (4)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (4) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (4)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (5) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (5)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (5) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (5)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (5) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (5)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (5) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (5) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (5) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (5)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (5) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (5) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (5)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (5) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (5)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (6) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (6)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (6) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (6)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (6) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (6)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (6) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (6) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (6) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (6)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (6) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (6) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (6)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (6) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (6)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (7) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (7)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (7) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (7)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (7) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (7)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (7) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (7) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (7) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (7)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (7) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (7) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (7)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (7) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (7)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (8) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (8)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (8) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (8)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (8) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (8)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (8) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (8) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (8) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (8)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (8) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (8) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (8)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (8) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (8)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (9) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (9)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (9) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (9)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (9) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (9)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (9) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (9) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (9) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (9)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (9) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (9) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (9)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (9) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (9)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (10) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (10)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (10) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (10)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (10) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (10)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (10) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (10) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (10) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (10)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (10) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (10) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (10)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (10) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (10)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (11) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (11)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (11) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (11)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (11) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (11)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (11) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (11) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (11) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (11)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (11) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (11) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (11)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (11) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (11)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (12) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (12)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (12) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (12)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (12) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (12)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (12) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (12) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (12) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (12)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (12) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (12) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (12)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (12) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (12)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (13) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (13)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (13) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (13)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (13) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (13)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (13) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (13) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (13) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (13)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (13) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (13) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (13)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (13) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (13)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (14) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (14)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (14) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (14)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (14) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (14)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (14) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (14) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (14) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (14)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (14) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (14) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (14)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (14) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (14)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Ingresso analogico (15) Ingresso analogico Solo lettura
numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Ingresso analogico (15)

Lettura livello ingresso
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 55)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Uscita analogica (15) Dimmer

Livello di uscita continuo (0–100 %) per dimmer, attuatori valvola o dispositivi di uscita analogici

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Uscita analogica (15)

Lettura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 42)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura livello
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&value=" + Le, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Interruttore (15) Interruttore
numeric json_path
Valori / Stati: ON · OFF
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore (15)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 48)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Dual White Light (15) Luce bianca

Controllo della luminosità e della temperatura colore correlata (CCT) per illuminazione bianca regolabile

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Dual White Light (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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Contatore elettrico (15) Contatore elettrico Solo lettura

Consumo energetico cumulativo (kWh) e potenza istantanea (kW)

numeric Unità: kWh / kW json_path
Variabile: IdTapHome 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) Variabile Solo lettura
numeric Unità: lux json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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
numeric json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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

numeric json_path
Variabile: IdTapHome 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
Scrittura luminosità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 tonalità
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 saturazione
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura temperatura colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 colore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scorrevole (15) Cursore
numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Scorrevole (15)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Sensore velocità del vento (15) Variabile Solo lettura
numeric Unità: m/s json_path
Attributi di servizio
Tipi di valore
Variabile: IdTapHome 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 reed Solo lettura
numeric json_path
Variabile: IdTapHome 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 temperatura Solo lettura

Letture di temperatura (°C) e umidità (%)

numeric Unità: °C / % json_path
Variabile: IdTapHome 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

numeric Unità: °C json_path
Variabile: IdTapHome 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
Interruttore multivalore (15) Interruttore multivalore

Selettore di modalità numerico con valori 0–9 per controllo dispositivi multimodale

numeric json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Interruttore multivalore (15)

Lettura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Scrittura stato interruttore
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Tapparella (15) Tapparella

Livello di posizione (%) e controllo angolo di inclinazione lamelle per tapparelle e persiane

numeric Unità: % json_path
Variabile: IdTapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)

Tapparella (15)

Lettura livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 livello tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Lettura inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + 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 inclinazione tapparella
VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END
Connessione: Packet Parser → HTTP
Possibili miglioramenti (10)
  • Device Status — DeviceStatus (read-only) available on all devices via discovery but not polled by template
  • Operation Mode — OperationMode (manual/automatic) — system property visible in getDeviceValue response
  • Manual Timeout — ManualTimeout — system property visible in getDeviceValue response
  • Analog Output Desired Value — AnalogOutputDesiredValue — separate from actual AnalogOutputValue (42)
  • Hue Brightness Desired Value — HueBrightnessDesiredValue — desired vs actual brightness for lighting
  • Multi-Value Switch Desired State — MultiValueSwitchDesiredState — desired vs actual state for MVS
  • Blinds Is Moving — BlindsIsMoving — motion detection for blind/slide devices
  • Device Discovery — Full device list with supported value types — available via module SA but not per-device
  • Location Info — Core location metadata and connectivity status
  • Webhook Push Notifications — Real-time state change notifications via HTTP POST — 300ms throttle, alternative to polling

Fonti

  • TapHome API Official Documentation
    taphome.com 2026-03-28
  • TapHome HA Integration — ValueType Reference
    github.com 2026-03-28
  • TapHome HA Integration — API Client Implementation
    github.com 2026-03-28