"Smart plug" styring. 5 min på deretter 5 min av osv

Har forsøkt å lage en flow som repeterer en sekvens med 5 min på deretter 5 min av for en Fibaro smart plug. Dette for å styre(redusere effekten) forbruket på en isoterm varmekabel på vannrør. Den justeres ikke automatisk av temperaturen. Laget 3 snarveier med hhv “plug av”, “plug på” og “plug standby” for å veksle mellom disse snarveiene uten hell. Noen som har noen tips?

Hei,

Denne må du lage i thingsplex for å få til.
Har laget et lite eksempel her, bare bytt ut Timeline nodene, med actionnoder for den aktuelle pluggen

{
  "Id": "mk2BxthcuXrkurf",
  "ClassId": "mk2BxthcuXrkurf",
  "Author": "PZ-home",
  "Version": 0,
  "CreatedAt": "2022-12-27T14:22:32.674692912+01:00",
  "UpdatedAt": "2022-12-27T14:34:45.220895983+01:00",
  "Name": "duty cycle",
  "Group": "test",
  "Description": "",
  "Nodes": [
    {
      "Id": "2",
      "Type": "time_trigger",
      "Label": "Every 1 min",
      "SuccessTransition": "3",
      "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": 559,
        "y": 135
      },
      "TypeAlias": "Time trigger"
    },
    {
      "Id": "3",
      "Type": "if",
      "Label": "if state on",
      "SuccessTransition": "",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "Expression": [
          {
            "BooleanOperator": "",
            "LeftVariableIsGlobal": false,
            "LeftVariableName": "state",
            "Operand": "eq",
            "RightVariable": {
              "Value": "on",
              "ValueType": "string"
            }
          }
        ],
        "FalseTransition": "4",
        "TrueTransition": "7"
      },
      "Ui": {
        "nodeType": "",
        "x": 580,
        "y": 368
      },
      "TypeAlias": "If condition"
    },
    {
      "Id": "4",
      "Type": "set_variable",
      "Label": "state on",
      "SuccessTransition": "5",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "DefaultValue": {
          "Value": "on",
          "ValueType": "string"
        },
        "IsVariableInMemory": true,
        "Name": "state",
        "UpdateGlobal": false,
        "UpdateInputMsg": false
      },
      "Ui": {
        "nodeType": "",
        "x": 786,
        "y": 574
      },
      "TypeAlias": "Set variable"
    },
    {
      "Id": "5",
      "Type": "action",
      "Label": "Publish timeline ON",
      "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": "ON",
            "message_no": "PÅ",
            "sender": "flow"
          },
          "ValueType": "str_map"
        },
        "IsVariableGlobal": false,
        "Props": {},
        "RegisterAsVirtualService": false,
        "VariableName": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "timeline_action",
        "x": 797,
        "y": 752
      },
      "TypeAlias": "Timeline"
    },
    {
      "Id": "6",
      "Type": "action",
      "Label": "Publish timeline OFF",
      "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": "OFF",
            "message_no": "AV",
            "sender": "flow"
          },
          "ValueType": "str_map"
        },
        "IsVariableGlobal": false,
        "Props": {},
        "RegisterAsVirtualService": false,
        "VariableName": "",
        "VirtualServiceGroup": "",
        "VirtualServiceProps": {}
      },
      "Ui": {
        "nodeType": "timeline_action",
        "x": 481,
        "y": 731
      },
      "TypeAlias": "Timeline"
    },
    {
      "Id": "7",
      "Type": "set_variable",
      "Label": "state off",
      "SuccessTransition": "6",
      "TimeoutTransition": "",
      "ErrorTransition": "",
      "Address": "",
      "Service": "",
      "ServiceInterface": "",
      "Config": {
        "DefaultValue": {
          "Value": "off",
          "ValueType": "string"
        },
        "IsVariableInMemory": true,
        "Name": "state",
        "UpdateGlobal": false,
        "UpdateInputMsg": false
      },
      "Ui": {
        "nodeType": "",
        "x": 494,
        "y": 553
      },
      "TypeAlias": "Set variable"
    }
  ],
  "Settings": null,
  "IsDisabled": false,
  "IsDefault": false,
  "ParallelExecution": "parallel"
}

Tusen takk for rask hjelp:-)
Det er nok noe jeg ikke forstår her ettersom jeg ikke får dette til å fungere. Byttet ut Timeline nodene med en “Generic” action node med henvisning til rommet, pluggen og variabelen On/off. Vedlagte kode ble generert men får følgende feilmelding “error flow Node if state on failed with error: error updating left variable: record not found”

{
“Id”: “xdzBieIYQcLyBda”,
“ClassId”: “mk2BxthcuXrkurf”,
“Author”: “PZ-home”,
“Version”: 0,
“CreatedAt”: “2022-12-28T19:01:00.111376102+01:00”,
“UpdatedAt”: “2022-12-28T19:05:38.167690046+01:00”,
“Name”: “duty cycle”,
“Group”: “test”,
“Description”: “”,
“Nodes”: [
{
“Id”: “2”,
“Type”: “time_trigger”,
“Label”: “Every 1 min”,
“SuccessTransition”: “3”,
“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”: 559,
“y”: 135
},
“TypeAlias”: “Time trigger”
},
{
“Id”: “3”,
“Type”: “if”,
“Label”: “if state on”,
“SuccessTransition”: “”,
“TimeoutTransition”: “”,
“ErrorTransition”: “”,
“Address”: “”,
“Service”: “”,
“ServiceInterface”: “”,
“Config”: {
“Expression”: [
{
“BooleanOperator”: “”,
“LeftVariableIsGlobal”: false,
“LeftVariableName”: “state”,
“Operand”: “eq”,
“RightVariable”: {
“Value”: “on”,
“ValueType”: “string”
}
}
],
“FalseTransition”: “4”,
“TrueTransition”: “7”
},
“Ui”: {
“nodeType”: “”,
“x”: 580,
“y”: 368
},
“TypeAlias”: “If condition”
},
{
“Id”: “4”,
“Type”: “set_variable”,
“Label”: “state on”,
“SuccessTransition”: “9”,
“TimeoutTransition”: “”,
“ErrorTransition”: “”,
“Address”: “”,
“Service”: “”,
“ServiceInterface”: “”,
“Config”: {
“DefaultValue”: {
“Value”: “on”,
“ValueType”: “string”
},
“IsVariableInMemory”: true,
“Name”: “state”,
“UpdateGlobal”: false,
“UpdateInputMsg”: false
},
“Ui”: {
“nodeType”: “”,
“x”: 786,
“y”: 574
},
“TypeAlias”: “Set variable”
},
{
“Id”: “7”,
“Type”: “set_variable”,
“Label”: “state off”,
“SuccessTransition”: “8”,
“TimeoutTransition”: “”,
“ErrorTransition”: “”,
“Address”: “”,
“Service”: “”,
“ServiceInterface”: “”,
“Config”: {
“DefaultValue”: {
“Value”: “off”,
“ValueType”: “string”
},
“IsVariableInMemory”: true,
“Name”: “state”,
“UpdateGlobal”: false,
“UpdateInputMsg”: false
},
“Ui”: {
“nodeType”: “”,
“x”: 494,
“y”: 553
},
“TypeAlias”: “Set variable”
},
{
“Id”: “8”,
“Type”: “action”,
“Label”: “Turn OFF”,
“SuccessTransition”: “”,
“TimeoutTransition”: “”,
“ErrorTransition”: “”,
“Address”: “pt:j1/mt:cmd/rt:dev/rn:zw/ad:1/sv:out_bin_switch/ad:22_0”,
“Service”: “out_bin_switch”,
“ServiceInterface”: “cmd.binary.set”,
“Config”: {
“DefaultValue”: {
“Value”: “”,
“ValueType”: “bool”
},
“IsVariableGlobal”: false,
“Props”: {},
“RegisterAsVirtualService”: false,
“ResponseToTopic”: “”,
“VariableName”: “”,
“VirtualServiceGroup”: “”,
“VirtualServiceProps”: {}
},
“Ui”: {
“nodeType”: “”,
“x”: 451,
“y”: 717
},
“TypeAlias”: “Action”
},
{
“Id”: “9”,
“Type”: “action”,
“Label”: “Turn ON”,
“SuccessTransition”: “”,
“TimeoutTransition”: “”,
“ErrorTransition”: “”,
“Address”: “pt:j1/mt:cmd/rt:dev/rn:zw/ad:1/sv:out_bin_switch/ad:22_0”,
“Service”: “out_bin_switch”,
“ServiceInterface”: “cmd.binary.set”,
“Config”: {
“DefaultValue”: {
“Value”: “”,
“ValueType”: “bool”
},
“IsVariableGlobal”: false,
“Props”: {},
“RegisterAsVirtualService”: false,
“ResponseToTopic”: “”,
“VariableName”: “”,
“VirtualServiceGroup”: “”,
“VirtualServiceProps”: {}
},
“Ui”: {
“nodeType”: “”,
“x”: 745,
“y”: 735
},
“TypeAlias”: “Action”
}
],
“Settings”: null,
“IsDisabled”: true,
“IsDefault”: false,
“ParallelExecution”: “parallel”
}

Kan du prøve å legge dette ut på nytt. Men da i preformated text? Heilt umulig å følge koden sån som den er nå :stuck_out_tongue:

Ser ut som du har glemt å legge inn value i actionnodene
Value_type: Bool
val: true eller false

Også må du opprette variablen
Åpne flowen og trykk på en av Set Variable nodene


Close og Save

Takker for hjelpen. Nå fungerer det:-)

1 Like