Varsel på vaskemaskin

aiai! Ser jeg glemte å oppdatere her - beklager.
Jeg har hatt denne kjørende en stund nå og ser ut til å fungere ganske greit :slight_smile:

{
  "Id": "ZieE3OvTZd47GgB",
  "ClassId": "decJFbJQSoRJYnp",
  "Author": "espenh.no",
  "Version": 3,
  "CreatedAt": "2021-05-20T20:10:16.454511656+02:00",
  "UpdatedAt": "2021-05-20T20:12:22.678213817+02:00",
  "Name": "notify when washer is finished",
  "Group": "meter_elec",
  "Description": "change address on trigger node",
  "Nodes": [
    {
      "Id": "2",
      "Type": "if",
      "Label": "less than 5W & started is true",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "BooleanOperator": "and",
            "LeftVariableIsGlobal": false,
            "LeftVariableName": "",
            "Operand": "lt",
            "RightVariable": {
              "Value": 5,
              "ValueType": "float"
            }
          },
          {
            "BooleanOperator": "",
            "LeftVariableIsGlobal": false,
            "LeftVariableName": "started",
            "Operand": "eq",
            "RightVariable": {
              "Value": true,
              "ValueType": "bool"
            }
          }
        ],
        "FalseTransition": "",
        "TrueTransition": "7"
      },
      "Ui": {
        "nodeType": "",
        "x": 553,
        "y": 502
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "6",
      "Type": "action",
      "Label": "Publish timeline - finished",
      "SuccessTransition": "23",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:cmd/rt:app/rn:time_owl/ad:1",
      "Service": "time_owl",
      "ServiceInterface": "cmd.timeline.set",
      "Config": {
        "DefaultValue": {
          "Value": {
            "message_en": "Washer finished!",
            "message_no": "-Vaskemaskinen er ferdig!",
            "sender": "flow"
          },
          "ValueType": "str_map"
        },
        "IsVariableGlobal": false,
        "Props": {},
        "RegisterAsVirtualService": false,
        "VariableName": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "timeline_action",
        "x": 563,
        "y": 815
      },
      "TypeAlias": "Timeline"
    },
    {
      "Id": "7",
      "Type": "wait",
      "Label": "wait 5 min - new report will cancel the timer",
      "SuccessTransition": "6",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": 300000,
      "Ui": {
        "nodeType": "",
        "x": 557,
        "y": 661
      },
      "TypeAlias": "Delay"
    },
    {
      "Id": "21",
      "Type": "trigger",
      "Label": "meter_elec report",
      "SuccessTransition": "33",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:evt/rt:dev/rn:zw/ad:1/sv:meter_elec/ad:55_0",
      "Service": "meter_elec",
      "ServiceInterface": "evt.meter.report",
      "Config": {
        "IsValueFilterEnabled": false,
        "LookupServiceNameAndLocation": false,
        "PropFilterName": "unit",
        "PropFilterValue": "W",
        "RegisterAsVirtualService": false,
        "Timeout": 0,
        "ValueFilter": {
          "Value": "",
          "ValueType": ""
        },
        "VirtualServiceGroup": "ch_0",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "",
        "x": 442,
        "y": 174
      },
      "TypeAlias": "Trigger"
    },
    {
      "Id": "23",
      "Type": "action",
      "Label": "Push notification - finished",
      "SuccessTransition": "31",
      "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": "Vaskemaskinen er ferdig!"
          },
          "ValueType": "object"
        },
        "IsVariableGlobal": false,
        "Props": {},
        "RegisterAsVirtualService": false,
        "VariableName": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "notification_action",
        "x": 566,
        "y": 967
      },
      "TypeAlias": "Notification"
    },
    {
      "Id": "29",
      "Type": "set_variable",
      "Label": "set started to true",
      "SuccessTransition": "32",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "DefaultValue": {
          "Value": true,
          "ValueType": "bool"
        },
        "Name": "started",
        "UpdateGlobal": false,
        "UpdateInputMsg": false
      },
      "Ui": {
        "nodeType": "",
        "x": 291,
        "y": 492
      },
      "TypeAlias": "Set variable"
    },
    {
      "Id": "31",
      "Type": "set_variable",
      "Label": "set started to false",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "DefaultValue": {
          "Value": false,
          "ValueType": "bool"
        },
        "Name": "started",
        "UpdateGlobal": false,
        "UpdateInputMsg": false
      },
      "Ui": {
        "nodeType": "",
        "x": 568,
        "y": 1117
      },
      "TypeAlias": "Set variable"
    },
    {
      "Id": "32",
      "Type": "action",
      "Label": "Publish timeline - started",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "pt:j1/mt:cmd/rt:app/rn:time_owl/ad:1",
      "Service": "time_owl",
      "ServiceInterface": "cmd.timeline.set",
      "Config": {
        "DefaultValue": {
          "Value": {
            "message_en": "Washer started!",
            "message_no": "-Vaskemaskinen er startet!",
            "sender": "flow"
          },
          "ValueType": "str_map"
        },
        "IsVariableGlobal": false,
        "Props": {},
        "RegisterAsVirtualService": false,
        "VariableName": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "timeline_action",
        "x": 286,
        "y": 652
      },
      "TypeAlias": "Timeline"
    },
    {
      "Id": "33",
      "Type": "if",
      "Label": "if over 6W & started is false",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "BooleanOperator": "and",
            "LeftVariableIsGlobal": false,
            "LeftVariableName": "",
            "Operand": "gt",
            "RightVariable": {
              "Value": 6,
              "ValueType": "float"
            }
          },
          {
            "BooleanOperator": "",
            "LeftVariableIsGlobal": false,
            "LeftVariableName": "started",
            "Operand": "eq",
            "RightVariable": {
              "Value": false,
              "ValueType": "bool"
            }
          }
        ],
        "FalseTransition": "2",
        "TrueTransition": "29"
      },
      "Ui": {
        "nodeType": "",
        "x": 430,
        "y": 341
      },
      "TypeAlias": "If condition"
    }
  ],
  "Settings": {
    "dev.address": {
      "Value": "55",
      "ValueType": "string"
    }
  },
  "IsDisabled": false,
  "IsDefault": false,
  "ParallelExecution": "keep_last"
}
1 Like