A quick run down of what i have setup, I have several Sonoff SNZB-02P, Sonoff TRVZB… I have a Central configuration setup to trigger a boiler relay.
The SNZB-02P & Sonoff TRVZB are all tied together through VTherms for each room.
Node-Red JSON
[
{
"id": "1734410157d4d130",
"type": "server-state-changed",
"z": "a5574c37c05ee714",
"g": "8b1d76b8df90e4b6",
"name": "Watch Boiler Active Sensor",
"server": "13912b6009076c18",
"version": 6,
"outputs": 1,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"sensor.nb_device_active_for_boiler"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"outputOnlyOnStateChange": false,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "string",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "$entity.entity_id",
"valueType": "jsonata"
}
],
"x": 210,
"y": 640,
"wires": [
[
"57019f88bdbae6f8"
]
]
},
{
"id": "57019f88bdbae6f8",
"type": "switch",
"z": "a5574c37c05ee714",
"g": "8b1d76b8df90e4b6",
"name": "Check All Active Device IDs",
"property": "data.new_state.attributes.active_device_ids",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "number.ID1",
"vt": "str"
},
{
"t": "cont",
"v": "number.ID2",
"vt": "str"
},
{
"t": "cont",
"v": "number.ID3",
"vt": "str"
},
{
"t": "cont",
"v": "number.ID3.1",
"vt": "str"
},
{
"t": "cont",
"v": "number.ID4",
"vt": "str"
},
{
"t": "cont",
"v": "number.ID5",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 7,
"x": 480,
"y": 640,
"wires": [
[
"428ff10ef2f40dfb"
],
[
"9cd40f9df5d42836"
],
[
"db28a01720898ade"
],
[
"db28a01720898ade"
],
[
"5de915dcde6219b4"
],
[
"f9f85b119ecf101b"
],
[
"acb4514eeae4f287"
]
]
},
{
"id": "428ff10ef2f40dfb",
"type": "api-call-service",
"z": "a5574c37c05ee714",
"g": "8b1d76b8df90e4b6",
"name": "BL1: ON",
"server": "13912b6009076c18",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.bl1_vtherm"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_on",
"x": 740,
"y": 500,
"wires": [
[]
]
},
{
"id": "5de915dcde6219b4",
"type": "api-call-service",
"z": "a5574c37c05ee714",
"g": "8b1d76b8df90e4b6",
"name": "BL4: ON",
"server": "13912b6009076c18",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.bl4_vtherm"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_on",
"x": 740,
"y": 680,
"wires": [
[]
]
},
{
"id": "acb4514eeae4f287",
"type": "api-call-service",
"z": "a5574c37c05ee714",
"g": "8b1d76b8df90e4b6",
"name": "BL: OFF",
"server": "",
"version": 7,
"debugenabled": false,
"action": "",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"BL1: OFF",
"BL2: OFF",
"BL3: OFF",
"BL4: OFF",
"BL5: OFF"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_off",
"x": 740,
"y": 820,
"wires": [
[]
]
},
{
"id": "9cd40f9df5d42836",
"type": "api-call-service",
"z": "a5574c37c05ee714",
"g": "8b1d76b8df90e4b6",
"name": "BL2: ON",
"server": "13912b6009076c18",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.bl2_vtherm"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_on",
"x": 740,
"y": 560,
"wires": [
[]
]
},
{
"id": "db28a01720898ade",
"type": "api-call-service",
"z": "a5574c37c05ee714",
"g": "8b1d76b8df90e4b6",
"name": "BL3: ON",
"server": "13912b6009076c18",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.bl3_vtherm"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_on",
"x": 740,
"y": 620,
"wires": [
[]
]
},
{
"id": "f9f85b119ecf101b",
"type": "api-call-service",
"z": "a5574c37c05ee714",
"g": "8b1d76b8df90e4b6",
"name": "BL5: ON",
"server": "13912b6009076c18",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.bl5_vtherm"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_on",
"x": 740,
"y": 740,
"wires": [
[]
]
},
{
"id": "acc3c06f0e031227",
"type": "comment",
"z": "a5574c37c05ee714",
"g": "8b1d76b8df90e4b6",
"name": "Boiler Activation Check ( Who )",
"info": "",
"x": 230,
"y": 500,
"wires": []
},
{
"id": "13912b6009076c18",
"type": "server",
"name": "HA SERVER",
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": [],
"connectionDelay": false,
"cacheJson": false,
"heartbeat": true,
"heartbeatInterval": "10",
"statusSeparator": "",
"enableGlobalContextStore": false
},
{
"id": "248f5f8b2222fc1e",
"type": "global-config",
"env": [],
"modules": {
"node-red-contrib-home-assistant-websocket": "0.80.3"
}
}
]