Check this sorry posted the wrong flow 3 f*** times…
[
{
"id": "c55e80c9.cc966",
"type": "and-gate",
"z": "713f9364.9c34cc",
"name": "",
"rules": [
{
"t": "eq",
"v": "ON",
"vt": "str",
"propertyType": "msg",
"property": "payload",
"topic": "darkpress"
},
{
"t": "eq",
"v": "ON",
"vt": "str",
"propertyType": "msg",
"property": "payload",
"topic": "darkpress1"
}
],
"outputTopic": "result",
"gateType": "and",
"emitOnlyIfTrue": true,
"x": 624,
"y": 115,
"wires": [
[
"1db65217.b826ae"
]
]
},
{
"id": "543a974.a614868",
"type": "inject",
"z": "713f9364.9c34cc",
"name": "",
"topic": "darkpress",
"payload": "ON",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"x": 364.5,
"y": 41,
"wires": [
[
"c55e80c9.cc966"
]
]
},
{
"id": "33939d4d.674112",
"type": "inject",
"z": "713f9364.9c34cc",
"name": "",
"topic": "darkpress1",
"payload": "ON",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"x": 372,
"y": 163,
"wires": [
[
"c55e80c9.cc966"
]
]
},
{
"id": "1db65217.b826ae",
"type": "debug",
"z": "713f9364.9c34cc",
"name": "",
"active": true,
"console": "false",
"complete": "false",
"x": 812.5,
"y": 111,
"wires": []
},
{
"id": "d3ac2556.f603e8",
"type": "inject",
"z": "713f9364.9c34cc",
"name": "",
"topic": "darkpress",
"payload": "OFF",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"x": 374,
"y": 75,
"wires": [
[
"c55e80c9.cc966"
]
]
},
{
"id": "bfe20cc4.cc186",
"type": "inject",
"z": "713f9364.9c34cc",
"name": "",
"topic": "darkpress1",
"payload": "OFF",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"x": 378,
"y": 202,
"wires": [
[
"c55e80c9.cc966"
]
]
},
{
"id": "df33c1ae.6f556",
"type": "and-gate",
"z": "713f9364.9c34cc",
"name": "",
"rules": [
{
"t": "eq",
"v": "SHORT_PRESSED",
"vt": "str",
"propertyType": "msg",
"property": "payload",
"topic": "press"
},
{
"t": "eq",
"v": "1",
"vt": "str",
"propertyType": "msg",
"property": "payload",
"topic": "darkness"
}
],
"outputTopic": "result",
"gateType": "and",
"emitOnlyIfTrue": true,
"x": 794,
"y": 470,
"wires": [
[
"b9699419.f27828"
]
]
},
{
"id": "6b7da549.8680dc",
"type": "openhab2-in",
"z": "713f9364.9c34cc",
"name": "",
"controller": "4ad6e8ba.17b3c8",
"itemname": "StButtomTableNodeRed",
"x": 298,
"y": 433,
"wires": [
[
"af5c0e5a.f5244"
],
[]
]
},
{
"id": "af5c0e5a.f5244",
"type": "change",
"z": "713f9364.9c34cc",
"name": "topic=press",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "press",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 529.5,
"y": 465,
"wires": [
[
"df33c1ae.6f556",
"32b2cb97.76df24",
"711a6c80.e7dd04"
]
]
},
{
"id": "4ee0b322.720eec",
"type": "bigtimer",
"z": "713f9364.9c34cc",
"outtopic": "Darkness",
"outpayload1": "1",
"outpayload2": "0",
"name": "Darkness",
"lat": "55.6759",
"lon": "12.5655",
"starttime": "5004",
"endtime": "5003",
"startoff": 0,
"endoff": 0,
"offs": 0,
"outtext1": "",
"outtext2": "",
"timeout": 1440,
"sun": true,
"mon": true,
"tue": true,
"wed": true,
"thu": true,
"fri": true,
"sat": true,
"jan": true,
"feb": true,
"mar": true,
"apr": true,
"may": true,
"jun": true,
"jul": true,
"aug": true,
"sep": true,
"oct": true,
"nov": true,
"dec": true,
"day1": 0,
"month1": 0,
"day2": 0,
"month2": 0,
"day3": 0,
"month3": 0,
"day4": 0,
"month4": 0,
"day5": 0,
"month5": 0,
"d1": 0,
"w1": 0,
"d2": 0,
"w2": 0,
"d3": 0,
"w3": 0,
"d4": 0,
"w4": 0,
"d5": 0,
"w5": 0,
"suspend": false,
"random": false,
"repeat": true,
"atstart": true,
"odd": false,
"even": false,
"x": 240,
"y": 530,
"wires": [
[
"2df5a17d.98a95e"
],
[],
[]
]
},
{
"id": "84711ea3.64b99",
"type": "inject",
"z": "713f9364.9c34cc",
"name": "",
"topic": "",
"payload": "SHORT_PRESSED",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"x": 341.5,
"y": 385,
"wires": [
[
"af5c0e5a.f5244"
]
]
},
{
"id": "2df5a17d.98a95e",
"type": "change",
"z": "713f9364.9c34cc",
"name": "topic=darkness",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "darkness",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 501,
"y": 594,
"wires": [
[
"df33c1ae.6f556",
"32b2cb97.76df24",
"711a6c80.e7dd04"
]
]
},
{
"id": "a9e2551b.172dc8",
"type": "inject",
"z": "713f9364.9c34cc",
"name": "",
"topic": "",
"payload": "1",
"payloadType": "num",
"repeat": "",
"crontab": "",
"once": false,
"x": 239,
"y": 605,
"wires": [
[
"2df5a17d.98a95e"
]
]
},
{
"id": "b9699419.f27828",
"type": "debug",
"z": "713f9364.9c34cc",
"name": "",
"active": true,
"console": "false",
"complete": "false",
"x": 977,
"y": 465,
"wires": []
},
{
"id": "32b2cb97.76df24",
"type": "debug",
"z": "713f9364.9c34cc",
"name": "",
"active": true,
"console": "false",
"complete": "false",
"x": 855,
"y": 643,
"wires": []
},
{
"id": "711a6c80.e7dd04",
"type": "debug",
"z": "713f9364.9c34cc",
"name": "",
"active": true,
"console": "false",
"complete": "topic",
"x": 783,
"y": 330,
"wires": []
},
{
"id": "4ad6e8ba.17b3c8",
"type": "openhab2-controller",
"z": "",
"name": "Openhab",
"protocol": "http",
"host": "192.168.1.109",
"port": "8080",
"path": "",
"username": "",
"password": ""
}
]