Jeg har automatisert min Panasonic Varmepumpe som bruker appen Comfort Cloud. Så nå kan jeg justere temperaturen via FH Appen istedenfor (savner dog at vifte + modus er tilgjengelig i FH app)
Jeg har også lagt opp en automasjon for Verisure alarmen, når helsikring aktiveres settes FH i bortemodus
og når den deaktiveres settes den i hjemmemodus
+ at sovemodus
settes når skallsikring aktiveres. Kanskje jeg kommer til å legge til at feriemodus
skal aktiveres når alarmen har helsikring om natta eller har vært aktivert i 2+ dager.
Hvis noen er interessert, så er Flow’en nedenfor, brukernavn og passord må legges til i “setting” inne på flow’en.
{
"Id": "d76e6920-372f-11eb-80f7-61ab9f19a667",
"ClassId": "d76e6920-372f-11eb-80f7-61ab9f19a667",
"Author": "lostfields",
"Version": 0,
"CreatedAt": "2020-12-05T19:26:58.227115Z",
"UpdatedAt": "2020-12-06T20:35:39.811106625+01:00",
"Name": "verisure",
"Group": "timer",
"Description": "",
"Nodes": [
{
"Id": "25",
"Type": "action",
"Label": "Run mode: sleep",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:cmd/rt:app/rn:vinculum/ad:1",
"Service": "vinculum",
"ServiceInterface": "cmd.pd7.request",
"Config": {
"DefaultValue": {
"Value": {
"cmd": "set",
"component": "mode",
"id": "sleep",
"param": {},
"requestId": 566
},
"ValueType": "object"
},
"IsVariableGlobal": null,
"Props": null,
"RegisterAsVirtualService": false,
"ResponseToTopic": "pt:j1/mt:rsp/rt:app/rn:tpflow/ad:1",
"VariableName": null,
"VirtualServiceGroup": null,
"VirtualServiceProps": null
},
"Ui": {
"nodeType": "",
"papp": {
"nodeId": "sleep",
"nodeName": "modes",
"nodeType": null
},
"x": 28,
"y": 1153
},
"TypeAlias": "Action"
},
{
"Id": "26",
"Type": "time_trigger",
"Label": "every minute",
"SuccessTransition": "48",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"DefaultMsg": {
"Value": "",
"ValueType": ""
},
"Expressions": [
{
"Comments": "",
"Expression": "*/1 * * * *",
"Name": ""
}
],
"GenerateAstroTimeEvents": false,
"Latitude": 0,
"Longitude": 0,
"SunriseTimeOffset": 0,
"SunsetTimeOffset": 0
},
"Ui": {
"nodeType": "",
"x": 1634,
"y": 115
},
"TypeAlias": "Time trigger"
},
{
"Id": "27",
"Type": "rest_action",
"Label": "get installations",
"SuccessTransition": "33",
"TimeoutTransition": "",
"ErrorTransition": "32",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Auth": {
"ClientID": "",
"ClientSecret": "",
"Enabled": false,
"GrantType": "basic",
"Password": "",
"Scope": "",
"Url": "",
"Username": ""
},
"Headers": [],
"HeadersVariableName": "headers",
"LogResponse": true,
"Method": "GET",
"RequestPayloadType": "json",
"RequestTemplate": "",
"ResponseMapping": [
{
"IsVariableGlobal": false,
"Name": "",
"Path": "$[0].giid",
"PathType": "json",
"TargetVariableName": "installation_giid",
"TargetVariableType": "string"
}
],
"Url": "https://e-api02.verisure.com/xbn/2/installation/search?email={{ setting \"username\" }}"
},
"Ui": {
"nodeType": "",
"x": 1282,
"y": 912
},
"TypeAlias": "HTTP msg"
},
{
"Id": "28",
"Type": "rest_action",
"Label": "login",
"SuccessTransition": "31",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Auth": {
"ClientID": "",
"ClientSecret": "",
"Enabled": false,
"GrantType": "password",
"Password": "",
"Scope": "",
"Url": "http://",
"Username": ""
},
"Headers": [],
"HeadersVariableName": "headers_credentials",
"LogResponse": true,
"Method": "POST",
"RequestPayloadType": "json",
"RequestTemplate": "",
"ResponseMapping": [
{
"IsVariableGlobal": false,
"Name": "",
"Path": "$.cookie",
"PathType": "json",
"TargetVariableName": "cookie",
"TargetVariableType": "string",
"UpdateTriggerMessage": false
}
],
"Url": "https://e-api02.verisure.com/xbn/2/cookie"
},
"Ui": {
"nodeType": "",
"x": 1287,
"y": 579
},
"TypeAlias": "HTTP msg"
},
{
"Id": "31",
"Type": "transform",
"Label": "set header",
"SuccessTransition": "27",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": "",
"IsLVariableGlobal": false,
"IsRVariableGlobal": false,
"IsTargetVariableGlobal": false,
"IsTargetVariableInMemory": true,
"LVariableName": "",
"RValue": {
"Value": 0,
"ValueType": "int"
},
"RVariableName": "",
"Rtype": "var",
"TargetVariableName": "headers",
"TargetVariableType": "str_map",
"Template": "{\"Cookie\":\"vid={{ variable \"cookie\" false }}\", \"Content-Type\":\"application/json\", \"Accept\": \"application/json\"}",
"TransformType": "template",
"ValueMapping": [],
"XPathMapping": []
},
"Ui": {
"nodeType": "",
"x": 1288,
"y": 737
},
"TypeAlias": "Transform"
},
{
"Id": "32",
"Type": "rate_limit",
"Label": "",
"SuccessTransition": "53",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Action": "skip",
"Limit": 1,
"TimeInterval": 60
},
"Ui": {
"nodeType": "",
"x": 1490,
"y": 1312
},
"TypeAlias": "Rate limit"
},
{
"Id": "33",
"Type": "rest_action",
"Label": "get overview",
"SuccessTransition": "37",
"TimeoutTransition": "",
"ErrorTransition": "32",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Auth": {
"ClientID": "",
"ClientSecret": "",
"Enabled": false,
"GrantType": "basic",
"Password": "",
"Scope": "",
"Url": "",
"Username": ""
},
"Headers": [],
"HeadersVariableName": "headers",
"LogResponse": false,
"Method": "GET",
"RequestPayloadType": "json",
"RequestTemplate": "",
"ResponseMapping": [
{
"IsVariableGlobal": false,
"Name": "",
"Path": "$.armState.statusType",
"PathType": "json",
"TargetVariableName": "current_armState_statusType",
"TargetVariableType": "string"
}
],
"Url": "https://e-api02.verisure.com/xbn/2/installation/{{variable \"installation_giid\" false}}/overview"
},
"Ui": {
"nodeType": "",
"x": 1629,
"y": 1075
},
"TypeAlias": "HTTP msg"
},
{
"Id": "36",
"Type": "if",
"Label": "if alarm armed home",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": [
{
"BooleanOperator": "",
"LeftVariableIsGlobal": false,
"LeftVariableName": "current_armState_statusType",
"Operand": "eq",
"RightVariable": {
"Value": "ARMED_HOME",
"ValueType": "string"
}
}
],
"FalseTransition": "",
"TrueTransition": "50"
},
"Ui": {
"nodeType": "",
"x": 33,
"y": 289
},
"TypeAlias": "If condition"
},
{
"Id": "37",
"Type": "if",
"Label": "if alarm disarmed",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": [
{
"BooleanOperator": "",
"LeftVariableIsGlobal": false,
"LeftVariableName": "current_armState_statusType",
"Operand": "eq",
"RightVariable": {
"Value": "DISARMED",
"ValueType": "string"
}
}
],
"FalseTransition": "39",
"TrueTransition": "44"
},
"Ui": {
"nodeType": "",
"x": 955,
"y": 109
},
"TypeAlias": "If condition"
},
{
"Id": "38",
"Type": "action",
"Label": "Run mode: home",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:cmd/rt:app/rn:vinculum/ad:1",
"Service": "vinculum",
"ServiceInterface": "cmd.pd7.request",
"Config": {
"DefaultValue": {
"Value": {
"cmd": "set",
"component": "mode",
"id": "home",
"param": {},
"requestId": 566
},
"ValueType": "object"
},
"IsVariableGlobal": null,
"Props": null,
"RegisterAsVirtualService": false,
"ResponseToTopic": "pt:j1/mt:rsp/rt:app/rn:tpflow/ad:1",
"VariableName": null,
"VirtualServiceGroup": null,
"VirtualServiceProps": null
},
"Ui": {
"nodeType": "",
"papp": {
"nodeId": "sleep",
"nodeName": "modes",
"nodeType": null
},
"x": 970,
"y": 1157
},
"TypeAlias": "Action"
},
{
"Id": "39",
"Type": "if",
"Label": "if alarm armed away",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": [
{
"BooleanOperator": "",
"LeftVariableIsGlobal": false,
"LeftVariableName": "current_armState_statusType",
"Operand": "eq",
"RightVariable": {
"Value": "ARMED_AWAY",
"ValueType": "string"
}
}
],
"FalseTransition": "36",
"TrueTransition": "45"
},
"Ui": {
"nodeType": "",
"x": 511,
"y": 281
},
"TypeAlias": "If condition"
},
{
"Id": "40",
"Type": "action",
"Label": "Run mode: away",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:cmd/rt:app/rn:vinculum/ad:1",
"Service": "vinculum",
"ServiceInterface": "cmd.pd7.request",
"Config": {
"DefaultValue": {
"Value": {
"cmd": "set",
"component": "mode",
"id": "away",
"param": {},
"requestId": 566
},
"ValueType": "object"
},
"IsVariableGlobal": null,
"Props": null,
"RegisterAsVirtualService": false,
"ResponseToTopic": "pt:j1/mt:rsp/rt:app/rn:tpflow/ad:1",
"VariableName": null,
"VirtualServiceGroup": null,
"VirtualServiceProps": null
},
"Ui": {
"nodeType": "",
"papp": {
"nodeId": "sleep",
"nodeName": "modes",
"nodeType": null
},
"x": 629,
"y": 1152
},
"TypeAlias": "Action"
},
{
"Id": "44",
"Type": "if",
"Label": "if mode home",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "tpflow",
"ServiceInterface": "",
"Config": {
"Expression": [
{
"BooleanOperator": "",
"LeftVariableIsGlobal": true,
"LeftVariableName": "fh.home.mode",
"Operand": "eq",
"RightVariable": {
"Value": "home",
"ValueType": "string"
}
}
],
"FalseTransition": "38",
"TrueTransition": ""
},
"Ui": {
"nodeType": "",
"papp": {
"nodeId": "home",
"nodeName": "If",
"nodeType": "modeTrigger"
},
"x": 962,
"y": 526
},
"TypeAlias": "If condition"
},
{
"Id": "45",
"Type": "if",
"Label": "if mode away",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "tpflow",
"ServiceInterface": "",
"Config": {
"Expression": [
{
"BooleanOperator": "",
"LeftVariableIsGlobal": true,
"LeftVariableName": "fh.home.mode",
"Operand": "eq",
"RightVariable": {
"Value": "away",
"ValueType": "string"
}
}
],
"FalseTransition": "40",
"TrueTransition": ""
},
"Ui": {
"nodeType": "",
"papp": {
"nodeId": "home",
"nodeName": "If",
"nodeType": "modeTrigger"
},
"x": 512,
"y": 535
},
"TypeAlias": "If condition"
},
{
"Id": "46",
"Type": "if",
"Label": "if installation_giid",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": [
{
"BooleanOperator": "",
"LeftVariableIsGlobal": false,
"LeftVariableName": "installation_giid_mapped",
"Operand": "eq",
"RightVariable": {
"Value": "",
"ValueType": "string"
}
}
],
"FalseTransition": "33",
"TrueTransition": "27"
},
"Ui": {
"nodeType": "",
"x": 1638,
"y": 740
},
"TypeAlias": "If condition"
},
{
"Id": "48",
"Type": "transform",
"Label": "installation_giid",
"SuccessTransition": "46",
"TimeoutTransition": "",
"ErrorTransition": "46",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": "",
"IsRVariableGlobal": false,
"LVariableName": "",
"RValue": {
"Value": "",
"ValueType": "string"
},
"RVariableName": "",
"Rtype": "var",
"TargetVariableName": "installation_giid_mapped",
"TargetVariableType": "string",
"Template": "\"{{ variable \"installation_giid\" false }}\"",
"TransformType": "template",
"ValueMapping": [],
"XPathMapping": []
},
"Ui": {
"nodeType": "",
"x": 1636,
"y": 309
},
"TypeAlias": "Transform"
},
{
"Id": "50",
"Type": "if",
"Label": "if mode home",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": [
{
"BooleanOperator": "",
"LeftVariableIsGlobal": true,
"LeftVariableName": "fh.home.mode",
"Operand": "eq",
"RightVariable": {
"Value": "home",
"ValueType": "string"
}
}
],
"FalseTransition": "51",
"TrueTransition": "52"
},
"Ui": {
"nodeType": "",
"x": 28,
"y": 532
},
"TypeAlias": "If condition"
},
{
"Id": "51",
"Type": "iftime",
"Label": "morning",
"SuccessTransition": "44",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": [
{
"Action": "a",
"From": "05:00",
"To": "06:00",
"Weekday": "1"
},
{
"Action": "a",
"From": "05:00",
"To": "06:00",
"Weekday": "2"
},
{
"Action": "a",
"From": "05:00",
"To": "06:00",
"Weekday": "3"
},
{
"Action": "a",
"From": "05:00",
"To": "06:00",
"Weekday": "4"
},
{
"Action": "a",
"From": "05:00",
"To": "06:00",
"Weekday": "5"
},
{
"Action": "a",
"From": "06:00",
"To": "07:00",
"Weekday": "6"
},
{
"Action": "a",
"From": "06:00",
"To": "07:00",
"Weekday": "0"
}
]
},
"Ui": {
"nodeType": "",
"x": 260,
"y": 758
},
"TypeAlias": "Time filter"
},
{
"Id": "52",
"Type": "rate_limit",
"Label": "",
"SuccessTransition": "25",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Action": "skip",
"Limit": 1,
"TimeInterval": 43200
},
"Ui": {
"nodeType": "",
"x": 30,
"y": 756
},
"TypeAlias": "Rate limit"
},
{
"Id": "53",
"Type": "transform",
"Label": "username & password",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "54",
"ErrorTransition": "",
"Config": {
"TargetVariableName": "credentials",
"TargetVariableType": "object",
"IsTargetVariableGlobal": false,
"TransformType": "template",
"Rtype": "var",
"IsRVariableGlobal": false,
"IsLVariableGlobal": false,
"Expression": "",
"RValue": {
"ValueType": "int",
"Value": 0
},
"RVariableName": "",
"LVariableName": "",
"ValueMapping": [],
"XPathMapping": [],
"Template": "{ \"username\": \"{{ setting \"username\" }}\", \"password\": \"{{ setting \"password\" }}\" }"
},
"Ui": {
"x": 1281,
"y": 116,
"nodeType": ""
},
"TypeAlias": "Transform"
},
{
"Id": "54",
"Type": "exec",
"Label": "base64 credentials",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "55",
"ErrorTransition": "",
"Config": {
"ExecType": "python",
"Command": "",
"ScriptBody": "import json\nimport sys\nimport base64\n\ninMsg=json.loads(sys.argv[1])\n\ndef credentials():\n print('{}'.format(\n base64.b64encode(\n 'CPE/{username}:{password}'.format(\n username=inMsg[\"username\"],\n password=inMsg[\"password\"]\n ).encode('utf-8')\n ).decode('utf-8')\n ), end = '')\n\ncredentials()",
"InputVariableName": "credentials",
"IsInputVariableGlobal": false,
"OutputVariableName": "credentials_base64",
"IsOutputVariableGlobal": false,
"IsOutputJson": false,
"IsInputJson": true
},
"Ui": {
"x": 1276,
"y": 262,
"nodeType": ""
},
"TypeAlias": "Run script"
},
{
"Id": "55",
"Type": "transform",
"Label": "set credential header",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "28",
"ErrorTransition": "",
"Config": {
"TargetVariableName": "headers_credentials",
"TargetVariableType": "str_map",
"IsTargetVariableGlobal": false,
"TransformType": "template",
"Rtype": "var",
"IsRVariableGlobal": false,
"Expression": "",
"RValue": {
"ValueType": "int",
"Value": 0
},
"RVariableName": "",
"LVariableName": "",
"ValueMapping": [],
"XPathMapping": [],
"Template": "{ \"Authorization\": \"Basic {{ variable \"credentials_base64\" false }}\", \"Accept\": \"application/json\" }"
},
"Ui": {
"x": 1283,
"y": 425,
"nodeType": ""
},
"TypeAlias": "Transform"
}
],
"Settings": {
"password": {
"Value": "",
"ValueType": "string",
"Key": "password"
},
"username": {
"Value": "",
"ValueType": "string",
"Key": "username"
}
},
"IsDisabled": false,
"IsDefault": false,
"ParallelExecution": "keep_last"
}