Here is a copy of my code: It shouldn’t do very much, simply turn off the relay at 1am and also check the state of the relay. I have the timerswitch function disabled currently as I’d like to use that to do some more complex scheduling.
[
{
"id": "b46453c2d2eaa59f",
"type": "tab",
"label": "Relay Control Starlink",
"disabled": false,
"info": "",
"env": []
},
{
"id": "1f0c091eb53c3e12",
"type": "debug",
"z": "b46453c2d2eaa59f",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 430,
"y": 20,
"wires": []
},
{
"id": "441797691fafa522",
"type": "victron-output-relay",
"z": "b46453c2d2eaa59f",
"service": "com.victronenergy.system/0",
"path": "/Relay/1/State",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "Venus device"
},
"pathObj": {
"path": "/Relay/1/State",
"type": "enum",
"name": "Venus relay 2 state",
"enum": {
"0": "Open",
"1": "Closed"
},
"writable": true
},
"initial": "",
"name": "GX Relay 2",
"onlyChanges": false,
"x": 510,
"y": 120,
"wires": []
},
{
"id": "6c666c601d7a7a9d",
"type": "victron-input-relay",
"z": "b46453c2d2eaa59f",
"service": "com.victronenergy.system/0",
"path": "/Relay/1/State",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "Venus system"
},
"pathObj": {
"path": "/Relay/1/State",
"type": "enum",
"name": "Venus relay 2 state",
"enum": {
"0": "Open",
"1": "Closed"
}
},
"initial": "",
"name": "Relay 2 State",
"onlyChanges": true,
"x": 110,
"y": 220,
"wires": [
[
"1f0c091eb53c3e12"
]
]
},
{
"id": "89c7c02b477a1e74",
"type": "change",
"z": "b46453c2d2eaa59f",
"name": "",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "on",
"fromt": "str",
"to": "1",
"tot": "num"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "off",
"fromt": "str",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 280,
"y": 120,
"wires": [
[
"441797691fafa522",
"1f0c091eb53c3e12"
]
]
},
{
"id": "ef24a18303204059",
"type": "timerswitch",
"z": "b46453c2d2eaa59f",
"name": "",
"ontopic": "",
"offtopic": "",
"onpayload": "on",
"offpayload": "off",
"disabled": true,
"schedules": [
{
"on_h": "21",
"on_m": "56",
"on_s": "10",
"off_h": "21",
"off_m": "56",
"off_s": "28",
"valid": true
}
],
"x": 90,
"y": 120,
"wires": [
[
"89c7c02b477a1e74",
"1f0c091eb53c3e12"
]
]
},
{
"id": "17e5683320863df5",
"type": "inject",
"z": "b46453c2d2eaa59f",
"name": "Turn off SL at 1AM",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "00 01 * * *",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0",
"payloadType": "num",
"x": 140,
"y": 20,
"wires": [
[
"1f0c091eb53c3e12",
"441797691fafa522"
]
]
}
]