Bloug Posté(e) le 25 novembre 2022 Signaler Posté(e) le 25 novembre 2022 (modifié) Bonjour je relève des données d'une table Json avec les variables de type : local Variable1 = jsonResponse["devices"][3]["states"][5].value pour obtenir comme l'image ci dessous la valeur "off" de "io:TargetHeatingLevelState" malheureusement/évidemment parfois la table bouge et du coup le ["states"][5].value passe en ["states"][6].value ou autres.... Est-il possible et si oui, de m'indiquer comment chercher directement la valeur de : io:TargetHeatingLevelState du deviceURL "io://0810-4343-0200/13610533#1" en lua ? par avance merci Modifié le 25 novembre 2022 par Bloug
jang Posté(e) le 25 novembre 2022 Signaler Posté(e) le 25 novembre 2022 (modifié) local function find(key,val,list) for _,e in ipairs(list) do if e[key]==val then return e end end end print(find('name','io:TargetHeatingLevelState',find('deviceURL','io://0810-4343-0200/13610533#1',jsonResponse.devices).states).value) Modifié le 25 novembre 2022 par jang 2
Bloug Posté(e) le 26 novembre 2022 Auteur Signaler Posté(e) le 26 novembre 2022 c'est une fonction de foufou ! Thank you very much @jang ! As always, it works perfectly !
Bloug Posté(e) le 26 novembre 2022 Auteur Signaler Posté(e) le 26 novembre 2022 (modifié) The problem is on the name of deviceURL which changes in the table "io://0810-4343-0200/13610533#1" "io://0810-4343-0200/13610533#2" "io://0810-4343-0200/13610533#3" etc... print(find('name','io:TargetHeatingLevelState',find('deviceURL','io://0810-4343-0200/13610533#1',jsonResponse.devices).states).value) local function find(key, val, list) for _, e in ipairs(list) do if e[key] == val then return e end end end --------------------------------------------------- local appareil = self:getVariable("Appareil") --------------------------------------------------- local appareil2 = "io://0810-4343-0200/13610533#2" local appareil3 = "io://0810-4343-0200/13610533#3" local appareil4 = "io://0810-4343-0200/13610533#4" local appareil5 = "io://0810-4343-0200/13610533#5" local appareil6 = "io://0810-4343-0200/13610533#6" --------------------------------------------------- J'ai créé des variable locales, cela fonctionne, mais du coup ma variable ' Appareil ' n'est plus pertinente.... et je dois tout écrire à la main Est il possible d'avoir des charactères "d'échappement" avec une recherche ?? , genre : print(find('name','io:TargetHeatingLevelState',find('deviceURL','io://0810-4343-0200/13610533**',jsonResponse.devices).states).value) Modifié le 29 novembre 2022 par Bloug
Bloug Posté(e) le 29 novembre 2022 Auteur Signaler Posté(e) le 29 novembre 2022 (modifié) ------------------------------------------------------------------------- -- création des nouvelles variables #1 à 10 ------------------------------------------------------------------------- -- Boucle for i = 0, 9 do local number = 1 local increm = number + i local shortname = self:getVariable("Appareil") local shortname = shortname:sub(1, -2) if increm == 1 then appareil1 = shortname .. increm elseif increm == 2 then appareil2 = shortname .. increm elseif increm == 3 then appareil3 = shortname .. increm elseif increm == 4 then appareil4 = shortname .. increm elseif increm == 5 then appareil5 = shortname .. increm elseif increm == 6 then appareil6 = shortname .. increm elseif increm == 7 then appareil7 = shortname .. increm elseif increm == 8 then appareil8 = shortname .. increm elseif increm == 9 then appareil9 = shortname .. increm elseif increm == 10 then appareil10 = shortname .. increm else print("erreur") end end bon j'ai créer un boucle pour compléter les variables locales mais j'ai toujours le même problème en fait ! ......car je suis obliger de renseigner le type d'appareil à la main ! ssSeLum = (find('name','core:LuminanceState',find('deviceURL',appareil3,jsonResponse.devices).states).value) ssSeHum = (find('name','core:RelativeHumidityState',find('deviceURL',appareil4,jsonResponse.devices).states).value) Une recherche sans le nom complet ne marche pas ( io://0810-4343-0200/13610533 ) M. @Lazer , Est-ce possible d'avoir un p'tit coup de pouce pour exécuter la fonction de jang , avec un "Find" "partiel" SANS s'occuper des #1 #2 à la fin du deviceURL : " io://0810-4343-0200/13610533**" je vais chercher du coté de string.find() les match ..... Merci ? Modifié le 30 novembre 2022 par Bloug
jang Posté(e) le 30 novembre 2022 Signaler Posté(e) le 30 novembre 2022 Le 26/11/2022 à 08:09, Bloug a dit : The problem is on the name of deviceURL which changes in the table "io://0810-4343-0200/13610533#1" "io://0810-4343-0200/13610533#2" "io://0810-4343-0200/13610533#3" etc... print(find('name','io:TargetHeatingLevelState',find('deviceURL','io://0810-4343-0200/13610533#1',jsonResponse.devices).states).value) local function find(key, val, list) for _, e in ipairs(list) do if e[key] == val then return e end end end --------------------------------------------------- local appareil = self:getVariable("Appareil") --------------------------------------------------- local appareil2 = "io://0810-4343-0200/13610533#2" local appareil3 = "io://0810-4343-0200/13610533#3" local appareil4 = "io://0810-4343-0200/13610533#4" local appareil5 = "io://0810-4343-0200/13610533#5" local appareil6 = "io://0810-4343-0200/13610533#6" --------------------------------------------------- J'ai créé des variable locales, cela fonctionne, mais du coup ma variable ' Appareil ' n'est plus pertinente.... et je dois tout écrire à la main Est il possible d'avoir des charactères "d'échappement" avec une recherche ?? , genre : print(find('name','io:TargetHeatingLevelState',find('deviceURL','io://0810-4343-0200/13610533**',jsonResponse.devices).states).value) local function find(key,val,list) for _,e in ipairs(list) do if tostring(e[key]):match( then return e end end end print(find('name','io:TargetHeatingLevelState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) You need to quote '-' in the val string ex. '%-' Also, you match any character is with '.' dot, so '..' will match "#1" Is this what you need? 1
Bloug Posté(e) le 1 décembre 2022 Auteur Signaler Posté(e) le 1 décembre 2022 Merci beaucoup pour votre temps @jang ! Unfortunately I have a ... partial error . [ERROR] [QUICKAPP607]: QuickApp crashed [ERROR] [QUICKAPP607]: main.lua:322: attempt to index a nil value Your code works with a search where the "deviceURL" ends with #1 , but causes an error when the search falls on a "deviceURL" different from #1 maybe I made a mistake while modifying/completing your code ??? with : match(val) ? Am I missing something after match:(val, ....) a pattern ? a prayer ? local function find(key,val,list) for _,e in ipairs(list) do if tostring(e[key]):match(val) then return e end end end ssConsi = (find('name','core:ComfortRoomTemperatureState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) -- #1 OK ssMode = (find('name','core:OperatingModeState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) -- #1 OK ssBoreT = (find('name','core:BoostModeDurationState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) -- #1 OK ssSeLum = (find('name','core:LuminanceState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) -- #3 Fail ssSeHum = (find('name','core:RelativeHumidityState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) -- #4 Fail ssSeCon = (find('name','core:ElectricEnergyConsumptionState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) -- #6 Fail Here my Json , maybe I forgot to mention something ? {"creationTime":1528367801000,"lastUpdateTime":1528367801000,"id":"SETUP-0810-4343-0200","location":{"creationTime":1528367801000,"lastUpdateTime":1633366299000,"city":"","country":"France","postalCode":"30000","addressLine1":"NIMES","timezone":"Europe/Paris","longitude":7.343,"latitude":8.877,"twilightMode":2,"twilightAngle":"CIVIL","twilightCity":"paris","summerSolsticeDuskMinutes":1290,"winterSolsticeDuskMinutes":990,"twilightOffsetEnabled":false,"dawnOffset":0,"duskOffset":0,"countryCode":"FR"},"gateways":[{"gatewayId":"0810-4343-0200","type":32,"subType":0,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","alive":true,"timeReliable":true,"connectivity":{"status":"OK","protocolVersion":"2022.1.4"},"upToDate":true,"updateStatus":"UP_TO_DATE","syncInProgress":true,"mode":"ACTIVE","functions":"INTERNET_AUTHORIZATION,SCENARIO_DOWNLOAD,SCENARIO_AUTO_LAUNCHING,SCENARIO_TELECO_LAUNCHING,INTERNET_UPLOAD,INTERNET_UPDATE,TRIGGERS_SENSORS"}],"devices":[{"creationTime":1528367801000,"lastUpdateTime":1528367801000,"label":"Box","deviceURL":"internal://0810-4343-0200/pod/0","shortcut":false,"controllableName":"internal:PodMiniComponent","definition":{"commands":[{"commandName":"getName","nparams":0},{"commandName":"update","nparams":0},{"commandName":"setCountryCode","nparams":1},{"commandName":"activateCalendar","nparams":0},{"commandName":"deactivateCalendar","nparams":0},{"commandName":"refreshPodMode","nparams":0},{"commandName":"refreshUpdateStatus","nparams":0},{"commandName":"setCalendar","nparams":1},{"commandName":"setLightingLedPodMode","nparams":1},{"commandName":"setPodLedOff","nparams":0},{"commandName":"setPodLedOn","nparams":0}],"states":[{"type":"DiscreteState","values":["offline","online"],"qualifiedName":"core:ConnectivityState"},{"type":"DataState","qualifiedName":"core:CountryCodeState"},{"type":"DataState","qualifiedName":"core:LocalIPv4AddressState"},{"type":"DataState","qualifiedName":"core:NameState"},{"type":"DiscreteState","values":["doublePress","longPress","simplePress","triplePress","veryLongPress"],"qualifiedName":"internal:LastActionConfigButtonState"},{"type":"ContinuousState","qualifiedName":"internal:LightingLedPodModeState"}],"dataProperties":[],"widgetName":"Pod","uiProfiles":["UpdatableComponent"],"uiClass":"Pod","qualifiedName":"internal:PodMiniComponent","type":"ACTUATOR"},"states":[{"name":"core:NameState","type":3,"value":"Box"},{"name":"internal:LightingLedPodModeState","type":2,"value":1.0},{"name":"core:CountryCodeState","type":3,"value":"FR"},{"name":"core:LocalIPv4AddressState","type":3,"value":"192.168.1.15"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"Pod","type":1,"oid":"10c95dcc-bde0-4d37-bfea-e46c4e34ed48","uiClass":"Pod"},{"creationTime":1601387165000,"lastUpdateTime":1601387165000,"label":"IO (10662703)","deviceURL":"io://0810-4343-0200/10662703","shortcut":false,"controllableName":"io:StackComponent","definition":{"commands":[{"commandName":"advancedSomfyDiscover","nparams":1},{"commandName":"discover1WayController","nparams":2},{"commandName":"discoverActuators","nparams":1},{"commandName":"discoverSensors","nparams":1},{"commandName":"discoverSomfyUnsetActuators","nparams":0},{"commandName":"joinNetwork","nparams":0},{"commandName":"resetNetworkSecurity","nparams":0},{"commandName":"shareNetwork","nparams":0}],"states":[],"dataProperties":[],"widgetName":"IOStack","uiProfiles":["Specific"],"uiClass":"ProtocolGateway","qualifiedName":"io:StackComponent","type":"PROTOCOL_GATEWAY"},"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"IOStack","type":5,"oid":"6925ee2e-d058-4bab-b81e-6cfd74ab7617","uiClass":"ProtocolGateway"},{"creationTime":1600352184000,"lastUpdateTime":1600352184000,"label":"I2G_Actuator","deviceURL":"io://0810-4343-0200/13610533#1","shortcut":false,"controllableName":"io:AtlanticElectricalTowelDryerIOComponent","definition":{"commands":[{"commandName":"advancedRefresh","nparams":1},{"commandName":"cancelHeatingLevel","nparams":1},{"commandName":"delayedStopIdentify","nparams":1},{"commandName":"getName","nparams":0},{"commandName":"identify","nparams":0},{"commandName":"off","nparams":0},{"commandName":"refreshComfortTemperature","nparams":0},{"commandName":"refreshDateTime","nparams":0},{"commandName":"refreshDerogatedTargetTemperature","nparams":0},{"commandName":"refreshEcoTemperature","nparams":0},{"commandName":"refreshHeatingLevel","nparams":0},{"commandName":"refreshManufacturerName","nparams":0},{"commandName":"refreshMaximumHeatingTargetTemperature","nparams":0},{"commandName":"refreshMaximumTargetTemperature","nparams":0},{"commandName":"refreshOperatingMode","nparams":0},{"commandName":"refreshTargetTemperature","nparams":0},{"commandName":"refreshTemperature","nparams":0},{"commandName":"setComfortTemperature","nparams":1},{"commandName":"setDateTime","nparams":1},{"commandName":"setDerogatedTargetTemperature","nparams":1},{"commandName":"setEcoTemperature","nparams":1},{"commandName":"setHeatingLevel","nparams":1},{"commandName":"setHeatingLevelWithTimer","nparams":2},{"commandName":"setName","nparams":1},{"commandName":"setPreviousTargetTemperature","nparams":1},{"commandName":"setSchedulingType","nparams":1},{"commandName":"setTargetTemperature","nparams":1},{"commandName":"startIdentify","nparams":0},{"commandName":"stopIdentify","nparams":0},{"commandName":"wink","nparams":1},{"commandName":"pairOneWayController","nparams":2},{"commandName":"refreshAutoProgram","nparams":0},{"commandName":"refreshBoostModeDuration","nparams":0},{"commandName":"refreshBoostModeParameters","nparams":0},{"commandName":"refreshControllerAddress","nparams":0},{"commandName":"refreshCumulatedLowering","nparams":0},{"commandName":"refreshCurrentWorkingRate","nparams":0},{"commandName":"refreshDeletionCancelation","nparams":0},{"commandName":"refreshDryingDuration","nparams":0},{"commandName":"refreshDryingParameters","nparams":0},{"commandName":"refreshEffectiveTemperatureSetpoint","nparams":0},{"commandName":"refreshLocalLeadTime","nparams":0},{"commandName":"refreshModel","nparams":0},{"commandName":"refreshOccupancy","nparams":0},{"commandName":"refreshPeakNotice","nparams":0},{"commandName":"refreshPeakWarning","nparams":0},{"commandName":"refreshPowerAndTension","nparams":0},{"commandName":"refreshRoomDeletionThreshold","nparams":0},{"commandName":"refreshSSVError6","nparams":0},{"commandName":"refreshSetpointLoweringTemperatureInProgMode","nparams":0},{"commandName":"refreshSynchronisationRequest","nparams":0},{"commandName":"refreshTemperatureProbeCalibrationOffset","nparams":0},{"commandName":"refreshTowelDryerTemporaryState","nparams":0},{"commandName":"refreshTowelDryerTimeProgram","nparams":0},{"commandName":"setCommunicationTest","nparams":1},{"commandName":"setDeletionCancelation","nparams":1},{"commandName":"setDryingDuration","nparams":1},{"commandName":"setExpectedPresence","nparams":1},{"commandName":"setPeakNotice","nparams":1},{"commandName":"setPeakWarning","nparams":1},{"commandName":"setRoomDeletionThreshold","nparams":1},{"commandName":"setSetpointLoweringTemperatureInProgMode","nparams":1},{"commandName":"setTemperatureProbeCalibrationOffset","nparams":1},{"commandName":"setTowelDryerBoostModeDuration","nparams":1},{"commandName":"setTowelDryerOperatingMode","nparams":1},{"commandName":"setTowelDryerTemporaryState","nparams":1},{"commandName":"setTowelDryerTimeProgram","nparams":1},{"commandName":"unpairAllOneWayControllers","nparams":0},{"commandName":"unpairOneWayController","nparams":2}],"states":[{"type":"ContinuousState","qualifiedName":"core:BoostModeDurationState"},{"type":"ContinuousState","qualifiedName":"core:ComfortRoomTemperatureState"},{"type":"DataState","qualifiedName":"core:DateTimeState"},{"type":"ContinuousState","qualifiedName":"core:DerogatedTargetTemperatureState"},{"type":"DiscreteState","values":["good","low","normal","verylow"],"qualifiedName":"core:DiscreteRSSILevelState"},{"type":"ContinuousState","qualifiedName":"core:EcoRoomTemperatureState"},{"type":"ContinuousState","qualifiedName":"core:FilterFanCloggingErrorState"},{"type":"DataState","qualifiedName":"core:IdentifierState"},{"type":"DataState","qualifiedName":"core:ManufacturerNameState"},{"type":"ContinuousState","qualifiedName":"core:MaximumHeatingTargetTemperatureState"},{"type":"ContinuousState","qualifiedName":"core:MaximumTargetTemperatureState"},{"type":"DataState","qualifiedName":"core:NameState"},{"eventBased":true,"type":"DiscreteState","values":["noPersonInside","personInside"],"qualifiedName":"core:OccupancyState"},{"type":"DiscreteState","values":["off","on"],"qualifiedName":"core:OnOffState"},{"type":"DiscreteState","values":["antifreeze","auto","away","eco","frostprotection","manual","max","normal","off","on","prog","program","boost"],"qualifiedName":"core:OperatingModeState"},{"type":"ContinuousState","qualifiedName":"core:PreviousTargetTemperatureState"},{"type":"ContinuousState","qualifiedName":"core:PriorityLockTimerState"},{"type":"ContinuousState","qualifiedName":"core:RSSILevelState"},{"type":"DiscreteState","values":["increase","none","standby"],"qualifiedName":"core:RegulationModeState"},{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"},{"type":"ContinuousState","qualifiedName":"core:TargetTemperatureState"},{"type":"DataState","qualifiedName":"core:TimeProgramState"},{"type":"ContinuousState","qualifiedName":"core:VersionState"},{"type":"DataState","qualifiedName":"io:AutoProgramState"},{"type":"DataState","qualifiedName":"io:BoostDurationMaxState"},{"type":"DataState","qualifiedName":"io:BoostDurationUserParameterState"},{"type":"DataState","qualifiedName":"io:ControllerAddressState"},{"type":"ContinuousState","qualifiedName":"io:CumulatedLoweringState"},{"type":"ContinuousState","qualifiedName":"io:CurrentWorkingRateState"},{"type":"DiscreteState","values":["deletion cancelation","no deletion cancelation"],"qualifiedName":"io:DeletionCancelationState"},{"type":"DataState","qualifiedName":"io:DryingDurationMaxState"},{"type":"ContinuousState","qualifiedName":"io:DryingDurationState"},{"type":"DataState","qualifiedName":"io:DryingDurationUserParameterState"},{"type":"ContinuousState","qualifiedName":"io:EffectiveTemperatureSetpointState"},{"type":"ContinuousState","qualifiedName":"io:ExpectedPresenceState"},{"type":"DiscreteState","values":["external","internal"],"qualifiedName":"io:InternalExternalSchedulingTypeState"},{"type":"ContinuousState","qualifiedName":"io:LocalLeadTimeState"},{"type":"DiscreteState","values":["boost","comfort","comfort-1","comfort-2","eco","frostprotection","off","secured"],"qualifiedName":"io:MaximumHeatingLevelState"},{"type":"DataState","qualifiedName":"io:ModelState"},{"type":"DiscreteState","values":["long peak","no peak","short peak"],"qualifiedName":"io:PeakNoticeState"},{"type":"DiscreteState","values":["long peak warning","no warning","short peak warning"],"qualifiedName":"io:PeakWarningState"},{"type":"DataState","qualifiedName":"io:PowerState"},{"type":"DiscreteState","values":["comfortLevel1","comfortLevel2","comfortLevel3","comfortLevel4","environmentProtection","humanProtection","userLevel1","userLevel2"],"qualifiedName":"io:PriorityLockLevelState"},{"type":"DiscreteState","values":["LSC","SAAC","SFC","UPS","externalGateway","localUser","myself","rain","security","temperature","timer","user","wind"],"qualifiedName":"io:PriorityLockOriginatorState"},{"type":"DataState","qualifiedName":"io:RoomDeletionThresholdState"},{"type":"DiscreteState","values":["kept","lost"],"qualifiedName":"io:RunningState"},{"type":"ContinuousState","qualifiedName":"io:SetpointLoweringTemperatureInProgModeState"},{"type":"DiscreteState","values":["boost","comfort","comfort-1","comfort-2","eco","frostprotection","off","secured"],"qualifiedName":"io:TargetHeatingLevelState"},{"type":"ContinuousState","qualifiedName":"io:TemperatureProbeCalibrationOffsetState"},{"type":"DataState","qualifiedName":"io:TensionState"},{"type":"ContinuousState","qualifiedName":"io:TimerForTransitoryStateState"},{"type":"DiscreteState","values":["boost","drying","permanentHeating"],"qualifiedName":"io:TowelDryerTemporaryStateState"},{"type":"ContinuousState","qualifiedName":"io:UptimeState"}],"dataProperties":[{"value":"500","qualifiedName":"core:identifyInterval"}],"widgetName":"AtlanticElectricalTowelDryer","uiProfiles":["HeatingLevel","StatefulThermostat","Thermostat","OccupancyDetector"],"uiClass":"HeatingSystem","uiClassifiers":["emitter"],"qualifiedName":"io:AtlanticElectricalTowelDryerIOComponent","type":"ACTUATOR"},"states":[{"name":"core:NameState","type":3,"value":"I2G_Actuator"},{"name":"core:VersionState","type":3,"value":"2d202020ffffff210002"},{"name":"core:PriorityLockTimerState","type":1,"value":0},{"name":"core:OnOffState","type":3,"value":"on"},{"name":"io:TargetHeatingLevelState","type":3,"value":"comfort"},{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:DiscreteRSSILevelState","type":3,"value":"low"},{"name":"core:RSSILevelState","type":2,"value":36.0},{"name":"core:IdentifierState","type":3,"value":"00000000"},{"name":"io:MaximumHeatingLevelState","type":3,"value":"unknown"},{"name":"io:TimerForTransitoryStateState","type":1,"value":0},{"name":"core:ComfortRoomTemperatureState","type":1,"value":17},{"name":"core:EcoRoomTemperatureState","type":2,"value":2.5},{"name":"io:SetpointLoweringTemperatureInProgModeState","type":2,"value":2.5},{"name":"core:DateTimeState","type":11,"value":{"month":12,"hour":11,"year":2022,"weekday":3,"day":1,"minute":48,"second":50}},{"name":"io:LocalLeadTimeState","type":1,"value":3268},{"name":"core:RegulationModeState","type":3,"value":"none"},{"name":"core:ManufacturerNameState","type":3,"value":"Thermor"},{"name":"io:ModelState","type":3,"value":"Symphonik Gauche"},{"name":"io:PowerState","type":1,"value":1750},{"name":"io:TensionState","type":1,"value":235},{"name":"core:DerogatedTargetTemperatureState","type":2,"value":0.0},{"name":"io:TemperatureProbeCalibrationOffsetState","type":2,"value":0.0},{"name":"io:CurrentWorkingRateState","type":2,"value":0.0},{"name":"io:CumulatedLoweringState","type":2,"value":18.0},{"name":"io:ControllerAddressState","type":1,"value":13610532},{"name":"core:OperatingModeState","type":3,"value":"external"},{"name":"io:EffectiveTemperatureSetpointState","type":2,"value":17.0},{"name":"core:TargetTemperatureState","type":2,"value":17.0},{"name":"core:BoostModeDurationState","type":1,"value":0},{"name":"io:BoostDurationUserParameterState","type":1,"value":30},{"name":"io:BoostDurationMaxState","type":1,"value":60},{"name":"io:DryingDurationState","type":1,"value":0},{"name":"io:DryingDurationUserParameterState","type":1,"value":60},{"name":"io:DryingDurationMaxState","type":1,"value":120},{"name":"io:TowelDryerTemporaryStateState","type":3,"value":"permanentHeating"},{"name":"core:OccupancyState","type":1,"value":0},{"name":"core:FilterFanCloggingErrorState","type":2,"value":12.0},{"name":"io:AutoProgramState","type":11,"value":{"sunday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_NIV2","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_2","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_1","CONF_1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV2","CONF_NIV2","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV2","CONF_1","CONF_NIV2","CONF_3_NIV2","CONF_2","CONF_2","CONF_NIV1","CONF_NIV3","CONF_3_NIV2","CONF_2","CONF_NIV1","CONF_NIV2","CONF_NIV3","CONF_2","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1"],"saturday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_NIV3","CONF_2","CONF_1","CONF_3_NIV2","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_NIV3","CONF_NIV3","CONF_2","CONF_2","CONF_2","CONF_2","CONF_1","CONF_1","CONF_1","CONF_2","CONF_2","CONF_3_NIV1","CONF_2","CONF_NIV2","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV2","CONF_NIV1","CONF_1","CONF_NIV1","CONF_1","CONF_2","CONF_3_NIV2","CONF_3_NIV1","CONF_2","CONF_3_NIV2","CONF_2","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1"],"tuesday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_2","CONF_NIV2","CONF_NIV3","CONF_NIV3","CONF_NIV2","CONF_1","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_NIV1","CONF_1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV2","CONF_NIV3","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV2","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1"],"wednesday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_2","CONF_NIV3","CONF_NIV2","CONF_NIV1","CONF_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_1","CONF_1","CONF_2","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV2","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_NIV2","CONF_NIV3","CONF_NIV2","CONF_NIV2","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV1"],"thursday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV3","CONF_NIV2","CONF_NIV2","CONF_2","CONF_3_NIV1","CONF_1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV2","CONF_2","CONF_3_NIV1","CONF_1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_1","CONF_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_2","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_3_NIV1","CONF_3_NIV2","CONF_2","CONF_1","CONF_1","CONF_3_NIV2","CONF_NIV2","CONF_1","CONF_1","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV2","CONF_1","CONF_1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV1","CONF_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1"],"friday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV1","CONF_NIV3","CONF_NIV3","CONF_NIV1","CONF_NIV2","CONF_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_2","CONF_2","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV2","CONF_3_NIV1","CONF_2","CONF_NIV3","CONF_NIV3","CONF_NIV2","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1"],"anticipTime":3268,"anticipNb":20,"monday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV3","CONF_NIV3","CONF_NIV2","CONF_NIV1","CONF_NIV3","CONF_1","CONF_NIV3","CONF_NIV2","CONF_1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV1","CONF_1","CONF_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV2","CONF_NIV2","CONF_NIV2","CONF_2","CONF_1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_1","CONF_2","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1"]}},{"name":"core:TimeProgramState","type":10,"value":[{"monday":[{"start":"04:45","end":"05:45"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]},{"tuesday":[{"start":"04:45","end":"05:45"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]},{"wednesday":[{"start":"04:45","end":"05:45"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]},{"thursday":[{"start":"04:45","end":"05:45"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]},{"friday":[{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]},{"saturday":[{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]},{"sunday":[{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]}]}],"attributes":[{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"},{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"AtlanticElectricalTowelDryer","type":1,"oid":"5af5e544-8105-481f-9cb5-669341e07ebd","uiClass":"HeatingSystem"},{"creationTime":1600352184000,"lastUpdateTime":1600352184000,"label":"IO (13610533#2)","deviceURL":"io://0810-4343-0200/13610533#2","shortcut":false,"controllableName":"io:OccupancyIOSystemDeviceSensor","definition":{"commands":[],"states":[{"eventBased":true,"type":"DiscreteState","values":["noPersonInside","personInside"],"qualifiedName":"core:OccupancyState"},{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"}],"dataProperties":[],"widgetName":"OccupancySensor","uiProfiles":["OccupancyDetector"],"uiClass":"OccupancySensor","qualifiedName":"io:OccupancyIOSystemDeviceSensor","type":"SENSOR"},"states":[{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:OccupancyState","type":3,"value":"noPersonInside"}],"attributes":[{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"},{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"},{"name":"core:PowerSourceType","type":3,"value":"mainSupply"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"OccupancySensor","type":2,"oid":"d429c9e6-3321-467c-9567-cf3af89a25bf","uiClass":"OccupancySensor"},{"creationTime":1600352184000,"lastUpdateTime":1600352184000,"label":"IO (13610533#3)","deviceURL":"io://0810-4343-0200/13610533#3","shortcut":false,"controllableName":"io:LightIOSystemDeviceSensor","definition":{"commands":[],"states":[{"type":"ContinuousState","qualifiedName":"core:LuminanceState"},{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"}],"dataProperties":[],"widgetName":"LuminanceSensor","uiProfiles":["Luminance"],"uiClass":"LightSensor","qualifiedName":"io:LightIOSystemDeviceSensor","type":"SENSOR"},"states":[{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:LuminanceState","type":1,"value":4}],"attributes":[{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"},{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"},{"name":"core:MeasuredValueType","type":3,"value":"core:LuminanceInLux"},{"name":"core:PowerSourceType","type":3,"value":"mainSupply"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"LuminanceSensor","type":2,"oid":"75cb59ee-c894-4637-89e1-0b82ca5161a4","uiClass":"LightSensor"},{"creationTime":1600352184000,"lastUpdateTime":1600352184000,"label":"IO (13610533#4)","deviceURL":"io://0810-4343-0200/13610533#4","shortcut":false,"controllableName":"io:RelativeHumidityIOSystemDeviceSensor","definition":{"commands":[],"states":[{"type":"ContinuousState","qualifiedName":"core:RelativeHumidityState"},{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"}],"dataProperties":[],"widgetName":"RelativeHumiditySensor","uiProfiles":["RelativeHumidity"],"uiClass":"HumiditySensor","qualifiedName":"io:RelativeHumidityIOSystemDeviceSensor","type":"SENSOR"},"states":[{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:RelativeHumidityState","type":2,"value":44.0}],"attributes":[{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"},{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"},{"name":"core:PowerSourceType","type":3,"value":"mainSupply"},{"name":"core:MeasuredValueType","type":3,"value":"core:RelativeValueInPercentage"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"RelativeHumiditySensor","type":2,"oid":"a960afd8-3773-4ef2-9587-4b18ce936196","uiClass":"HumiditySensor"},{"creationTime":1600352184000,"lastUpdateTime":1600352184000,"label":"IO (13610533#5)","deviceURL":"io://0810-4343-0200/13610533#5","shortcut":false,"controllableName":"io:TemperatureInCelciusIOSystemDeviceSensor","definition":{"commands":[],"states":[{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"},{"type":"ContinuousState","qualifiedName":"core:TemperatureState"}],"dataProperties":[],"widgetName":"TemperatureSensor","uiProfiles":["Temperature"],"uiClass":"TemperatureSensor","qualifiedName":"io:TemperatureInCelciusIOSystemDeviceSensor","type":"SENSOR"},"states":[{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:TemperatureState","type":2,"value":23.5}],"attributes":[{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"},{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"},{"name":"core:MeasuredValueType","type":3,"value":"core:TemperatureInCelcius"},{"name":"core:PowerSourceType","type":3,"value":"mainSupply"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"TemperatureSensor","type":2,"oid":"6dbb6b32-ae62-434f-af17-24a42e978d6e","uiClass":"TemperatureSensor"},{"creationTime":1600352184000,"lastUpdateTime":1600352184000,"label":"IO (13610533#6)","deviceURL":"io://0810-4343-0200/13610533#6","shortcut":false,"controllableName":"io:CumulatedElectricalEnergyConsumptionIOSystemDeviceSensor","definition":{"commands":[],"states":[{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff0State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff1State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff2State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff3State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff4State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff5State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff6State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff7State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff8State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff9State"},{"type":"ContinuousState","qualifiedName":"core:ElectricEnergyConsumptionState"},{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"}],"dataProperties":[],"widgetName":"CumulativeElectricPowerConsumptionSensor","uiProfiles":["ElectricEnergyConsumption"],"uiClass":"ElectricitySensor","qualifiedName":"io:CumulatedElectricalEnergyConsumptionIOSystemDeviceSensor","type":"SENSOR"},"states":[{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:ElectricEnergyConsumptionState","type":1,"value":1011000}],"attributes":[{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"},{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"},{"name":"core:PowerSourceType","type":3,"value":"mainSupply"},{"name":"core:MeasuredValueType","type":3,"value":"core:ElectricalEnergyInWh"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"CumulativeElectricPowerConsumptionSensor","type":2,"oid":"d729a76c-3745-4c34-a42e-2cc95dda54af","uiClass":"ElectricitySensor"},{"creationTime":1600352184000,"lastUpdateTime":1600352184000,"label":"IO (13610533#7)","deviceURL":"io://0810-4343-0200/13610533#7","shortcut":false,"controllableName":"io:TemperatureInCelciusIOSystemDeviceSensor","definition":{"commands":[],"states":[{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"},{"type":"ContinuousState","qualifiedName":"core:TemperatureState"}],"dataProperties":[],"widgetName":"TemperatureSensor","uiProfiles":["Temperature"],"uiClass":"TemperatureSensor","qualifiedName":"io:TemperatureInCelciusIOSystemDeviceSensor","type":"SENSOR"},"states":[{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:TemperatureState","type":2,"value":20.5}],"attributes":[{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"},{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"},{"name":"core:MeasuredValueType","type":3,"value":"core:TemperatureInCelcius"},{"name":"core:PowerSourceType","type":3,"value":"mainSupply"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"TemperatureSensor","type":2,"oid":"933e5ae2-9cdf-4c84-bf44-8dd2c2780141","uiClass":"TemperatureSensor"},{"creationTime":1528368069000,"lastUpdateTime":1528368069000,"label":"I2G_Actuator","deviceURL":"io://0810-4343-0200/5668249#1","shortcut":false,"controllableName":"io:AtlanticElectricalTowelDryerIOComponent","definition":{"commands":[{"commandName":"advancedRefresh","nparams":1},{"commandName":"cancelHeatingLevel","nparams":1},{"commandName":"delayedStopIdentify","nparams":1},{"commandName":"getName","nparams":0},{"commandName":"identify","nparams":0},{"commandName":"off","nparams":0},{"commandName":"refreshComfortTemperature","nparams":0},{"commandName":"refreshDateTime","nparams":0},{"commandName":"refreshDerogatedTargetTemperature","nparams":0},{"commandName":"refreshEcoTemperature","nparams":0},{"commandName":"refreshHeatingLevel","nparams":0},{"commandName":"refreshManufacturerName","nparams":0},{"commandName":"refreshMaximumHeatingTargetTemperature","nparams":0},{"commandName":"refreshMaximumTargetTemperature","nparams":0},{"commandName":"refreshOperatingMode","nparams":0},{"commandName":"refreshTargetTemperature","nparams":0},{"commandName":"refreshTemperature","nparams":0},{"commandName":"setComfortTemperature","nparams":1},{"commandName":"setDateTime","nparams":1},{"commandName":"setDerogatedTargetTemperature","nparams":1},{"commandName":"setEcoTemperature","nparams":1},{"commandName":"setHeatingLevel","nparams":1},{"commandName":"setHeatingLevelWithTimer","nparams":2},{"commandName":"setName","nparams":1},{"commandName":"setPreviousTargetTemperature","nparams":1},{"commandName":"setSchedulingType","nparams":1},{"commandName":"setTargetTemperature","nparams":1},{"commandName":"startIdentify","nparams":0},{"commandName":"stopIdentify","nparams":0},{"commandName":"wink","nparams":1},{"commandName":"pairOneWayController","nparams":2},{"commandName":"refreshAutoProgram","nparams":0},{"commandName":"refreshBoostModeDuration","nparams":0},{"commandName":"refreshBoostModeParameters","nparams":0},{"commandName":"refreshControllerAddress","nparams":0},{"commandName":"refreshCumulatedLowering","nparams":0},{"commandName":"refreshCurrentWorkingRate","nparams":0},{"commandName":"refreshDeletionCancelation","nparams":0},{"commandName":"refreshDryingDuration","nparams":0},{"commandName":"refreshDryingParameters","nparams":0},{"commandName":"refreshEffectiveTemperatureSetpoint","nparams":0},{"commandName":"refreshLocalLeadTime","nparams":0},{"commandName":"refreshModel","nparams":0},{"commandName":"refreshOccupancy","nparams":0},{"commandName":"refreshPeakNotice","nparams":0},{"commandName":"refreshPeakWarning","nparams":0},{"commandName":"refreshPowerAndTension","nparams":0},{"commandName":"refreshRoomDeletionThreshold","nparams":0},{"commandName":"refreshSSVError6","nparams":0},{"commandName":"refreshSetpointLoweringTemperatureInProgMode","nparams":0},{"commandName":"refreshSynchronisationRequest","nparams":0},{"commandName":"refreshTemperatureProbeCalibrationOffset","nparams":0},{"commandName":"refreshTowelDryerTemporaryState","nparams":0},{"commandName":"refreshTowelDryerTimeProgram","nparams":0},{"commandName":"setCommunicationTest","nparams":1},{"commandName":"setDeletionCancelation","nparams":1},{"commandName":"setDryingDuration","nparams":1},{"commandName":"setExpectedPresence","nparams":1},{"commandName":"setPeakNotice","nparams":1},{"commandName":"setPeakWarning","nparams":1},{"commandName":"setRoomDeletionThreshold","nparams":1},{"commandName":"setSetpointLoweringTemperatureInProgMode","nparams":1},{"commandName":"setTemperatureProbeCalibrationOffset","nparams":1},{"commandName":"setTowelDryerBoostModeDuration","nparams":1},{"commandName":"setTowelDryerOperatingMode","nparams":1},{"commandName":"setTowelDryerTemporaryState","nparams":1},{"commandName":"setTowelDryerTimeProgram","nparams":1},{"commandName":"unpairAllOneWayControllers","nparams":0},{"commandName":"unpairOneWayController","nparams":2}],"states":[{"type":"ContinuousState","qualifiedName":"core:BoostModeDurationState"},{"type":"ContinuousState","qualifiedName":"core:ComfortRoomTemperatureState"},{"type":"DataState","qualifiedName":"core:DateTimeState"},{"type":"ContinuousState","qualifiedName":"core:DerogatedTargetTemperatureState"},{"type":"DiscreteState","values":["good","low","normal","verylow"],"qualifiedName":"core:DiscreteRSSILevelState"},{"type":"ContinuousState","qualifiedName":"core:EcoRoomTemperatureState"},{"type":"ContinuousState","qualifiedName":"core:FilterFanCloggingErrorState"},{"type":"DataState","qualifiedName":"core:IdentifierState"},{"type":"DataState","qualifiedName":"core:ManufacturerNameState"},{"type":"ContinuousState","qualifiedName":"core:MaximumHeatingTargetTemperatureState"},{"type":"ContinuousState","qualifiedName":"core:MaximumTargetTemperatureState"},{"type":"DataState","qualifiedName":"core:NameState"},{"eventBased":true,"type":"DiscreteState","values":["noPersonInside","personInside"],"qualifiedName":"core:OccupancyState"},{"type":"DiscreteState","values":["off","on"],"qualifiedName":"core:OnOffState"},{"type":"DiscreteState","values":["antifreeze","auto","away","eco","frostprotection","manual","max","normal","off","on","prog","program","boost"],"qualifiedName":"core:OperatingModeState"},{"type":"ContinuousState","qualifiedName":"core:PreviousTargetTemperatureState"},{"type":"ContinuousState","qualifiedName":"core:PriorityLockTimerState"},{"type":"ContinuousState","qualifiedName":"core:RSSILevelState"},{"type":"DiscreteState","values":["increase","none","standby"],"qualifiedName":"core:RegulationModeState"},{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"},{"type":"ContinuousState","qualifiedName":"core:TargetTemperatureState"},{"type":"DataState","qualifiedName":"core:TimeProgramState"},{"type":"ContinuousState","qualifiedName":"core:VersionState"},{"type":"DataState","qualifiedName":"io:AutoProgramState"},{"type":"DataState","qualifiedName":"io:BoostDurationMaxState"},{"type":"DataState","qualifiedName":"io:BoostDurationUserParameterState"},{"type":"DataState","qualifiedName":"io:ControllerAddressState"},{"type":"ContinuousState","qualifiedName":"io:CumulatedLoweringState"},{"type":"ContinuousState","qualifiedName":"io:CurrentWorkingRateState"},{"type":"DiscreteState","values":["deletion cancelation","no deletion cancelation"],"qualifiedName":"io:DeletionCancelationState"},{"type":"DataState","qualifiedName":"io:DryingDurationMaxState"},{"type":"ContinuousState","qualifiedName":"io:DryingDurationState"},{"type":"DataState","qualifiedName":"io:DryingDurationUserParameterState"},{"type":"ContinuousState","qualifiedName":"io:EffectiveTemperatureSetpointState"},{"type":"ContinuousState","qualifiedName":"io:ExpectedPresenceState"},{"type":"DiscreteState","values":["external","internal"],"qualifiedName":"io:InternalExternalSchedulingTypeState"},{"type":"ContinuousState","qualifiedName":"io:LocalLeadTimeState"},{"type":"DiscreteState","values":["boost","comfort","comfort-1","comfort-2","eco","frostprotection","off","secured"],"qualifiedName":"io:MaximumHeatingLevelState"},{"type":"DataState","qualifiedName":"io:ModelState"},{"type":"DiscreteState","values":["long peak","no peak","short peak"],"qualifiedName":"io:PeakNoticeState"},{"type":"DiscreteState","values":["long peak warning","no warning","short peak warning"],"qualifiedName":"io:PeakWarningState"},{"type":"DataState","qualifiedName":"io:PowerState"},{"type":"DiscreteState","values":["comfortLevel1","comfortLevel2","comfortLevel3","comfortLevel4","environmentProtection","humanProtection","userLevel1","userLevel2"],"qualifiedName":"io:PriorityLockLevelState"},{"type":"DiscreteState","values":["LSC","SAAC","SFC","UPS","externalGateway","localUser","myself","rain","security","temperature","timer","user","wind"],"qualifiedName":"io:PriorityLockOriginatorState"},{"type":"DataState","qualifiedName":"io:RoomDeletionThresholdState"},{"type":"DiscreteState","values":["kept","lost"],"qualifiedName":"io:RunningState"},{"type":"ContinuousState","qualifiedName":"io:SetpointLoweringTemperatureInProgModeState"},{"type":"DiscreteState","values":["boost","comfort","comfort-1","comfort-2","eco","frostprotection","off","secured"],"qualifiedName":"io:TargetHeatingLevelState"},{"type":"ContinuousState","qualifiedName":"io:TemperatureProbeCalibrationOffsetState"},{"type":"DataState","qualifiedName":"io:TensionState"},{"type":"ContinuousState","qualifiedName":"io:TimerForTransitoryStateState"},{"type":"DiscreteState","values":["boost","drying","permanentHeating"],"qualifiedName":"io:TowelDryerTemporaryStateState"},{"type":"ContinuousState","qualifiedName":"io:UptimeState"}],"dataProperties":[{"value":"500","qualifiedName":"core:identifyInterval"}],"widgetName":"AtlanticElectricalTowelDryer","uiProfiles":["HeatingLevel","StatefulThermostat","Thermostat","OccupancyDetector"],"uiClass":"HeatingSystem","uiClassifiers":["emitter"],"qualifiedName":"io:AtlanticElectricalTowelDryerIOComponent","type":"ACTUATOR"},"states":[{"name":"core:NameState","type":3,"value":"I2G_Actuator"},{"name":"core:VersionState","type":3,"value":"2d202020ffffff210002"},{"name":"core:PriorityLockTimerState","type":1,"value":0},{"name":"core:OnOffState","type":3,"value":"on"},{"name":"io:TargetHeatingLevelState","type":3,"value":"eco"},{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:DiscreteRSSILevelState","type":3,"value":"normal"},{"name":"core:RSSILevelState","type":2,"value":76.0},{"name":"core:IdentifierState","type":3,"value":"00000000"},{"name":"io:MaximumHeatingLevelState","type":3,"value":"unknown"},{"name":"io:TimerForTransitoryStateState","type":1,"value":0},{"name":"core:ComfortRoomTemperatureState","type":1,"value":19},{"name":"core:EcoRoomTemperatureState","type":1,"value":5},{"name":"io:SetpointLoweringTemperatureInProgModeState","type":2,"value":5.0},{"name":"io:InternalExternalSchedulingTypeState","type":3,"value":"internal"},{"name":"core:DateTimeState","type":11,"value":{"month":12,"hour":11,"year":2022,"weekday":3,"day":1,"minute":48,"second":48}},{"name":"io:LocalLeadTimeState","type":1,"value":3154},{"name":"core:RegulationModeState","type":3,"value":"none"},{"name":"core:ManufacturerNameState","type":3,"value":"Thermor"},{"name":"io:ModelState","type":3,"value":"Symphonik Gauche"},{"name":"io:PowerState","type":1,"value":1750},{"name":"io:TensionState","type":1,"value":235},{"name":"core:DerogatedTargetTemperatureState","type":2,"value":0.0},{"name":"io:TemperatureProbeCalibrationOffsetState","type":2,"value":0.0},{"name":"io:CurrentWorkingRateState","type":2,"value":0.0},{"name":"io:CumulatedLoweringState","type":2,"value":19.0},{"name":"io:ControllerAddressState","type":1,"value":15984323},{"name":"core:OperatingModeState","type":3,"value":"external"},{"name":"io:EffectiveTemperatureSetpointState","type":2,"value":14.0},{"name":"core:TargetTemperatureState","type":2,"value":19.0},{"name":"core:BoostModeDurationState","type":1,"value":0},{"name":"io:BoostDurationUserParameterState","type":1,"value":60},{"name":"io:BoostDurationMaxState","type":1,"value":60},{"name":"io:DryingDurationState","type":1,"value":0},{"name":"io:DryingDurationUserParameterState","type":1,"value":90},{"name":"io:DryingDurationMaxState","type":1,"value":120},{"name":"io:TowelDryerTemporaryStateState","type":3,"value":"permanentHeating"},{"name":"core:OccupancyState","type":1,"value":1},{"name":"core:FilterFanCloggingErrorState","type":2,"value":0.0},{"name":"io:AutoProgramState","type":11,"value":{"sunday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_2","CONF_3_NIV2","CONF_2","CONF_2","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_1","CONF_1","CONF_1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_2","CONF_NIV2","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV2","CONF_NIV3","CONF_NIV3","CONF_1","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_NIV2","CONF_NIV2","CONF_NIV2","CONF_NIV2","CONF_NIV2","CONF_NIV1","CONF_NIV3","CONF_NIV1","CONF_NIV1","CONF_NIV2","CONF_2","CONF_1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1"],"saturday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_2","CONF_NIV2","CONF_NIV2","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_1","CONF_3_NIV2","CONF_3_NIV1","CONF_NIV1","CONF_2","CONF_NIV1","CONF_2","CONF_2","CONF_2","CONF_2","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV1","CONF_1","CONF_1","CONF_NIV2","CONF_1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV1","CONF_2","CONF_2","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV2","CONF_1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1"],"tuesday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV2","CONF_NIV2","CONF_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV3","CONF_NIV3","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1"],"wednesday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_2","CONF_2","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_1","CONF_1","CONF_2","CONF_2","CONF_2","CONF_1","CONF_1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV3","CONF_NIV3","CONF_1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV1","CONF_NIV2","CONF_2","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_NIV1","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_1","CONF_2","CONF_1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV2","CONF_NIV2","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1"],"thursday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV2","CONF_NIV3","CONF_NIV3","CONF_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_1","CONF_2","CONF_3_NIV1","CONF_1","CONF_1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_1","CONF_1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV3","CONF_NIV3","CONF_NIV2","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_NIV3","CONF_NIV2","CONF_2","CONF_NIV2","CONF_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1"],"friday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_NIV3","CONF_NIV3","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_2","CONF_2","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_2","CONF_2","CONF_2","CONF_3_NIV1","CONF_1","CONF_3_NIV1","CONF_1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV2","CONF_3_NIV1","CONF_2","CONF_2","CONF_2","CONF_1","CONF_3_NIV1","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1"],"anticipTime":3154,"anticipNb":20,"monday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV2","CONF_NIV3","CONF_NIV3","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_1","CONF_3_NIV2","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_NIV2","CONF_3_NIV1","CONF_NIV2","CONF_NIV2","CONF_NIV2","CONF_NIV2","CONF_2","CONF_3_NIV2","CONF_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_NIV2","CONF_1","CONF_3_NIV1","CONF_3_NIV1","CONF_2","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1"]}},{"name":"core:TimeProgramState","type":10,"value":[{"monday":[{"start":"18:15","end":"19:30"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]},{"tuesday":[{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]},{"wednesday":[{"start":"18:15","end":"19:30"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]},{"thursday":[{"start":"18:15","end":"19:30"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]},{"friday":[{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]},{"saturday":[{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]},{"sunday":[{"start":"18:00","end":"19:30"},{"start":"00:00","end":"00:00"},{"start":"00:00","end":"00:00"}]}]}],"attributes":[{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"},{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"}],"available":true,"enabled":true,"placeOID":"bc5dd522-effc-4856-8b7b-bf65fca747db","widget":"AtlanticElectricalTowelDryer","type":1,"oid":"57fe776a-b86d-45fb-b8cf-deb5849872b3","uiClass":"HeatingSystem"},{"creationTime":1528368069000,"lastUpdateTime":1528368069000,"label":"IO (5668249#2)","deviceURL":"io://0810-4343-0200/5668249#2","shortcut":false,"controllableName":"io:OccupancyIOSystemDeviceSensor","definition":{"commands":[],"states":[{"eventBased":true,"type":"DiscreteState","values":["noPersonInside","personInside"],"qualifiedName":"core:OccupancyState"},{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"}],"dataProperties":[],"widgetName":"OccupancySensor","uiProfiles":["OccupancyDetector"],"uiClass":"OccupancySensor","qualifiedName":"io:OccupancyIOSystemDeviceSensor","type":"SENSOR"},"states":[{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:OccupancyState","type":3,"value":"noPersonInside"}],"attributes":[{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"},{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"},{"name":"core:PowerSourceType","type":3,"value":"mainSupply"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"OccupancySensor","type":2,"oid":"9f6881c1-9777-4df5-800b-fed5aaea58ee","uiClass":"OccupancySensor"},{"creationTime":1528368069000,"lastUpdateTime":1528368069000,"label":"IO (5668249#3)","deviceURL":"io://0810-4343-0200/5668249#3","shortcut":false,"controllableName":"io:LightIOSystemDeviceSensor","definition":{"commands":[],"states":[{"type":"ContinuousState","qualifiedName":"core:LuminanceState"},{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"}],"dataProperties":[],"widgetName":"LuminanceSensor","uiProfiles":["Luminance"],"uiClass":"LightSensor","qualifiedName":"io:LightIOSystemDeviceSensor","type":"SENSOR"},"states":[{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:LuminanceState","type":1,"value":21}],"attributes":[{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"},{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"},{"name":"core:MeasuredValueType","type":3,"value":"core:LuminanceInLux"},{"name":"core:PowerSourceType","type":3,"value":"mainSupply"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"LuminanceSensor","type":2,"oid":"7aad9c61-246f-47cd-a1dd-982588825255","uiClass":"LightSensor"},{"creationTime":1528368069000,"lastUpdateTime":1528368069000,"label":"IO (5668249#4)","deviceURL":"io://0810-4343-0200/5668249#4","shortcut":false,"controllableName":"io:RelativeHumidityIOSystemDeviceSensor","definition":{"commands":[],"states":[{"type":"ContinuousState","qualifiedName":"core:RelativeHumidityState"},{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"}],"dataProperties":[],"widgetName":"RelativeHumiditySensor","uiProfiles":["RelativeHumidity"],"uiClass":"HumiditySensor","qualifiedName":"io:RelativeHumidityIOSystemDeviceSensor","type":"SENSOR"},"states":[{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:RelativeHumidityState","type":2,"value":49.0}],"attributes":[{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"},{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"},{"name":"core:PowerSourceType","type":3,"value":"mainSupply"},{"name":"core:MeasuredValueType","type":3,"value":"core:RelativeValueInPercentage"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"RelativeHumiditySensor","type":2,"oid":"bdf56691-9160-430a-9583-f8d6ea56aac7","uiClass":"HumiditySensor"},{"creationTime":1528368069000,"lastUpdateTime":1528368069000,"label":"IO (5668249#5)","deviceURL":"io://0810-4343-0200/5668249#5","shortcut":false,"controllableName":"io:TemperatureInCelciusIOSystemDeviceSensor","definition":{"commands":[],"states":[{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"},{"type":"ContinuousState","qualifiedName":"core:TemperatureState"}],"dataProperties":[],"widgetName":"TemperatureSensor","uiProfiles":["Temperature"],"uiClass":"TemperatureSensor","qualifiedName":"io:TemperatureInCelciusIOSystemDeviceSensor","type":"SENSOR"},"states":[{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:TemperatureState","type":2,"value":23.8}],"attributes":[{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"},{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"},{"name":"core:MeasuredValueType","type":3,"value":"core:TemperatureInCelcius"},{"name":"core:PowerSourceType","type":3,"value":"mainSupply"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"TemperatureSensor","type":2,"oid":"a77c1f63-f2e2-4a20-a700-95fd1e5d0cb0","uiClass":"TemperatureSensor"},{"creationTime":1528368069000,"lastUpdateTime":1528368069000,"label":"IO (5668249#6)","deviceURL":"io://0810-4343-0200/5668249#6","shortcut":false,"controllableName":"io:CumulatedElectricalEnergyConsumptionIOSystemDeviceSensor","definition":{"commands":[],"states":[{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff0State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff1State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff2State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff3State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff4State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff5State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff6State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff7State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff8State"},{"type":"ContinuousState","qualifiedName":"core:ConsumptionTariff9State"},{"type":"ContinuousState","qualifiedName":"core:ElectricEnergyConsumptionState"},{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"}],"dataProperties":[],"widgetName":"CumulativeElectricPowerConsumptionSensor","uiProfiles":["ElectricEnergyConsumption"],"uiClass":"ElectricitySensor","qualifiedName":"io:CumulatedElectricalEnergyConsumptionIOSystemDeviceSensor","type":"SENSOR"},"states":[{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:ElectricEnergyConsumptionState","type":1,"value":1748000}],"attributes":[{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"},{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"},{"name":"core:PowerSourceType","type":3,"value":"mainSupply"},{"name":"core:MeasuredValueType","type":3,"value":"core:ElectricalEnergyInWh"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"CumulativeElectricPowerConsumptionSensor","type":2,"oid":"6301f2eb-a74a-4249-9979-a3d0716281a8","uiClass":"ElectricitySensor"},{"creationTime":1528368069000,"lastUpdateTime":1528368069000,"label":"IO (5668249#7)","deviceURL":"io://0810-4343-0200/5668249#7","shortcut":false,"controllableName":"io:TemperatureInCelciusIOSystemDeviceSensor","definition":{"commands":[],"states":[{"type":"DiscreteState","values":["available","unavailable"],"qualifiedName":"core:StatusState"},{"type":"ContinuousState","qualifiedName":"core:TemperatureState"}],"dataProperties":[],"widgetName":"TemperatureSensor","uiProfiles":["Temperature"],"uiClass":"TemperatureSensor","qualifiedName":"io:TemperatureInCelciusIOSystemDeviceSensor","type":"SENSOR"},"states":[{"name":"core:StatusState","type":3,"value":"available"},{"name":"core:TemperatureState","type":2,"value":20.5}],"attributes":[{"name":"core:Manufacturer","type":3,"value":"Atlantic Group"},{"name":"core:FirmwareRevision","type":3,"value":"2d202020ffffff210002"},{"name":"core:MeasuredValueType","type":3,"value":"core:TemperatureInCelcius"},{"name":"core:PowerSourceType","type":3,"value":"mainSupply"}],"available":true,"enabled":true,"placeOID":"8085ec50-bcbe-4d92-96e7-5c4820432958","widget":"TemperatureSensor","type":2,"oid":"b9eef2ff-c6b1-4449-a818-b9aee2ea7bf9","uiClass":"TemperatureSensor"}],"zones":[],"resellerDelegationType":"NEVER","oid":"c10490e6-ea10-489c-a9a3-c7b5c4442cf2","rootPlace":{"creationTime":1528367801000,"lastUpdateTime":1528367801000,"label":"All House","type":0,"oid":"8085ec50-bcbe-4d92-96e7-5c4820432958","subPlaces":[{"creationTime":1602427131000,"lastUpdateTime":1633779688000,"label":"Chambres","type":8,"oid":"eec674a3-938a-42cb-8b66-56b75b6fc2f4","subPlaces":[]},{"creationTime":1528368074000,"lastUpdateTime":1668265290000,"label":"Salle de bain","type":30,"oid":"bc5dd522-effc-4856-8b7b-bf65fca747db","subPlaces":[]}]},"features":[]} As you can see, my two devices ( 2 dry towel ) are: io://0810-4343-0200/13610533 and io://0810-4343-0200/5668249 Encore Merci !
Bloug Posté(e) le 2 décembre 2022 Auteur Signaler Posté(e) le 2 décembre 2022 ... il doit y avoir autre chose qui cloche Pour me diriger vers l'un ou l'autre des sèches serviettes j'ai utilisé le deviceURL , celui ci conserve le numéro pour les capteur mais ajoute (▀▀▀▀▀ ) avec des #1 ; #2 #3... J'ai fais un autre test , pour éviter le problème de recherche avec des caractères magique ... j'ai testé d'utiliser creationTime(▀▀▀▀▀ ) qui lui ne change pas ! et j'ai quand même une erreur sur les clefs : {4} - {5} - {6} - {7} ssSeLum = (find('name','core:LuminanceState',find('deviceURL',"io://0810%-4343%-0200/13610533.3",jsonResponse.devices).states).value) -- #3 => OK ssSeLum = (find('name','core:LuminanceState',find('deviceURL',"io://0810%-4343%-0200/13610533..",jsonResponse.devices).states).value) -- #3 => Fail
jang Posté(e) le 2 décembre 2022 Signaler Posté(e) le 2 décembre 2022 Maybe just collect all the keys starting with "io:" and "core:" ? local function find(expr) local res = {} local function find_aux(expr) if type(expr) == 'table' then if expr[1] then -- array for _,e in ipairs(expr) do find_aux(e) end else -- key/value if expr.name and (expr.name:sub(1,3)=='io:' or expr.name:sub(1,5)=='core:') and expr.value then res[expr.name]=expr.value else for k,v in pairs(expr) do find_aux(v) end end end end end find_aux(expr) return res end keys = find(jsonResponse.devices) print('io:TargetHeatingLevelState=',keys['io:TargetHeatingLevelState']) print('core:RSSILevelState=',keys['core:RSSILevelState']) print('core:LuminanceState=',keys['core:LuminanceState']) print('core:RelativeHumidityState=',keys['core:RelativeHumidityState']) print('core:TemperatureState=',keys['core:TemperatureState']) print('core:ElectricEnergyConsumptionState=',keys['core:ElectricEnergyConsumptionState']) Output [02.12.2022] [23:33:07] [DEBUG] [QUICKAPP1001]: io:TargetHeatingLevelState= eco [02.12.2022] [23:33:07] [DEBUG] [QUICKAPP1001]: core:RSSILevelState= 76.0 [02.12.2022] [23:33:07] [DEBUG] [QUICKAPP1001]: core:LuminanceState= 21 [02.12.2022] [23:33:07] [DEBUG] [QUICKAPP1001]: core:RelativeHumidityState= 49.0 [02.12.2022] [23:33:07] [DEBUG] [QUICKAPP1001]: core:TemperatureState= 20.5 [02.12.2022] [23:33:07] [DEBUG] [QUICKAPP1001]: core:ElectricEnergyConsumptionState= 1748000
jang Posté(e) le 3 décembre 2022 Signaler Posté(e) le 3 décembre 2022 (modifié) or if you want to see all keys keys = find(jsonResponse.devices) for k,v in pairs(keys) do print(k,"=",json.encode(v)) end output [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:TimeProgramState = [{"monday":[{"end":"19:30","start":"18:15"},{"end":"00:00","start":"00:00"},{"end":"00:00","start":"00:00"}]},{"tuesday":[{"end":"00:00","start":"00:00"},{"end":"00:00","start":"00:00"},{"end":"00:00","start":"00:00"}]},{"wednesday":[{"end":"19:30","start":"18:15"},{"end":"00:00","start":"00:00"},{"end":"00:00","start":"00:00"}]},{"thursday":[{"end":"19:30","start":"18:15"},{"end":"00:00","start":"00:00"},{"end":"00:00","start":"00:00"}]},{"friday":[{"end":"00:00","start":"00:00"},{"end":"00:00","start":"00:00"},{"end":"00:00","start":"00:00"}]},{"saturday":[{"end":"00:00","start":"00:00"},{"end":"00:00","start":"00:00"},{"end":"00:00","start":"00:00"}]},{"sunday":[{"end":"19:30","start":"18:00"},{"end":"00:00","start":"00:00"},{"end":"00:00","start":"00:00"}]}] [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:LocalLeadTimeState = 3154 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:FirmwareRevision = "2d202020ffffff210002" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:VersionState = "2d202020ffffff210002" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:ComfortRoomTemperatureState = 19 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:LocalIPv4AddressState = "192.168.1.15" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:RegulationModeState = "none" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:DryingDurationState = 0 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:RSSILevelState = 76 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:TensionState = 235 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:MaximumHeatingLevelState = "unknown" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:RelativeHumidityState = 49 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:AutoProgramState = {"thursday":["CONF_3_NIV1",....} [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:ElectricEnergyConsumptionState = 1748000 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:StatusState = "available" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:TemperatureState = 20.5 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:InternalExternalSchedulingTypeState = "internal" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:NameState = "I2G_Actuator" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:OperatingModeState = "external" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:BoostDurationUserParameterState = 60 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:CountryCodeState = "FR" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:ManufacturerNameState = "Thermor" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:MeasuredValueType = "core:TemperatureInCelcius" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:PowerSourceType = "mainSupply" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:FilterFanCloggingErrorState = 0 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:DerogatedTargetTemperatureState = 0 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:EffectiveTemperatureSetpointState = 14 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:BoostModeDurationState = 0 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:OccupancyState = "noPersonInside" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:OnOffState = "on" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:EcoRoomTemperatureState = 5 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:CurrentWorkingRateState = 0 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:TowelDryerTemporaryStateState = "permanentHeating" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:ModelState = "Symphonik Gauche" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:DryingDurationMaxState = 120 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:DryingDurationUserParameterState = 90 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:BoostDurationMaxState = 60 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:TargetTemperatureState = 19 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:TargetHeatingLevelState = "eco" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:LuminanceState = 21 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:TimerForTransitoryStateState = 0 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:ControllerAddressState = 15984323 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:IdentifierState = "00000000" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:CumulatedLoweringState = 19 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:DiscreteRSSILevelState = "normal" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:PriorityLockTimerState = 0 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:TemperatureProbeCalibrationOffsetState = 0 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:Manufacturer = "Atlantic Group" [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:PowerState = 1750 [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: core:DateTimeState = {"weekday":3,"hour":11,"second":48,"minute":48,"month":12,"year":2022,"day":1} [03.12.2022] [10:30:53] [DEBUG] [QUICKAPP1001]: io:SetpointLoweringTemperatureInProgModeState = 5 Modifié le 3 décembre 2022 par jang
Bloug Posté(e) le 3 décembre 2022 Auteur Signaler Posté(e) le 3 décembre 2022 (modifié) Thank You ! ; I'm really starting to have trouble understanding your code your returns are correct but they do not make the difference between the two devices, right? io://0810-4343-0200/13610533#1 and io://0810-4343-0200/5668249#1 ( sorry maybe i'm wrong ? ) I want to use only one QA per device, by simply entering: My login / pass and a "Device" variable local jsonResponse = json.decode(response.data) -- print(response.data) ---------------------------------------------------------------- -- Modification du nom de l'appareil pour deviceceURL #1 à #6 -- ---------------------------------------------------------------- local shortnameo = self:getVariable("Appareil") local shortname = shortnameo:sub(1, -1) local modifname = string.gsub(shortname, "-", "%%-") local shortname1= modifname .. '#1' local shortname2= modifname .. '#2' local shortname3= modifname .. '#3' local shortname4= modifname .. '#4' local shortname5= modifname .. '#5' local shortname6= modifname .. '#6' ---------------------------------------------------------------------- -- Fonction de @Jang pour retouver les Valeurs en fonction des Noms -- ---------------------------------------------------------------------- local function find(key,val,list) for _,e in ipairs(list) do if tostring(e[key]):match(val) then return e end end end ssConsi = (find('name','core:ComfortRoomTemperatureState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssModeF = (find('name','core:OperatingModeState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssBoreT = (find('name','core:BoostModeDurationState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssDrreT = (find('name','io:DryingDurationState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssSeMov = (find('name','core:OccupancyState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssFonct = (find('name','io:TowelDryerTemporaryStateState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssRSSIL = (find('name','core:DiscreteRSSILevelState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssRSSIP = (find('name','core:RSSILevelState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssSeLum = (find('name','core:LuminanceState',find('deviceURL',shortname3,jsonResponse.devices).states).value) ssSeHum = (find('name','core:RelativeHumidityState',find('deviceURL',shortname4,jsonResponse.devices).states).value) ssSeTem = (find('name','core:TemperatureState',find('deviceURL',shortname5,jsonResponse.devices).states).value) ssSeCon = (find('name','core:ElectricEnergyConsumptionState',find('deviceURL',shortname6,jsonResponse.devices).states).value) /1000 Il y a 15 heures, jang a dit : Maybe just collect all the keys starting with "io:" and "core:" ? local function find(expr) local res = {} local function find_aux(expr) if type(expr) == 'table' then if expr[1] then -- array for _,e in ipairs(expr) do find_aux(e) end else -- key/value if expr.name and (expr.name:sub(1,3)=='io:' or expr.name:sub(1,5)=='core:') and expr.value then res[expr.name]=expr.value else for k,v in pairs(expr) do find_aux(v) end end end end end find_aux(expr) return res end keys = find(jsonResponse.devices) print('io:TargetHeatingLevelState=',keys['io:TargetHeatingLevelState']) print('core:RSSILevelState=',keys['core:RSSILevelState']) print('core:LuminanceState=',keys['core:LuminanceState']) print('core:RelativeHumidityState=',keys['core:RelativeHumidityState']) print('core:TemperatureState=',keys['core:TemperatureState']) print('core:ElectricEnergyConsumptionState=',keys['core:ElectricEnergyConsumptionState']) what a pity for your initial approach ! is it a JSON problem ? : for _,e in ipairs(list) do if tostring(e[key]):match(val) then return e end end end ssConsi = (find('name','core:ComfortRoomTemperatureState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) -- #1 OK ssMode = (find('name','core:OperatingModeState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) -- #1 OK ssBoreT = (find('name','core:BoostModeDurationState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) -- #1 OK ssSeLum = (find('name','core:LuminanceState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) -- #3 Fail ssSeHum = (find('name','core:RelativeHumidityState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) -- #4 Fail ssSeCon = (find('name','core:ElectricEnergyConsumptionState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) -- #6 Fail Modifié le 3 décembre 2022 par Bloug
jang Posté(e) le 3 décembre 2022 Signaler Posté(e) le 3 décembre 2022 How about this? local function find(uid,expr) local res,device = {} local function find_aux(expr) if type(expr) == 'table' then if expr[1] then -- array for _,e in ipairs(expr) do find_aux(e) end else -- key/value if expr.deviceURL then device = expr.deviceURL:match(uid) if device then device = device.."#" end end if device and expr.name and (expr.name:sub(1,3)=='io:' or expr.name:sub(1,5)=='core:') and expr.value then local key = device..expr.name if res[key] and res[key]~=expr.value then error("Duplicate key:"..key) end res[key]=expr.value else for k,v in pairs(expr) do find_aux(v) end end end end end uid = uid:gsub("%-","%%-").."#(%d+)$" find_aux(expr) return res end local uid = "io://0810-4343-0200/13610533" keys = find(uid,jsonResponse.devices) for k,v in pairs(keys) do print(k,"=",json.encode(v):sub(1,80)) end and output [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 3#core:LuminanceState = 4 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:RSSILevelState = 36 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:DryingDurationMaxState = 120 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:BoostDurationMaxState = 60 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:FilterFanCloggingErrorState = 12 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:PriorityLockTimerState = 0 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:SetpointLoweringTemperatureInProgModeState = 2.5 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 6#core:PowerSourceType = "mainSupply" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:BoostModeDurationState = 0 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:IdentifierState = "00000000" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 7#core:TemperatureState = 20.5 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:DiscreteRSSILevelState = "low" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 3#core:MeasuredValueType = "core:LuminanceInLux" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 5#core:TemperatureState = 23.5 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:TargetTemperatureState = 17 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 7#core:MeasuredValueType = "core:TemperatureInCelcius" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:MaximumHeatingLevelState = "unknown" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 5#core:MeasuredValueType = "core:TemperatureInCelcius" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 4#core:MeasuredValueType = "core:RelativeValueInPercentage" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:DateTimeState = {"month":12,"weekday":3,"day":1,"second":50,"year":2022,"minute":48,"hour":11} [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:DerogatedTargetTemperatureState = 0 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:ComfortRoomTemperatureState = 17 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:TimeProgramState = [{"monday":[{"start":"04:45","end":"05:45"},{"start":"00:00","end":"00:00"},{"st [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:CumulatedLoweringState = 18 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 3#core:PowerSourceType = "mainSupply" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:CurrentWorkingRateState = 0 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:TimerForTransitoryStateState = 0 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:LocalLeadTimeState = 3268 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:OperatingModeState = "external" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:VersionState = "2d202020ffffff210002" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:OnOffState = "on" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:NameState = "I2G_Actuator" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:RegulationModeState = "none" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 7#core:PowerSourceType = "mainSupply" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:ModelState = "Symphonik Gauche" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 6#core:StatusState = "available" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:TemperatureProbeCalibrationOffsetState = 0 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 4#core:StatusState = "available" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 2#core:OccupancyState = "noPersonInside" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 2#core:StatusState = "available" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:StatusState = "available" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 4#core:RelativeHumidityState = 44 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:EffectiveTemperatureSetpointState = 17 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:PowerState = 1750 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:TowelDryerTemporaryStateState = "permanentHeating" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 7#core:Manufacturer = "Atlantic Group" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 7#core:StatusState = "available" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 6#core:MeasuredValueType = "core:ElectricalEnergyInWh" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 2#core:PowerSourceType = "mainSupply" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 3#core:Manufacturer = "Atlantic Group" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 4#core:Manufacturer = "Atlantic Group" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 5#core:Manufacturer = "Atlantic Group" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 6#core:Manufacturer = "Atlantic Group" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:ControllerAddressState = 13610532 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 6#core:ElectricEnergyConsumptionState = 1011000 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 5#core:PowerSourceType = "mainSupply" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 3#core:StatusState = "available" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 5#core:FirmwareRevision = "2d202020ffffff210002" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 4#core:FirmwareRevision = "2d202020ffffff210002" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 5#core:StatusState = "available" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:EcoRoomTemperatureState = 2.5 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:TensionState = 235 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:DryingDurationState = 0 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:DryingDurationUserParameterState = 60 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:BoostDurationUserParameterState = 30 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 4#core:PowerSourceType = "mainSupply" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:OccupancyState = 0 [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:ManufacturerNameState = "Thermor" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:TargetHeatingLevelState = "comfort" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 3#core:FirmwareRevision = "2d202020ffffff210002" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 2#core:FirmwareRevision = "2d202020ffffff210002" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:Manufacturer = "Atlantic Group" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 2#core:Manufacturer = "Atlantic Group" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 7#core:FirmwareRevision = "2d202020ffffff210002" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 6#core:FirmwareRevision = "2d202020ffffff210002" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#core:FirmwareRevision = "2d202020ffffff210002" [03.12.2022] [16:29:00] [DEBUG] [QUICKAPP1001]: 1#io:AutoProgramState = {"saturday":["CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV1","CONF_3_NIV It only collects keys with the uid and prefixes the keys with the number after # Then you can do print(keys['1#core:ComfortRoomTemperatureState']) The problem with the previous statement ssConsi = (find('name','core:ComfortRoomTemperatureState',find('deviceURL','io://0810%-4343%-0200/13610533..',jsonResponse.devices).states).value) -- #1 OK is that if <uid>#1 and <uid>#2 both have the key 'core:ComfortRoomTemperatureState' we just get the first random - but we should return both. With the new find taking the uid you can ask for the specfic uid number in the result Ex. '1#core:ComfortRoomTemperatureState' of uid "io://0810-4343-0200/13610533" Will that work?
jang Posté(e) le 3 décembre 2022 Signaler Posté(e) le 3 décembre 2022 (modifié) You see in the output above that uid versions uid#5 and uid#7 both has key 'TemperatureState' and then the question is which should be choosen? Now we can get both with keys["5#uid"] and keys["7#uid"] Modifié le 3 décembre 2022 par jang 1
Bloug Posté(e) le 3 décembre 2022 Auteur Signaler Posté(e) le 3 décembre 2022 Great !!! After verification with the Thermor Cozytouch application, the KEY=7 for TemperatureState is the one used in apps for the temperature. Your two solutions work and are similar in fact because I have to fill with#1 #2 etc... Solution 1 : with shortname1 ; shortname2 ; shortname3 etc... ---------------------------------------------------------------- -- Modification du nom de l'appareil pour deviceceURL #1 à #6 -- ---------------------------------------------------------------- local shortnameo = self:getVariable("Appareil") local shortname = shortnameo:sub(1, -1) local modifname = string.gsub(shortname, "-", "%%-") local shortname1= modifname .. '#1' local shortname2= modifname .. '#2' local shortname3= modifname .. '#3' local shortname4= modifname .. '#4' local shortname5= modifname .. '#5' local shortname6= modifname .. '#6' local shortname6= modifname .. '#7' local shortname6= modifname .. '#8' local shortname6= modifname .. '#9' ---------------------------------------------------------------------- -- Fonction de @Jang pour retouver les Valeurs en fonction des Noms -- ---------------------------------------------------------------------- local function find(key,val,list) for _,e in ipairs(list) do if tostring(e[key]):match(val) then return e end end end ssConsi = (find('name','core:ComfortRoomTemperatureState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssModeF = (find('name','core:OperatingModeState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssBoreT = (find('name','core:BoostModeDurationState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssDrreT = (find('name','io:DryingDurationState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssSeMov = (find('name','core:OccupancyState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssFonct = (find('name','io:TowelDryerTemporaryStateState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssRSSIL = (find('name','core:DiscreteRSSILevelState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssRSSIP = (find('name','core:RSSILevelState',find('deviceURL',shortname1,jsonResponse.devices).states).value) ssSeLum = (find('name','core:LuminanceState',find('deviceURL',shortname3,jsonResponse.devices).states).value) ssSeHum = (find('name','core:RelativeHumidityState',find('deviceURL',shortname4,jsonResponse.devices).states).value) ssSeTem = (find('name','core:TemperatureState',find('deviceURL',shortname7,jsonResponse.devices).states).value) ssSeCon = (find('name','core:ElectricEnergyConsumptionState',find('deviceURL',shortname6,jsonResponse.devices).states).value) /1000 Solution 2 : with Key#1 ; Key#2 ; Key#3 etc... local function find(uid,expr) local res,device = {} local function find_aux(expr) if type(expr) == 'table' then if expr[1] then -- array for _,e in ipairs(expr) do find_aux(e) end else -- key/value if expr.deviceURL then device = expr.deviceURL:match(uid) if device then device = device.."#" end end if device and expr.name and (expr.name:sub(1,3)=='io:' or expr.name:sub(1,5)=='core:') and expr.value then local key = device..expr.name if res[key] and res[key]~=expr.value then error("Duplicate key:"..key) end res[key]=expr.value else for k,v in pairs(expr) do find_aux(v) end end end end end uid = uid:gsub("%-","%%-").."#(%d+)$" find_aux(expr) return res end local uid = shortname keys = find(uid,jsonResponse.devices) for k,v in pairs(keys) do --print(k,"=",json.encode(v):sub(1,80)) end ssConsi = keys['1#core:ComfortRoomTemperatureState'] ssModeF = keys['1#core:OperatingModeState'] ssBoreT = keys['1#core:BoostModeDurationState'] ssDrreT = keys['1#io:DryingDurationState'] ssSeMov = keys['1#core:OccupancyState'] ssFonct = keys['1#io:TowelDryerTemporaryStateState'] ssRSSIL = keys['1#core:DiscreteRSSILevelState'] ssRSSIP = keys['1#core:RSSILevelState'] ssSeLum = keys['3#core:LuminanceState'] ssSeHum = keys['4#core:RelativeHumidityState'] ssSeTem = keys['7#core:TemperatureState'] ssSeCon = keys['6#core:ElectricEnergyConsumptionState'] /1000 Both of your solutions work perfectly! The huge advantage of using the second is that it is easier to list the elements of each device if the cozytouch bridge receives an update ! Thank you very much @jang for your answers and your codes relevance !
Messages recommandés