Hey! Im new to this and I am trying to change my flow to send a notification/comment to the timeline. I have managed to get the push-notification working, but I can’t seem to figure out timeline issue.
I do not have the option of choosing "timeline_rec(str_map) on “Transform” or “Template” nod.
This is the Transform nod, what is supposed to be here?
and this is the Template nod:
I am obviously doing something wrong!
Source code:
{
"Id": "16e87d60-53b3-11ed-84a2-5f2c9c94baa1",
"ClassId": "16e87d60-53b3-11ed-84a2-5f2c9c94baa1",
"Author": "jallaj@hotmail.com",
"Version": 0,
"CreatedAt": "2022-10-24T15:46:56.694899Z",
"UpdatedAt": "2022-10-24T21:30:00.028177825+02:00",
"Name": "når strømprisen er 10% lavere enn daglig gjennomsnitt og modusen er søvn",
"Group": "energy_price",
"Description": "Varmtvannsbereder slås på\nellers\nVarmtvannsbereder slås av\n",
"Nodes": [
{
"Id": "c42575dd-1499-48be-aa1d-1586fdc66b41",
"Type": "trigger",
"Label": "strømprisen er 10% lavere enn daglig gjennomsnitt",
"SuccessTransition": "1",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:evt/rt:app/rn:energy_guard/ad:1",
"Service": "energy_price",
"ServiceInterface": "evt.energy_price.report",
"Config": {
"InputVariableType": null,
"IsValueFilterEnabled": false,
"LookupServiceNameAndLocation": false,
"PropFilterName": "",
"PropFilterValue": "",
"RegisterAsVirtualService": false,
"Timeout": 0,
"ValueFilter": {
"Value": null,
"ValueType": null
},
"ValueJPath": null,
"ValueJPathResultType": null,
"VirtualServiceGroup": "",
"VirtualServiceProps": {}
},
"Ui": {
"nodeType": "",
"papp": {
"customValues": null,
"nodeId": null,
"nodeName": "energy",
"nodeType": "energy"
},
"x": 100,
"y": 200
},
"TypeAlias": "Trigger"
},
{
"Id": "1",
"Type": "transform",
"Label": "get average",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": "",
"IsLVariableGlobal": false,
"IsRVariableGlobal": false,
"IsTargetVariableGlobal": false,
"IsTargetVariableInMemory": false,
"LVariableName": "",
"RValue": {
"Value": 0,
"ValueType": "int"
},
"RVariableName": "",
"Rtype": "var",
"TargetVariableName": "",
"TargetVariableType": "",
"Template": "",
"TransformType": "jpath",
"ValueMapping": [],
"XPathMapping": [
{
"Path": "$.average",
"TargetVariableName": "average",
"TargetVariableType": "int",
"UpdateInputVariable": false
}
]
},
"Ui": {
"nodeType": "",
"papp": {
"customValues": null,
"nodeId": null,
"nodeName": "value",
"nodeType": "energy"
},
"x": 100,
"y": 400
},
"TypeAlias": "Transform"
},
{
"Id": "2",
"Type": "trigger",
"Label": "",
"SuccessTransition": "3",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:evt/rt:app/rn:energy_guard/ad:1",
"Service": "energy_price",
"ServiceInterface": "evt.energy_price.report",
"Config": {
"InputVariableType": null,
"IsValueFilterEnabled": false,
"LookupServiceNameAndLocation": false,
"PropFilterName": "",
"PropFilterValue": "",
"RegisterAsVirtualService": false,
"Timeout": 0,
"ValueFilter": {
"Value": null,
"ValueType": null
},
"ValueJPath": null,
"ValueJPathResultType": null,
"VirtualServiceGroup": "",
"VirtualServiceProps": {}
},
"Ui": {
"nodeType": "",
"papp": {
"customValues": null,
"nodeId": null,
"nodeName": "energy",
"nodeType": "energy"
},
"x": 500,
"y": 200
},
"TypeAlias": "Trigger"
},
{
"Id": "3",
"Type": "transform",
"Label": "get price",
"SuccessTransition": "4",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": "",
"IsLVariableGlobal": false,
"IsRVariableGlobal": false,
"IsTargetVariableGlobal": false,
"IsTargetVariableInMemory": false,
"LVariableName": "",
"RValue": {
"Value": 0,
"ValueType": "int"
},
"RVariableName": "",
"Rtype": "var",
"TargetVariableName": "",
"TargetVariableType": "",
"Template": "",
"TransformType": "jpath",
"ValueMapping": [],
"XPathMapping": [
{
"Path": "$.price",
"TargetVariableName": "price",
"TargetVariableType": "int",
"UpdateInputVariable": false
}
]
},
"Ui": {
"nodeType": "",
"papp": {
"customValues": null,
"nodeId": null,
"nodeName": "value",
"nodeType": "energy"
},
"x": 500,
"y": 400
},
"TypeAlias": "Transform"
},
{
"Id": "4",
"Type": "wait",
"Label": "Wait 1s for variable",
"SuccessTransition": "5",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": 1000,
"Ui": {
"nodeType": "",
"papp": {
"customValues": null,
"nodeId": null,
"nodeName": "wait",
"nodeType": "energy"
},
"x": 500,
"y": 700
},
"TypeAlias": "Delay"
},
{
"Id": "5",
"Type": "transform",
"Label": "price - (average * 0.9)",
"SuccessTransition": "6",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": "price - (average * 0.9)",
"IsLVariableGlobal": false,
"IsRVariableGlobal": false,
"IsTargetVariableGlobal": false,
"IsTargetVariableInMemory": false,
"LVariableName": "average",
"RValue": {
"Value": 0,
"ValueType": "float"
},
"RVariableName": "",
"Rtype": "var",
"TargetVariableName": "difference",
"TargetVariableType": "float",
"Template": "",
"TransformType": "calc",
"ValueMapping": [],
"XPathMapping": []
},
"Ui": {
"nodeType": "",
"papp": {
"customValues": {
"flow_part": "main",
"node_type": "transform_calc",
"threshold": 0.1
},
"nodeId": null,
"nodeName": "value",
"nodeType": "energy"
},
"x": 500,
"y": 900
},
"TypeAlias": "Transform"
},
{
"Id": "6",
"Type": "if",
"Label": "difference lt 0",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"Config": {
"Expression": [
{
"BooleanOperator": "",
"LeftVariableIsGlobal": false,
"LeftVariableName": "difference",
"Operand": "lt",
"RightVariable": {
"Value": 0,
"ValueType": "float"
}
}
],
"FalseTransition": "22",
"TrueTransition": "7"
},
"Ui": {
"nodeType": "",
"papp": {
"customValues": {
"flow_part": "main",
"node_type": "if_diff"
},
"nodeId": null,
"nodeName": "If",
"nodeType": "If"
},
"x": 500,
"y": 1100
},
"TypeAlias": "If condition"
},
{
"Id": "7",
"Type": "if",
"Label": "og modusen er søvn",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "tpflow",
"ServiceInterface": "",
"Config": {
"Expression": [
{
"BooleanOperator": "",
"LeftVariableIsGlobal": true,
"LeftVariableName": "fh.home.mode",
"Operand": "eq",
"RightVariable": {
"Value": "sleep",
"ValueType": "string"
}
}
],
"FalseTransition": "",
"TrueTransition": "ec1b6bfa-391b-4101-af37-ee3fa89943fc"
},
"Ui": {
"nodeType": "",
"papp": {
"customValues": {
"flow_part": "main"
},
"nodeId": "sleep",
"nodeName": "If",
"nodeType": "modeTrigger"
},
"x": 500,
"y": 1300
},
"TypeAlias": "If condition"
},
{
"Id": "22",
"Type": "if",
"Label": "og modusen er søvn",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "",
"Service": "tpflow",
"ServiceInterface": "",
"Config": {
"Expression": [
{
"BooleanOperator": "",
"LeftVariableIsGlobal": true,
"LeftVariableName": "fh.home.mode",
"Operand": "eq",
"RightVariable": {
"Value": "sleep",
"ValueType": "string"
}
}
],
"FalseTransition": "",
"TrueTransition": "b4a8eeab-8c5d-43b4-ba0d-6b6cac1937c7"
},
"Ui": {
"nodeType": "",
"papp": {
"customValues": {
"flow_part": "reverse"
},
"nodeId": "sleep",
"nodeName": "If",
"nodeType": "modeTrigger"
},
"x": 900,
"y": 1300
},
"TypeAlias": "If condition"
},
{
"Id": "ec1b6bfa-391b-4101-af37-ee3fa89943fc",
"Type": "action",
"Label": "Varmtvannsbereder slås på",
"SuccessTransition": "23",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:cmd/rt:dev/rn:zigbee/ad:1/sv:out_bin_switch/ad:1_1",
"Service": "out_bin_switch",
"ServiceInterface": "cmd.binary.set",
"Config": {
"DefaultValue": {
"Value": true,
"ValueType": "bool"
},
"IsVariableGlobal": false,
"LookupServiceNameAndLocation": false,
"Props": {},
"RegisterAsVirtualService": false,
"ResponseToTopic": null,
"VariableName": "",
"VirtualServiceGroup": "ch_0",
"VirtualServiceProps": {}
},
"Ui": {
"nodeType": "",
"papp": {
"customValues": null,
"nodeId": "1",
"nodeName": "device",
"nodeType": "deviceAction"
},
"x": 500,
"y": 1500
},
"TypeAlias": "Action",
"LastValue": false
},
{
"Id": "b4a8eeab-8c5d-43b4-ba0d-6b6cac1937c7",
"Type": "action",
"Label": "Varmtvannsbereder slås av",
"SuccessTransition": "26",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:cmd/rt:dev/rn:zigbee/ad:1/sv:out_bin_switch/ad:1_1",
"Service": "out_bin_switch",
"ServiceInterface": "cmd.binary.set",
"Config": {
"DefaultValue": {
"Value": false,
"ValueType": "bool"
},
"IsVariableGlobal": false,
"LookupServiceNameAndLocation": false,
"Props": {},
"RegisterAsVirtualService": false,
"ResponseToTopic": null,
"VariableName": "",
"VirtualServiceGroup": "ch_0",
"VirtualServiceProps": {}
},
"Ui": {
"nodeType": "",
"papp": {
"customValues": {
"flow_part": "reverse"
},
"nodeId": "1",
"nodeName": "device",
"nodeType": "energyReverseDeviceAction"
},
"x": 900,
"y": 1500
},
"TypeAlias": "Action",
"LastValue": false
},
{
"Id": "23",
"Type": "action",
"Label": "Varmtvannsbereder på - 10% søvn push",
"SuccessTransition": "27",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:evt/rt:app/rn:kind_owl/ad:1",
"Service": "kind-owl",
"ServiceInterface": "evt.notification.report",
"Config": {
"DefaultValue": {
"Value": {
"EventName": "custom",
"MessageContent": "Varmtvannsbereder på - 10% søvn push",
"SiteId": "d4bf02cb-6d54-476c-8106-61c1f9806262"
},
"ValueType": "object"
},
"IsVariableGlobal": false,
"Props": {},
"RegisterAsVirtualService": false,
"VariableName": "",
"VirtualServiceGroup": "",
"VirtualServiceProps": {}
},
"Ui": {
"nodeType": "notification_action",
"x": 572,
"y": 1686
},
"TypeAlias": "Notification"
},
{
"Id": "26",
"Type": "action",
"Label": "Varmtvannsbereder av - 10% søvn push",
"SuccessTransition": "29",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:evt/rt:app/rn:kind_owl/ad:1",
"Service": "kind-owl",
"ServiceInterface": "evt.notification.report",
"Config": {
"DefaultValue": {
"Value": {
"EventName": "custom",
"MessageContent": "Varmtvannsbereder av - 10% søvn push",
"SiteId": "d4bf02cb-6d54-476c-8106-61c1f9806262"
},
"ValueType": "object"
},
"IsVariableGlobal": false,
"Props": {},
"RegisterAsVirtualService": false,
"VariableName": "",
"VirtualServiceGroup": "",
"VirtualServiceProps": {}
},
"Ui": {
"nodeType": "notification_action",
"x": 933,
"y": 1675
},
"TypeAlias": "Notification"
},
{
"Id": "27",
"Type": "transform",
"Label": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "28",
"ErrorTransition": "",
"Config": {
"TargetVariableName": "",
"TargetVariableType": "",
"IsTargetVariableGlobal": false,
"IsTargetVariableInMemory": true,
"TransformType": "template",
"Rtype": "var",
"IsRVariableGlobal": false,
"IsLVariableGlobal": false,
"Expression": "",
"RValue": {
"ValueType": "int",
"Value": 0
},
"RVariableName": "",
"LVariableName": "",
"ValueMapping": [],
"XPathMapping": [],
"Template": ""
},
"Ui": {
"x": 617,
"y": 1911,
"nodeType": ""
},
"TypeAlias": "Transform"
},
{
"Id": "28",
"Type": "action",
"Label": "Publish timeline",
"Address": "pt:j1/mt:cmd/rt:app/rn:time_owl/ad:1",
"Service": "time_owl",
"ServiceInterface": "cmd.timeline.set",
"SuccessTransition": "",
"ErrorTransition": "",
"Config": {
"VariableName": "",
"IsVariableGlobal": false,
"Props": {},
"RegisterAsVirtualService": false,
"VirtualServiceGroup": "",
"VirtualServiceProps": {},
"DefaultValue": {
"Value": {
"message_en": "",
"message_no": "Varmtvannsbereder på - 10% søvn",
"sender": "flow"
},
"ValueType": "str_map"
}
},
"Ui": {
"x": 673,
"y": 2113,
"nodeType": "timeline_action"
},
"TypeAlias": "Timeline"
},
{
"Id": "29",
"Type": "transform",
"Label": "",
"Address": "",
"Service": "",
"ServiceInterface": "",
"SuccessTransition": "30",
"ErrorTransition": "",
"Config": {
"TargetVariableName": "",
"TargetVariableType": "",
"IsTargetVariableGlobal": false,
"IsTargetVariableInMemory": true,
"TransformType": "template",
"Rtype": "var",
"IsRVariableGlobal": false,
"IsLVariableGlobal": false,
"Expression": "",
"RValue": {
"ValueType": "int",
"Value": 0
},
"RVariableName": "",
"LVariableName": "",
"ValueMapping": [],
"XPathMapping": [],
"Template": ""
},
"Ui": {
"x": 959,
"y": 1894,
"nodeType": ""
},
"TypeAlias": "Transform"
},
{
"Id": "30",
"Type": "action",
"Label": "Publish timeline",
"Address": "pt:j1/mt:cmd/rt:app/rn:time_owl/ad:1",
"Service": "time_owl",
"ServiceInterface": "cmd.timeline.set",
"SuccessTransition": "",
"ErrorTransition": "",
"Config": {
"VariableName": "",
"IsVariableGlobal": false,
"Props": {},
"RegisterAsVirtualService": false,
"VirtualServiceGroup": "",
"VirtualServiceProps": {},
"DefaultValue": {
"Value": {
"message_en": "",
"message_no": "Varmtvannsbereder av - 10% søvn",
"sender": "flow"
},
"ValueType": "str_map"
}
},
"Ui": {
"x": 1043,
"y": 2103,
"nodeType": "timeline_action"
},
"TypeAlias": "Timeline"
}
],
"Settings": null,
"IsDisabled": false,
"IsDefault": false,
"ParallelExecution": "parallel"
}