Szablon TapHome API to szablon PacketParser HTTP, który integruje natywne REST API TapHome Core z powrotem do TapHome. Umożliwia to komunikację Core-to-Core — urządzenia udostępnione na jednym TapHome Core mogą być odzwierciedlone jako natywne urządzenia na innym Core. Szablon komunikuje się przez HTTPS (chmura: api.taphome.com:443) lub HTTP (sieć lokalna: http://{core-ip}/api/...), wykorzystując uwierzytelnianie tokenem bearer.
Szablon udostępnia 15 unikalnych typów urządzeń po 15 instancji każdy (łącznie 225 urządzeń), obejmujących przełączniki, ściemniacze, czujniki, liczniki, rolety, oświetlenie, termostaty i inne. Każde urządzenie odczytuje i zapisuje wartości za pomocą endpointów getDeviceValue i setDeviceValue z określonymi parametrami valueTypeId.
Konfiguracja
Szablon TapHome API wymaga dwóch parametrów konfiguracyjnych:
Token API — generowany na źródłowym Core w Ustawienia > Udostępnij urządzenia > TapHome API. Token używa niestandardowego formatu bearer (Authorization: TapHome {token}). W danym momencie aktywny jest tylko jeden token — wygenerowanie nowego unieważnia poprzedni.
ID urządzenia — każda instancja szablonu jest przypisana do konkretnego ID urządzenia na źródłowym Core. Użyj endpointu discovery (/api/TapHomeApi/v1/discovery), aby wyświetlić wszystkie udostępnione urządzenia z ich ID i obsługiwanymi typami wartości.
Szablon obsługuje dwa tryby dostępu z identyczną strukturą API:
Chmura — https://api.taphome.com/api/TapHomeApi/v1/ (dostęp przez internet, działa z dowolnego miejsca)
Sieć lokalna — http://{core-ip}/api/TapHomeApi/v1/ (dostęp LAN/VPN, niższe opóźnienie, wymaga Core 2021.3+)
Dostęp przez sieć lokalną eliminuje zależność od internetu i zmniejsza opóźnienie. Przypisz źródłowemu Core statyczny IP lub rezerwację DHCP, ponieważ TapHome Core nie obsługuje wykrywania mDNS.
Możliwości urządzeń
Szablon obejmuje 15 typów urządzeń. Każdy typ używa określonych ValueType ID do odczytu i zapisu stanu urządzenia przez odpowiedź JSON API ($.values[?(@.valueTypeId == N)].value).
Przełączanie i sterowanie wyjściami
Switch — binarne włączanie/wyłączanie przez ValueType 48 (SwitchState). Odczytuje i zapisuje 1 (WŁ) lub 0 (WYŁ).
Analog Output — płynny poziom 0–100 % przez ValueType 42 (AnalogOutputValue). Używany do ściemniaczy, siłowników zaworów lub dowolnych analogowych urządzeń wyjściowych.
Multi-Value Switch — numeryczny selektor trybów z wartościami 0–9 przez ValueType 49. Mapuje się na zdefiniowane przez użytkownika stany do sterowania urządzeniami wielotrybowymi.
Czujniki i pomiary
Analog Input — ogólne wejście numeryczne przez ValueType 55 (AnalogInputValue). Tylko odczyt.
Temperature Sensor — temperatura (°C) przez ValueType 5 (RealTemperature) i wilgotność (%) przez ValueType 3. Tylko odczyt, interwał odpytywania 15 sekund.
Brightness Sensor — poziom oświetlenia otoczenia (lux) przez ValueType 2. Tylko odczyt, interwał odpytywania 15 sekund.
Wind Speed Sensor — prędkość wiatru (m/s) przez ValueType 14. Tylko odczyt, interwał odpytywania 15 sekund.
Electricity Meter — skumulowana energia (kWh) przez ValueType 59 i chwilowe zapotrzebowanie na moc (kW) przez ValueType 60. Tylko odczyt, interwał odpytywania 15 sekund.
Reed Contact — binarny stan otwarty/zamknięty przez ValueType 44. Zwraca 1 (Otwarty) lub 0 (Zamknięty). Tylko odczyt.
Oświetlenie
Dual White Light — jasność (%) przez ValueType 65 (HueBrightness) i skorelowana temperatura barwowa przez ValueType 89 (CCT).
RGB Light — pełne sterowanie kolorami HSB: odcień (0–360°) przez ValueType 40, nasycenie (0–100 %) przez ValueType 41, jasność przez ValueType 65 i CCT przez ValueType 89.
Klimatyzacja i osłony
Thermostat — odczytuje aktualną temperaturę (ValueType 5), wilgotność (ValueType 3) i steruje nastawą temperatury (ValueType 6).
Blind — poziom pozycji (%) przez ValueType 46 (BlindsLevel) i kąt nachylenia lameli przez ValueType 10 (BlindsSlope).
Slide — poziom pozycji (%) przez ValueType 46 (BlindsLevel). Współdzieli ten sam ValueType co Blind, ale bez sterowania nachyleniem.
Ogólne
Variable — uniwersalna zmienna numeryczna przez ValueType 62 (VariableState). Może reprezentować dowolną niestandardową wartość w TapHome.
Diagnostyka serwisowa
Moduł udostępnia jeden atrybut serwisowy — Devices — który wyświetla wszystkie udostępnione urządzenia z ich ID i typami, wywołując endpoint /api/TapHomeApi/v1/discovery.
Urządzenia typu czujnikowego (Brightness, Variable, Wind Speed) zawierają dodatkowy atrybut serwisowy na poziomie urządzenia — Value Types — który wyświetla wszystkie ValueType ID i nazwy dostępne dla danego urządzenia.
Dodatkowe możliwości
TapHome API udostępnia również kilka systemowych ValueTypes, których szablon obecnie nie odpytuje: Device Status (ID 7) do stanu urządzenia, Operation Mode (ID 22) i Manual Timeout (ID 23) do sterowania trybem ręcznym/automatycznym. Istnieją warianty wartości zadanej dla Analog Output (ID 67), Hue Brightness (ID 68) i Multi-Value Switch (ID 71), a także wskaźnik Blinds Is Moving (ID 66). Endpointy discovery i location dostarczają informacji diagnostycznych o Core. Powiadomienia push webhook (ograniczenie 300 ms) oferują alternatywę czasu rzeczywistego dla odpytywania. Te możliwości mogą zostać dodane w przyszłej aktualizacji szablonu.
Rozwiązywanie problemów
API zwraca 401 Unauthorized
Sprawdź, czy token jest prawidłowy i nie został ponownie wygenerowany — wygenerowanie nowego tokenu unieważnia wszystkie poprzednie tokeny
Sprawdź format nagłówka autoryzacji: Authorization: TapHome {token} (zwróć uwagę na prefiks TapHome zamiast Bearer)
Upewnij się, że token należy do właściwej lokalizacji Core
API zwraca 403 Forbidden
Żądane urządzenie nie jest udostępnione przez TapHome API. Na źródłowym Core przejdź do Ustawienia > Udostępnij urządzenia > TapHome API i sprawdź, czy urządzenie jest na liście.
Wartości z pamięci podręcznej lub nieaktualne
API ogranicza częstotliwość żądań getDeviceValue do interwałów 500 ms. Żądania szybsze niż ten interwał mogą zwracać wartości z pamięci podręcznej. Porównaj pole timestamp w odpowiedzi — identyczne znaczniki czasu wskazują na dane z pamięci podręcznej. Zwiększ interwał odpytywania do co najmniej 1 sekundy.
Żądania zapisu zwracają HTTP 503
Endpoint setDeviceValue zwraca 503 (Service Unavailable), gdy jest wywoływany częściej niż co 500 ms. Rozłóż żądania zapisu z odpowiednim opóźnieniem.
Na każdym Core jest aktywny tylko jeden token API w danym momencie. Jeśli inny system ponownie wygeneruje token (np. podczas konfiguracji Home Assistant), szablon TapHome straci dostęp. Koordynuj użycie tokenu między wszystkimi integracjami.
Dostępne urządzenia
TapHome APIModuł
Atrybuty serwisowe
Urządzenia
Zmienne niestandardowe
API_token(string)
TapHome API bearer token for authentication (generate in TapHome app under Settings → API)
TapHome API
Atrybuty serwisowe
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
Wejście analogowe (1)Wejście analogoweTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wejście analogowe (1)
Odczyt poziomu wejściowego
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
Wyjście analogowe (1)Ściemniacz
Płynny poziom wyjścia (0–100 %) dla ściemniaczy, siłowników zaworów lub analogowych urządzeń wyjściowych
numericJednostka: %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Wyjście analogowe (1)
Odczyt poziomu
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
Zapis poziomu
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
Przełącznik (1)Przełącznik
numericjson_path
Wartości / Stany: ON · OFF
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Przełącznik (1)
Odczyt stanu przełącznika
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
Licznik energii (1)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (1)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (1)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (1)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (1)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (1)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (1)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (1)
Odczyt jasności
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
Czujnik prędkości wiatru (1)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (1)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (1)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (1)
Odczyt
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
Czujnik temperatury (1)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (1)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (1)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (1)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (2)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (2)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (2)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (2)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (2)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (2)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (2)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (2)
Odczyt jasności
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
Czujnik prędkości wiatru (2)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (2)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (2)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (2)
Odczyt
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
Czujnik temperatury (2)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (2)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (2)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (2)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (3)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (3)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (3)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (3)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (3)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (3)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (3)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (3)
Odczyt jasności
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
Czujnik prędkości wiatru (3)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (3)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (3)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (3)
Odczyt
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
Czujnik temperatury (3)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (3)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (3)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (3)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (4)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (4)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (4)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (4)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (4)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (4)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (4)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (4)
Odczyt jasności
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
Czujnik prędkości wiatru (4)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (4)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (4)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (4)
Odczyt
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
Czujnik temperatury (4)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (4)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (4)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (4)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (5)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (5)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (5)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (5)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (5)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (5)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (5)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (5)
Odczyt jasności
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
Czujnik prędkości wiatru (5)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (5)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (5)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (5)
Odczyt
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
Czujnik temperatury (5)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (5)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (5)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (5)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (6)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (6)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (6)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (6)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (6)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (6)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (6)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (6)
Odczyt jasności
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
Czujnik prędkości wiatru (6)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (6)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (6)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (6)
Odczyt
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
Czujnik temperatury (6)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (6)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (6)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (6)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (7)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (7)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (7)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (7)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (7)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (7)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (7)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (7)
Odczyt jasności
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
Czujnik prędkości wiatru (7)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (7)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (7)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (7)
Odczyt
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
Czujnik temperatury (7)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (7)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (7)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (7)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (8)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (8)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (8)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (8)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (8)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (8)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (8)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (8)
Odczyt jasności
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
Czujnik prędkości wiatru (8)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (8)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (8)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (8)
Odczyt
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
Czujnik temperatury (8)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (8)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (8)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (8)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (9)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (9)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (9)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (9)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (9)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (9)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (9)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (9)
Odczyt jasności
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
Czujnik prędkości wiatru (9)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (9)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (9)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (9)
Odczyt
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
Czujnik temperatury (9)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (9)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (9)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (9)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (10)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (10)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (10)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (10)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (10)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (10)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (10)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (10)
Odczyt jasności
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
Czujnik prędkości wiatru (10)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (10)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (10)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (10)
Odczyt
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
Czujnik temperatury (10)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (10)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (10)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (10)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (11)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (11)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (11)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (11)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (11)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (11)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (11)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (11)
Odczyt jasności
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
Czujnik prędkości wiatru (11)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (11)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (11)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (11)
Odczyt
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
Czujnik temperatury (11)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (11)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (11)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (11)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (12)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (12)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (12)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (12)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (12)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (12)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (12)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (12)
Odczyt jasności
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
Czujnik prędkości wiatru (12)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (12)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (12)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (12)
Odczyt
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
Czujnik temperatury (12)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (12)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (12)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (12)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (13)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (13)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (13)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (13)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (13)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (13)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (13)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (13)
Odczyt jasności
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
Czujnik prędkości wiatru (13)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (13)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (13)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (13)
Odczyt
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
Czujnik temperatury (13)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (13)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (13)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (13)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (14)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (14)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (14)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (14)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (14)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (14)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (14)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (14)
Odczyt jasności
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
Czujnik prędkości wiatru (14)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (14)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (14)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (14)
Odczyt
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
Czujnik temperatury (14)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (14)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (14)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (14)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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
Licznik energii (15)Licznik energiiTylko do odczytu
Skumulowane zużycie energii (kWh) i chwilowe zapotrzebowanie na moc (kW)
numericJednostka: kWh / kWjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Licznik energii (15)
Odczyt całkowitego zużycia
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
Odczyt zapotrzebowania
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
Czujnik jasności (15)ZmiennaTylko do odczytu
numericJednostka: luxjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik jasności (15)
Odczyt
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
Atrybuty serwisowe
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
Zmienna (15)Zmienna
numericjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Zmienna (15)
Odczyt
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
Zapis
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
Atrybuty serwisowe
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
Oświetlenie RGB (15)Światło HSB
Pełne sterowanie kolorami HSB — odcień, nasycenie, jasność i skorelowana temperatura barwowa
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Oświetlenie RGB (15)
Odczyt jasności
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
Czujnik prędkości wiatru (15)ZmiennaTylko do odczytu
numericJednostka: m/sjson_path
Atrybuty serwisowe
Typy wartości
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik prędkości wiatru (15)
Odczyt
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
Atrybuty serwisowe
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
Kontakt reed (15)Kontakt reedTylko do odczytu
numericjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Kontakt reed (15)
Odczyt
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
Czujnik temperatury (15)Czujnik temperaturyTylko do odczytu
Odczyt temperatury (°C) i wilgotności (%)
numericJednostka: °C / %json_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Czujnik temperatury (15)
Odczyt wilgotności
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
Odczyt temperatury
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
Termostat (15)Termostat
Aktualna temperatura, wilgotność i regulowana nastawa temperatury
numericJednostka: °Cjson_path
Zmienna: Id — TapHome device ID — set to the ID of the device you want to control (find in TapHome app or via /discovery endpoint)
Termostat (15)
Odczyt temperatury
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
Odczyt wilgotności
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
Odczyt temperatury zadanej
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
Zapis temperatury zadanej
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