﻿<?xml version="1.0" encoding="utf-8"?>
<Templates format="2" protocolVersion="73">
  <Template revision="2.0" id="6a27723d-f821-4190-9e3e-50b1ad9bb9be">
    <SuggestedCCUParameters />
    <RevisionHistory>
      <Revision id="1.0">Initial version</Revision>
      <Revision id="2.0">Added devices</Revision>
    </RevisionHistory>
    <ImportParameters>
        <Parameter>
            <Name>${token}</Name>
            <Value>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</Value>
            <Id>token</Id>
        </Parameter>
	</ImportParameters>
    <Name>TapHome API</Name>
    <CcuModel>PacketParserCCU</CcuModel>
    <Producer></Producer>
    <Model></Model>
    <Description></Description>
    <Module>
      <Name>TapHome API</Name>
      <Id>-1</Id>
      <Model>PacketParserModuleHttp</Model>
      <DeviceProperties>
        <InternalPollInterval>5000</InternalPollInterval>
        <CustomVariables>[{"Name":"API_token","ValueTypeId":2,"NumericValue":0,"StringValue":"$[token]"}]</CustomVariables>
        <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Devices"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/discovery\u0022, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF response.IsSuccess\r\n    var max := PARSEJSON(response.content, \u0022$.devices[-1:].deviceId\u0022);\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        ret := ret \u002B \u0022(\u0022 \u002B PARSEJSON(response.content, \u0022$.devices[\u0022 \u002B tostring(i) \u002B \u0022].deviceId\u0022, true) \u002B \u0022) \u0022;\r\n        ret := ret \u002B PARSEJSON(response.content, \u0022$.devices[\u0022 \u002B tostring(i) \u002B \u0022].name\u0022, true);\r\n        ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.devices[\u0022 \u002B tostring(i) \u002B \u0022].type\u0022, true);\r\n        ret := ret \u002B \u0022\\n\u0022;\r\n        i := i \u002B 1;\r\n    loop while i \u003C max\r\n    \r\n    RETURN(ret);\r\nEND"}]</ServiceAttributesScriptsPacketParser>
        <IpAddress>api.taphome.com</IpAddress>
        <Port>443</Port>
        <UseHttps>True</UseHttps>
      </DeviceProperties>
      <Devices>
        <Device>
          <Name>${AnalogInput} (1)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (1)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (1)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (1)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (1)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (1)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (1)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (1)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (1)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (1)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (1)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (1)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (1)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (1)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (1)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":1}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (2)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (2)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (2)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (2)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (2)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (2)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (2)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (2)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (2)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (2)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (2)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (2)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (2)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (2)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (2)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":2}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (3)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (3)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (3)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (3)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (3)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (3)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (3)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (3)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (3)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (3)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (3)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (3)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (3)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (3)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (3)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":3}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (4)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (4)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (4)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (4)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (4)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (4)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (4)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (4)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (4)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (4)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (4)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (4)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (4)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (4)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (4)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":4}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (5)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (5)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (5)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (5)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (5)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (5)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (5)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (5)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (5)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (5)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (5)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (5)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (5)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (5)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (5)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":5}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (6)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (6)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (6)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (6)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (6)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (6)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (6)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (6)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (6)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (6)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (6)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (6)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (6)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (6)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (6)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":6}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (7)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (7)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (7)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (7)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (7)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (7)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (7)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (7)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (7)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (7)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (7)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (7)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (7)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (7)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (7)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":7}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (8)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (8)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (8)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (8)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (8)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (8)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (8)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (8)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (8)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (8)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (8)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (8)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (8)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (8)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (8)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":8}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (9)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (9)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (9)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (9)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (9)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (9)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (9)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (9)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (9)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (9)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (9)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (9)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (9)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (9)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (9)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":9}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (10)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (10)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (10)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (10)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (10)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (10)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (10)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (10)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (10)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (10)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (10)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (10)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (10)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (10)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (10)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":10}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (11)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (11)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (11)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (11)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (11)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (11)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (11)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (11)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (11)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (11)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (11)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (11)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (11)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (11)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (11)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":11}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (12)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (12)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (12)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (12)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (12)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (12)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (12)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (12)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (12)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (12)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (12)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (12)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (12)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (12)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (12)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":12}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (13)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (13)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (13)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (13)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (13)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (13)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (13)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (13)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (13)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (13)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (13)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (13)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (13)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (13)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (13)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":13}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (14)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (14)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (14)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (14)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (14)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (14)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (14)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (14)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (14)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (14)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (14)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (14)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (14)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (14)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (14)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":14}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
﻿        <Device>
          <Name>${AnalogInput} (15)</Name>
          <Model>PacketParserAnalogInput</Model>
          <Id>-2</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadInputLevelScriptPacketParser>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</ReadInputLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceAnalogOutput} (15)</Name>
          <Model>PacketParserDimmer</Model>
          <Id>-3</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadLevelScriptPacketParser>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</ReadLevelScriptPacketParser>
            <WriteLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=42&amp;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</WriteLevelScriptPacketParser>
            <IconId>0</IconId>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceSwitch} (15)</Name>
          <Model>PacketParserSwitch</Model>
          <Id>-4</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <NegateState>False</NegateState>
            <OnStateIconId>60</OnStateIconId>
            <OffStateIconId>61</OffStateIconId>
            <OnStateName>${general_on}</OnStateName>
            <OffStateName>${general_off}</OffStateName>
            <ReadSwitchStateScriptPacketParser>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</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=48&amp;value=" + St, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dualWhiteLight} (15)</Name>
          <Model>PacketParserWhiteLight</Model>
          <Id>-5</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceElectricityMeter} (15)</Name>
          <Model>PacketParserElectricityMeter</Model>
          <Id>-6</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTotalConsumptionScriptPacketParser>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</ReadTotalConsumptionScriptPacketParser>
            <ReadDemandScriptPacketParser>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</ReadDemandScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_brightness} (15)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-7</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"2":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:2}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceVariable} (15)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-8</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions></SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>False</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=62&amp;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</WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceRGBLight} (15)</Name>
          <Model>PacketParserHSBLight</Model>
          <Id>-9</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 40)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadHueScriptPacketParser>
            <ReadSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 41)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSaturationScriptPacketParser>
            <ReadBrightnessScriptPacketParser>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</ReadBrightnessScriptPacketParser>
            <ReadCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 89)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadCCTScriptPacketParser>
            <WriteHueScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=40&amp;value=" + Hd, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteHueScriptPacketParser>
            <WriteSaturationScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=41&amp;value=" + Sa, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSaturationScriptPacketParser>
            <WriteBrightnessScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=65&amp;value=" + Hb, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBrightnessScriptPacketParser>
            <WriteCCTScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=89&amp;value=" + Ct, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteCCTScriptPacketParser>
            <IconId>0</IconId>
            <MinColorTemperature>1700</MinColorTemperature>
            <MaxColorTemperature>6500</MaxColorTemperature>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${slide} (15)</Name>
          <Model>PacketParserSlide</Model>
          <Id>-10</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindsLevelScriptPacketParser>
            <WriteBlindsLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindsLevelScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${device_variable_windspeed} (15)</Name>
          <Model>PacketParserVariable</Model>
          <Id>-11</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <SerializedValueLogTypeConversions>{"14":"{\u0022ValueLogTypeConversionTypeId\u0022:3,\u0022SerializedValueLogTypeConversion\u0022:\u0022{\\u0022Value1OnInput\\u0022:0,\\u0022Value1OnOutput\\u0022:0,\\u0022Value2OnInput\\u0022:1,\\u0022Value2OnOutput\\u0022:1,\\u0022SourceValueLogTypes\\u0022:[62],\\u0022TargetValueLogType\\u0022:14}\u0022}"}</SerializedValueLogTypeConversions>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser>[{"AttributeDefinition":{"Name":"Value Types"},"ReadFormula":"VAR response := SENDHTTPREQUEST(\u0022/api/taphomeapi/v1/getDeviceValue/\u0022 \u002B Id, \u0022GET\u0022, \u0022\u0022, \u0022Authorization: TapHome \u0022 \u002B API_token);\r\nIF(response.IsSuccess)\r\n    var ret := \u0022\u0022;\r\n    var i := 0;\r\n    do\r\n        if ! isnull(PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true))\r\n            ret := ret \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeId\u0022, true);\r\n            ret := ret \u002B \u0022 - \u0022 \u002B PARSEJSON(response.content, \u0022$.values[\u0022 \u002B i \u002B \u0022].valueTypeName\u0022, true);\r\n            ret := ret \u002B \u0022\\n\u0022;\r\n        end\r\n        i := i \u002B 1;\r\n    loop while i \u003C 10\r\n    RETURN(ret);\r\nEND\r\n\r\n"}]</ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <IsReadOnly>True</IsReadOnly>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
            <WriteStateScriptPacketParser></WriteStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_reed_contact} (15)</Name>
          <Model>PacketParserReedContact</Model>
          <Id>-12</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <OnStateIconId>87</OnStateIconId>
            <OffStateIconId>88</OffStateIconId>
            <OnStateName>${general_open}</OnStateName>
            <OffStateName>${general_closed}</OffStateName>
            <ReadStateScriptPacketParser>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</ReadStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${temperatureSensor} (15)</Name>
          <Model>PacketParserTemperatureSensor</Model>
          <Id>-13</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>15000</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ReadTemperatureScriptPacketParser>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</ReadTemperatureScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${dashboard_deviceThermostat} (15)</Name>
          <Model>PacketParserThermostat</Model>
          <Id>-14</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <MinTemperature>10</MinTemperature>
            <MaxTemperature>30</MaxTemperature>
            <ReadCurrentTemperatureScriptPacketParser>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</ReadCurrentTemperatureScriptPacketParser>
            <ReadTemperatureSetPointScriptPacketParser>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</ReadTemperatureSetPointScriptPacketParser>
            <ReadHumidityScriptPacketParser>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</ReadHumidityScriptPacketParser>
            <WriteTemperatureSetPointScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=6&amp;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</WriteTemperatureSetPointScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${adddevice_multivalueswitch} (15)</Name>
          <Model>PacketParserMultiValueSwitch</Model>
          <Id>-15</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <Value0Index>0</Value0Index>
            <Value1Index>1</Value1Index>
            <Value2Index>2</Value2Index>
            <Value3Index>3</Value3Index>
            <Value4Index>4</Value4Index>
            <Value5Index>5</Value5Index>
            <Value6Index>6</Value6Index>
            <Value7Index>7</Value7Index>
            <Value8Index>8</Value8Index>
            <Value9Index>9</Value9Index>
            <Value0Name>0</Value0Name>
            <Value1Name>1</Value1Name>
            <Value2Name>2</Value2Name>
            <Value3Name>3</Value3Name>
            <Value4Name>4</Value4Name>
            <Value5Name>5</Value5Name>
            <Value6Name>6</Value6Name>
            <Value7Name>7</Value7Name>
            <Value8Name>8</Value8Name>
            <Value9Name>9</Value9Name>
            <Value0IconId>5</Value0IconId>
            <Value1IconId>6</Value1IconId>
            <Value2IconId>7</Value2IconId>
            <Value3IconId>8</Value3IconId>
            <Value4IconId>9</Value4IconId>
            <Value5IconId>10</Value5IconId>
            <Value6IconId>11</Value6IconId>
            <Value7IconId>12</Value7IconId>
            <Value8IconId>13</Value8IconId>
            <Value9IconId>14</Value9IconId>
            <OffStateValue>0</OffStateValue>
            <ReadSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 49)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadSwitchStateScriptPacketParser>
            <WriteSwitchStateScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=49&amp;value=" + Mu, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteSwitchStateScriptPacketParser>
          </DeviceProperties>
        </Device>
        <Device>
          <Name>${bus_module_blind} (15)</Name>
          <Model>PacketParserBlind</Model>
          <Id>-16</Id>
          <DeviceProperties>
            <DeviceType>0</DeviceType>
            <ReadScriptPacketParser></ReadScriptPacketParser>
            <InternalPollInterval>2500</InternalPollInterval>
            <CustomVariables>[{"Name":"Id","ValueTypeId":1,"NumericValue":15}]</CustomVariables>
            <ServiceAttributesScriptsPacketParser></ServiceAttributesScriptsPacketParser>
            <ServiceActionsScriptsPacketParser></ServiceActionsScriptsPacketParser>
            <ShouldDoPeriodicWrite>False</ShouldDoPeriodicWrite>
            <ReadBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 46)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindLevelScriptPacketParser>
            <ReadBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/getDeviceValue/" + Id, "GET", "", "Authorization: TapHome " + API_token);
IF(response.IsSuccess)
 var value := PARSEJSON(response.content, "$.values[?(@.valueTypeId == 10)].value", true);
 IF ISNULL(value)
 	ADDERROR("Incorrect device type for ID " + Id);
	RETURN(NaN);
 ELSE
 	RETURN(TODOUBLE(value));
 END
ELSE
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</ReadBlindSlopeScriptPacketParser>
            <WriteBlindLevelScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=46&amp;value=" + Bl, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindLevelScriptPacketParser>
            <WriteBlindSlopeScriptPacketParser>VAR response := SENDHTTPREQUEST("/api/taphomeapi/v1/setDeviceValue/" + Id + "?valueTypeId=10&amp;value=" + Bs, "GET", "", "Authorization: TapHome " + API_token);
IF(!response.IsSuccess)
 ADDERROR("Response:" + response.StatusCode + "|" + PARSEJSON(response.content, "$.title") + " - " + PARSEJSON(response.content, "$.detail"));
 RETURN(NaN);
END</WriteBlindSlopeScriptPacketParser>
            <OffsetTop>0</OffsetTop>
            <OffsetBottom>0</OffsetBottom>
            <OffsetLeft>0</OffsetLeft>
            <OffsetRight>0</OffsetRight>
            <WindowHorizontalAngle>0</WindowHorizontalAngle>
            <Type180>False</Type180>
            <CoolingAngleSunElevation0>80</CoolingAngleSunElevation0>
            <CoolingAngleSunElevation15>60</CoolingAngleSunElevation15>
            <CoolingAngleSunElevation30>40</CoolingAngleSunElevation30>
            <CoolingAngleSunElevation45>20</CoolingAngleSunElevation45>
            <CoolingAngleSunElevation60>10</CoolingAngleSunElevation60>
            <CoolingAngleSunElevation75>0</CoolingAngleSunElevation75>
            <CoolingAngleSunElevation90>0</CoolingAngleSunElevation90>
            <HeatingAngleSunElevation0>0</HeatingAngleSunElevation0>
            <HeatingAngleSunElevation15>0</HeatingAngleSunElevation15>
            <HeatingAngleSunElevation30>0</HeatingAngleSunElevation30>
            <HeatingAngleSunElevation45>0</HeatingAngleSunElevation45>
            <HeatingAngleSunElevation60>0</HeatingAngleSunElevation60>
            <HeatingAngleSunElevation75>0</HeatingAngleSunElevation75>
            <HeatingAngleSunElevation90>0</HeatingAngleSunElevation90>
            <WindowHeight>2</WindowHeight>
            <DistanceFromFloorToWindow>1</DistanceFromFloorToWindow>
          </DeviceProperties>
        </Device>
      </Devices>
    </Module>
  </Template>
</Templates>