Prøver å lage en flow som trigger lys ved bevegelse på dagtid, for så å slå det av igjen, men etter 18.30 på kvelden, kun trigge det på, uten at det går av igjen.
legger ved flow kode og “chart” - noen ideer, inspill eller korreksjoner taes i mot med takk. Merker jeg har store problemer med å forstå når jeg skal bruke int, string og slike ting. prøvd å google litt rundt dette uten å bli klokere. F.eks når en ønsker en spesifikk set.lvl på spotter, bruker en da f.eks string 30?
{
"Id": "qlx2vn7RIWU4m48",
"ClassId": "qlx2vn7RIWU4m48",
"Author": "",
"Version": 0,
"CreatedAt": "2020-12-11T23:36:53.315896057+01:00",
"UpdatedAt": "2020-12-11T23:36:53.315896057+01:00",
"Name": "nightlight",
"Description": "Triggers light on motion, but not at night",
"Nodes": [
{
"Id": "1",
"Type": "trigger",
"Label": "Bevegelsessensor trigget",
"SuccessTransition": "2",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:evt/rt:dev/rn:zw/ad:1/sv:sensor_presence/ad:62_0",
"Service": "sensor_presence",
"ServiceInterface": "evt.presence.report",
"Config": {
"Timeout": 0,
"ConnectorID": "",
"ValueFilter": {
"Value": true,
"ValueType": "bool"
},
"PropFilterName": "",
"PropFilterValue": "",
"ValueJPath": "",
"ValueJPathResultType": "",
"InputVariableType": "",
"IsValueFilterEnabled": true,
"RegisterAsVirtualService": false,
"LookupServiceNameAndLocation": false,
"VirtualServiceGroup": "",
"VirtualServiceProps": null
},
"Ui": {
"x": 552,
"y": 115,
"nodeType": ""
},
"TypeAlias": "Trigger"
},
{
"Id": "2",
"Type": "iftime",
"Label": "Trigger-tidsrom",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "3",
"ErrorTransition": "4",
"Config": {
"Expression": [
{
"Weekday": "1",
"From": "09:00",
"To": "18:30",
"Action": "a"
},
{
"Weekday": "2",
"From": "09:00",
"To": "18:30",
"Action": "a"
},
{
"Weekday": "3",
"From": "09:00",
"To": "18:30",
"Action": "a"
},
{
"Weekday": "4",
"From": "09:00",
"To": "18:30",
"Action": "a"
},
{
"Weekday": "5",
"From": "09:00",
"To": "18:30",
"Action": "a"
},
{
"Weekday": "6",
"From": "09:00",
"To": "18:30",
"Action": "a"
},
{
"Weekday": "0",
"From": "09:00",
"To": "18:30",
"Action": "a"
}
]
},
"Ui": {
"x": 844,
"y": 121,
"nodeType": ""
},
"TypeAlias": "Time filter"
},
{
"Id": "3",
"Type": "if",
"Label": "true",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "",
"ErrorTransition": "",
"Config": {
"TrueTransition": "6",
"FalseTransition": "",
"Expression": [
{
"Operand": "eq",
"LeftVariableName": "",
"LeftVariableIsGlobal": false,
"RightVariable": {
"Value": true,
"ValueType": "bool"
},
"BooleanOperator": ""
}
]
},
"Ui": {
"x": 662,
"y": 304,
"nodeType": ""
},
"TypeAlias": "If condition"
},
{
"Id": "4",
"Type": "if",
"Label": "false",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "",
"ErrorTransition": "",
"Config": {
"TrueTransition": "5",
"FalseTransition": "",
"Expression": [
{
"Operand": "eq",
"LeftVariableName": "",
"LeftVariableIsGlobal": false,
"RightVariable": {
"Value": false,
"ValueType": "bool"
},
"BooleanOperator": ""
}
]
},
"Ui": {
"x": 952,
"y": 301,
"nodeType": ""
},
"TypeAlias": "If condition"
},
{
"Id": "5",
"Type": "action",
"Label": "spotter natt",
"Address": "pt:j1/mt:cmd/rt:dev/rn:zw/ad:1/sv:out_lvl_switch/ad:136_0",
"Service": "out_lvl_switch",
"ServiceInterface": "cmd.lvl.set",
"SuccessTransition": "",
"ErrorTransition": "",
"Config": {
"VariableName": "",
"IsVariableGlobal": false,
"Props": {},
"RegisterAsVirtualService": false,
"VirtualServiceGroup": "",
"VirtualServiceProps": {},
"ResponseToTopic": "",
"DefaultValue": {
"Value": "15",
"ValueType": "string"
}
},
"Ui": {
"x": 963,
"y": 487,
"nodeType": ""
},
"TypeAlias": "Action"
},
{
"Id": "6",
"Type": "action",
"Label": "Spotter dagtid",
"Address": "pt:j1/mt:cmd/rt:dev/rn:zw/ad:1/sv:out_lvl_switch/ad:136_0",
"Service": "out_lvl_switch",
"ServiceInterface": "cmd.lvl.set",
"SuccessTransition": "7",
"ErrorTransition": "",
"Config": {
"VariableName": "",
"IsVariableGlobal": false,
"Props": {},
"RegisterAsVirtualService": false,
"VirtualServiceGroup": "",
"VirtualServiceProps": {},
"ResponseToTopic": "",
"DefaultValue": {
"Value": "30",
"ValueType": "string"
}
},
"Ui": {
"x": 657,
"y": 492,
"nodeType": ""
},
"TypeAlias": "Action"
},
{
"Id": "7",
"Type": "wait",
"Label": "10min deteksjonstid",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "8",
"ErrorTransition": "",
"Config": 1000,
"Ui": {
"x": 653,
"y": 694,
"nodeType": ""
},
"TypeAlias": "Delay"
},
{
"Id": "8",
"Type": "action",
"Label": "spotter av",
"Address": "pt:j1/mt:cmd/rt:dev/rn:zw/ad:1/sv:out_lvl_switch/ad:136_0",
"Service": "out_lvl_switch",
"ServiceInterface": "cmd.binary.set",
"SuccessTransition": "",
"ErrorTransition": "",
"Config": {
"VariableName": "",
"IsVariableGlobal": false,
"Props": {},
"RegisterAsVirtualService": false,
"VirtualServiceGroup": "",
"VirtualServiceProps": {},
"ResponseToTopic": "",
"DefaultValue": {
"Value": false,
"ValueType": "bool"
}
},
"Ui": {
"x": 961,
"y": 686,
"nodeType": ""
},
"TypeAlias": "Action"
}
],
"Settings": null,
"IsDisabled": false,
"IsDefault": false,
"ParallelExecution": ""
}