[{"data":1,"prerenderedAt":106},["ShallowReactive",2],{"integration-@avantics\u002Fnode-red-home-automation\u002F":3},{"_id":4,"categories":5,"description":7,"npmOwners":8,"npmScope":10,"name":11,"ffCertified":12,"downloads":13,"version":15,"updatedAt":16,"maintainers":17,"homepage":20,"bugs":21,"repository":23,"time":26,"lastUpdated":28,"created":27,"license":48,"githubOwner":49,"githubRepo":11,"examples":50,"readme":105},"@avantics\u002Fnode-red-home-automation",[6],"catalogue","Deterministic home automation components for Node-RED",[9],"cptbucky","avantics","node-red-home-automation",false,{"week":14},2680,"6.4.0","2026-11-28T19:01:23.696Z",[18],{"name":9,"email":19},"cpt.bucky@gmail.com","https:\u002F\u002Favantics-hq.github.io\u002Fnode-red-home-automation\u002F",{"url":22},"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fissues",{"url":24,"type":25},"git+https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation.git","git",{"created":27,"modified":28,"0.0.0-stage":27,"2.0.2":29,"2.0.3":30,"2.1.0":31,"2.2.0":32,"2.2.1":33,"2.3.0":34,"3.0.0":35,"3.0.1":36,"4.0.0":37,"4.0.1":38,"4.0.2":39,"4.0.3":40,"5.0.0":41,"6.0.0":42,"6.1.0":43,"6.2.0":44,"6.3.0":45,"6.4.0":46,"6.5.0":47},"2026-11-22T15:20:33.106Z","2026-11-28T21:06:57.790Z","2026-11-22T15:21:48.772Z","2026-11-22T17:07:24.885Z","2026-11-22T19:17:16.229Z","2026-11-22T21:33:15.135Z","2026-11-23T09:48:20.601Z","2026-11-23T17:55:13.019Z","2026-11-23T22:11:32.789Z","2026-11-24T19:09:27.196Z","2026-11-24T21:07:10.846Z","2026-11-24T23:18:17.876Z","2026-11-25T09:03:14.353Z","2026-11-26T10:33:43.356Z","2026-11-26T22:02:42.462Z","2026-11-27T22:14:53.016Z","2026-11-27T23:23:15.029Z","2026-11-28T09:06:53.557Z","2026-11-28T18:07:27.358Z","2026-11-28T19:01:23.377Z","2026-11-28T21:06:57.506Z","MIT","avantics-hq",[51,57,63,69,75,81,87,93,99],{"name":52,"path":53,"url":54,"downloadUrl":55,"flow":56},"Cover control","examples\u002FCover control.json","https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FCover%20control.json","https:\u002F\u002Fraw.githubusercontent.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fmain\u002Fexamples\u002FCover%20control.json","[{\"id\":\"example-cover-control-cover-control-example\",\"type\":\"comment\",\"name\":\"Cover control example\",\"info\":\"Needs: A Zigbee2MQTT cover on your broker.\\n\\nA position cover (blind, shutter or curtain motor) owned by the cover controller. Requests go in as \\\"open\\\", \\\"close\\\", \\\"stop\\\", a position from 0 to 100, or a preset name; an automatic target sets respectManual so a person's move holds. The Zigbee2MQTT cover adapter maps to and from a Zigbee2MQTT cover: set its friendly name, and it reads the cover's state and availability from the broker and sends it the controller's commands. A button can stop the cover if it is moving and open it otherwise, and the cover's availability keeps requests from going to an offline device. Output 3 says whether the cover is moving, for other policies to react to. Here it pauses motion lighting while the cover moves, through the motion policy's pause input, which never touches the user's own enable.\\n\\nBefore deploying, open the \\\"your MQTT broker\\\" config node (any node's Broker setting) and set your broker's host: every node here that talks MQTT subscribes and publishes through it, with no MQTT in, MQTT out or status nodes. Give the cover controller an area and choose what it publishes to show the cover in Home Assistant.\",\"x\":170,\"y\":40,\"wires\":[]},{\"id\":\"example-cover-control-open\",\"type\":\"inject\",\"name\":\"open\",\"props\":[{\"p\":\"payload\",\"v\":\"open\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":120,\"y\":140,\"wires\":[[\"example-cover-control-cover\"]]},{\"id\":\"example-cover-control-close\",\"type\":\"inject\",\"name\":\"close\",\"props\":[{\"p\":\"payload\",\"v\":\"close\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":120,\"y\":180,\"wires\":[[\"example-cover-control-cover\"]]},{\"id\":\"example-cover-control-partial\",\"type\":\"inject\",\"name\":\"partial preset\",\"props\":[{\"p\":\"payload\",\"v\":\"partial\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":140,\"y\":220,\"wires\":[[\"example-cover-control-cover\"]]},{\"id\":\"example-cover-control-computed\",\"type\":\"inject\",\"name\":\"computed target 40\",\"props\":[{\"p\":\"payload\",\"v\":\"40\",\"vt\":\"num\"},{\"p\":\"respectManual\",\"v\":\"true\",\"vt\":\"bool\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":160,\"y\":260,\"wires\":[[\"example-cover-control-cover\"]]},{\"id\":\"example-cover-control-adapter\",\"type\":\"home-z2m-cover\",\"name\":\"\",\"baseTopic\":\"zigbee2mqtt\",\"friendlyName\":\"\\u003cyour cover\\u003e\",\"x\":420,\"y\":320,\"wires\":[[],[\"example-cover-control-cover\"]],\"broker\":\"example-mqtt-broker\",\"publishesThroughOutput\":false},{\"id\":\"example-cover-control-cover\",\"type\":\"home-cover-controller\",\"name\":\"\",\"area\":\"\",\"presets\":\"{\\\"partial\\\":60}\",\"positionTolerance\":2,\"invert\":false,\"travelTimeoutMs\":90000,\"maxAttempts\":2,\"pollMs\":5000,\"settleMs\":5000,\"x\":640,\"y\":200,\"wires\":[[\"example-cover-control-adapter\"],[\"example-cover-control-state\"],[\"example-cover-control-moving\",\"example-cover-control-pause-motion\"]],\"broker\":\"example-mqtt-broker\"},{\"id\":\"example-cover-control-state\",\"type\":\"debug\",\"name\":\"state and results\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":870,\"y\":200,\"wires\":[]},{\"id\":\"example-cover-control-button\",\"type\":\"inject\",\"name\":\"button: open, or stop if moving\",\"props\":[{\"p\":\"payload\",\"v\":\"open\",\"vt\":\"str\"},{\"p\":\"stopIfMoving\",\"v\":\"true\",\"vt\":\"bool\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":190,\"y\":400,\"wires\":[[\"example-cover-control-cover\"]]},{\"id\":\"example-cover-control-moving\",\"type\":\"debug\",\"name\":\"moving\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":870,\"y\":260,\"wires\":[]},{\"id\":\"example-cover-control-pause-motion\",\"type\":\"function\",\"name\":\"pause motion while moving\",\"func\":\"\u002F\u002F While the cover moves, pause this room's motion lighting, and release\\n\u002F\u002F the pause when it stops: wire to the motion lighting policy. A pause\\n\u002F\u002F never touches the motion policy's enable, which is the user's own.\\nreturn {source: \\\"pause\\\", owner: \\\"cover\\\", payload: msg.payload === true};\",\"outputs\":1,\"timeout\":0,\"noerr\":0,\"initialize\":\"\",\"finalize\":\"\",\"libs\":[],\"x\":900,\"y\":300,\"wires\":[[\"example-cover-control-motion-pause\"]]},{\"id\":\"example-cover-control-motion-pause\",\"type\":\"debug\",\"name\":\"to the motion lighting policy\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":1150,\"y\":300,\"wires\":[]},{\"id\":\"example-mqtt-broker\",\"type\":\"mqtt-broker\",\"name\":\"your MQTT broker\",\"broker\":\"your-mqtt-broker\",\"port\":1883,\"clientid\":\"\",\"autoConnect\":true,\"usetls\":false,\"protocolVersion\":4,\"keepalive\":60,\"cleansession\":true,\"autoUnsubscribe\":true,\"birthTopic\":\"\",\"birthQos\":\"0\",\"birthRetain\":\"false\",\"birthPayload\":\"\",\"birthMsg\":{},\"closeTopic\":\"\",\"closeQos\":\"0\",\"closeRetain\":\"false\",\"closePayload\":\"\",\"closeMsg\":{},\"willTopic\":\"\",\"willQos\":\"0\",\"willRetain\":\"false\",\"willPayload\":\"\",\"willMsg\":{},\"userProps\":\"\",\"sessionExpiry\":\"\"}]",{"name":58,"path":59,"url":60,"downloadUrl":61,"flow":62},"Cover pair","examples\u002FCover pair.json","https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FCover%20pair.json","https:\u002F\u002Fraw.githubusercontent.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fmain\u002Fexamples\u002FCover%20pair.json","[{\"id\":\"example-cover-pair-cover-pair-example\",\"type\":\"comment\",\"name\":\"Cover pair example\",\"info\":\"Needs: No devices: injects stand in for the curtains' reports, and Debug nodes show the commands.\\n\\nTwo covers moved as one, such as the left and right of a curtain. The group sends each member the request, with its own request ID, on that member's own output (after the group's result on output 1); each member's second output comes back to the group, which reports ready only when both confirm, and otherwise which did what. Map each member's commands and reports to its device as in the Cover control example.\",\"x\":160,\"y\":40,\"wires\":[]},{\"id\":\"example-cover-pair-open\",\"type\":\"inject\",\"name\":\"open both\",\"props\":[{\"p\":\"payload\",\"v\":\"open\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":130,\"y\":100,\"wires\":[[\"example-cover-pair-group\"]]},{\"id\":\"example-cover-pair-partial\",\"type\":\"inject\",\"name\":\"partial preset\",\"props\":[{\"p\":\"payload\",\"v\":\"partial\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":140,\"y\":140,\"wires\":[[\"example-cover-pair-group\"]]},{\"id\":\"example-cover-pair-group\",\"type\":\"home-cover-group\",\"name\":\"\",\"area\":\"\",\"members\":\"[\\\"left\\\",\\\"right\\\"]\",\"x\":350,\"y\":120,\"wires\":[[\"example-cover-pair-pair-result\"],[\"example-cover-pair-left\"],[\"example-cover-pair-right\"]],\"outputs\":3},{\"id\":\"example-cover-pair-pair-result\",\"type\":\"debug\",\"name\":\"pair result\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":570,\"y\":180,\"wires\":[]},{\"id\":\"example-cover-pair-left\",\"type\":\"home-cover-controller\",\"name\":\"left curtain\",\"area\":\"\",\"coverType\":\"position\",\"presets\":\"{\\\"partial\\\":60}\",\"positionTolerance\":2,\"invert\":false,\"travelTimeoutMs\":90000,\"maxAttempts\":2,\"pollMs\":5000,\"settleMs\":5000,\"travelMs\":30000,\"marginMs\":10000,\"x\":780,\"y\":80,\"wires\":[[\"example-cover-pair-left-commands\"],[\"example-cover-pair-group\"],[]],\"broker\":\"example-mqtt-broker\"},{\"id\":\"example-cover-pair-right\",\"type\":\"home-cover-controller\",\"name\":\"right curtain\",\"area\":\"\",\"coverType\":\"position\",\"presets\":\"{\\\"partial\\\":60}\",\"positionTolerance\":2,\"invert\":false,\"travelTimeoutMs\":90000,\"maxAttempts\":2,\"pollMs\":5000,\"settleMs\":5000,\"travelMs\":30000,\"marginMs\":10000,\"x\":780,\"y\":160,\"wires\":[[\"example-cover-pair-right-commands\"],[\"example-cover-pair-group\"],[]],\"broker\":\"example-mqtt-broker\"},{\"id\":\"example-cover-pair-left-commands\",\"type\":\"debug\",\"name\":\"left curtain commands\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":1020,\"y\":80,\"wires\":[]},{\"id\":\"example-cover-pair-right-commands\",\"type\":\"debug\",\"name\":\"right curtain commands\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":1020,\"y\":160,\"wires\":[]},{\"id\":\"example-cover-pair-left-report\",\"type\":\"inject\",\"name\":\"left curtain reports open\",\"props\":[{\"p\":\"cover\",\"v\":\"{\\\"kind\\\": \\\"observed\\\", \\\"position\\\": 100, \\\"motion\\\": \\\"stopped\\\", \\\"observedAt\\\": $now()}\",\"vt\":\"jsonata\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":170,\"y\":260,\"wires\":[[\"example-cover-pair-left\"]]},{\"id\":\"example-cover-pair-right-report\",\"type\":\"inject\",\"name\":\"right curtain reports open\",\"props\":[{\"p\":\"cover\",\"v\":\"{\\\"kind\\\": \\\"observed\\\", \\\"position\\\": 100, \\\"motion\\\": \\\"stopped\\\", \\\"observedAt\\\": $now()}\",\"vt\":\"jsonata\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":180,\"y\":300,\"wires\":[[\"example-cover-pair-right\"]]},{\"id\":\"example-mqtt-broker\",\"type\":\"mqtt-broker\",\"name\":\"your MQTT broker\",\"broker\":\"your-mqtt-broker\",\"port\":1883,\"clientid\":\"\",\"autoConnect\":true,\"usetls\":false,\"protocolVersion\":4,\"keepalive\":60,\"cleansession\":true,\"autoUnsubscribe\":true,\"birthTopic\":\"\",\"birthQos\":\"0\",\"birthRetain\":\"false\",\"birthPayload\":\"\",\"birthMsg\":{},\"closeTopic\":\"\",\"closeQos\":\"0\",\"closeRetain\":\"false\",\"closePayload\":\"\",\"closeMsg\":{},\"willTopic\":\"\",\"willQos\":\"0\",\"willRetain\":\"false\",\"willPayload\":\"\",\"willMsg\":{},\"userProps\":\"\",\"sessionExpiry\":\"\"}]",{"name":64,"path":65,"url":66,"downloadUrl":67,"flow":68},"Home theatre activity","examples\u002FHome theatre activity.json","https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FHome%20theatre%20activity.json","https:\u002F\u002Fraw.githubusercontent.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fmain\u002Fexamples\u002FHome%20theatre%20activity.json","[{\"id\":\"example-home-theatre-activity-home-theatre-activity-example\",\"type\":\"comment\",\"name\":\"Home theatre activity example\",\"info\":\"Needs: The display controller's devices, as in Home theatre equipment, and a Zigbee2MQTT light, both on your broker or network. Requests come from your broker.\\n\\nThe state contract turns a request on home\u002F\\u003carea\\u003e\u002Ftheatre\u002Frequest, which it reads from the broker, into an activity intent: publish {\\\"requestId\\\":\\\"1\\\",\\\"activity\\\":\\\"tv\\\"} there to try it. The activity controller plans each target and sends msg.theatreCommand; the switch routes each command by its target, and a change node moves it onto that controller's input. Every controller reports msg.theatre target state on output 2, wired straight back to the activity controller, which publishes a complete snapshot through the contract.\\n\\nName the area on the state contract before deploying: it names the MQTT topics and Home Assistant entities, and until it is set the contract shows \\\"invalid configuration\\\". Set the display controller's device hosts and TV pre-shared key too; until then it shows \\\"invalid configuration\\\" and the activity waits for it. Wire the controllers' output 1 to your device transports. Activity lighting holds the room's lights through a room lighting controller, which reaches its light through a zigbee2mqtt light node and passes each light's reading back to activity lighting (its third output), so the lights confirm. Set the light's friendly name.\\n\\nBefore deploying, open the \\\"your MQTT broker\\\" config node (any node's Broker setting) and set your broker's host: every node here that talks MQTT subscribes and publishes through it, with no MQTT in, MQTT out or status nodes.\",\"x\":190,\"y\":40,\"wires\":[]},{\"id\":\"example-home-theatre-activity-theatre-state-contract\",\"type\":\"home-theatre-state-contract\",\"name\":\"\",\"area\":\"\",\"displayName\":\"\",\"baseTopic\":\"\",\"discoveryPrefix\":\"homeassistant\",\"activities\":\"[\\\"off\\\",\\\"tv\\\"]\",\"sloWindowSize\":20,\"sloMinimumSamples\":5,\"sloLatencyBudgetMs\":60000,\"sloSuccessObjectivePct\":95,\"x\":430,\"y\":120,\"wires\":[[\"example-home-theatre-activity-theatre-activity-controller\"],[]],\"idScheme\":\"node\",\"broker\":\"example-mqtt-broker\",\"homeAssistant\":\"state\"},{\"id\":\"example-home-theatre-activity-theatre-activity-controller\",\"type\":\"home-theatre-activity-controller\",\"name\":\"\",\"area\":\"\",\"freshnessMs\":30000,\"activityProfiles\":\"{\\\"off\\\":{\\\"display\\\":{\\\"mode\\\":\\\"off\\\"},\\\"avr\\\":{\\\"power\\\":\\\"standby\\\"},\\\"source\\\":{\\\"action\\\":\\\"deactivate\\\",\\\"readiness\\\":\\\"optional\\\"},\\\"lighting\\\":{\\\"profile\\\":\\\"off\\\"},\\\"backlighting\\\":{\\\"power\\\":\\\"off\\\"}},\\\"tv\\\":{\\\"display\\\":{\\\"mode\\\":\\\"tv\\\"},\\\"avr\\\":{\\\"power\\\":\\\"on\\\",\\\"source\\\":\\\"shield\\\"},\\\"source\\\":{\\\"action\\\":\\\"activate\\\",\\\"sourceId\\\":\\\"streamer\\\",\\\"readiness\\\":\\\"required\\\"},\\\"lighting\\\":{\\\"profile\\\":\\\"tv\\\"},\\\"backlighting\\\":{\\\"power\\\":\\\"on\\\"}}}\",\"x\":680,\"y\":140,\"wires\":[[\"example-home-theatre-activity-route-by-target\"],[\"example-home-theatre-activity-theatre-state-contract\"]]},{\"id\":\"example-home-theatre-activity-activity-lighting-controller\",\"type\":\"home-activity-lighting-controller\",\"name\":\"\",\"area\":\"\",\"profiles\":\"{\\\"off\\\":{\\\"targets\\\":[],\\\"values\\\":{}},\\\"tv\\\":{\\\"targets\\\":[\\\"main\\\"],\\\"values\\\":{\\\"brightnessPct\\\":25,\\\"colorTempKelvin\\\":2500}}}\",\"confirmationTimeoutMs\":15000,\"maxAttempts\":2,\"x\":1380,\"y\":440,\"wires\":[[\"example-home-theatre-activity-room\"],[\"example-home-theatre-activity-theatre-activity-controller\"]]},{\"id\":\"example-home-theatre-activity-route-by-target\",\"type\":\"switch\",\"name\":\"route by target\",\"property\":\"theatreCommand.target\",\"propertyType\":\"msg\",\"rules\":[{\"t\":\"eq\",\"v\":\"display\",\"vt\":\"str\"},{\"t\":\"eq\",\"v\":\"avr\",\"vt\":\"str\"},{\"t\":\"eq\",\"v\":\"source\",\"vt\":\"str\"},{\"t\":\"eq\",\"v\":\"lighting\",\"vt\":\"str\"},{\"t\":\"eq\",\"v\":\"backlighting\",\"vt\":\"str\"}],\"checkall\":\"true\",\"repair\":false,\"outputs\":5,\"x\":930,\"y\":300,\"wires\":[[\"example-home-theatre-activity-to-display\"],[\"example-home-theatre-activity-to-avr\"],[\"example-home-theatre-activity-to-source\"],[\"example-home-theatre-activity-to-lighting\"],[\"example-home-theatre-activity-to-backlighting\"]]},{\"id\":\"example-home-theatre-activity-to-display\",\"type\":\"change\",\"name\":\"to display\",\"rules\":[{\"t\":\"move\",\"p\":\"theatreCommand\",\"pt\":\"msg\",\"to\":\"display\",\"tot\":\"msg\"}],\"x\":1140,\"y\":200,\"wires\":[[\"example-home-theatre-activity-display-controller\"]]},{\"id\":\"example-home-theatre-activity-display-controller\",\"type\":\"home-display-mode-controller\",\"name\":\"\",\"area\":\"\",\"tvHost\":\"\",\"screenHost\":\"\",\"projectorPowerMeterHost\":\"\",\"screenOpenPosition\":\"\",\"screenTolerance\":2,\"pollMs\":2000,\"queryTimeoutMs\":5000,\"tvTimeoutMs\":30000,\"screenTimeoutMs\":65000,\"projectorWarmupMs\":60000,\"projectorMinimumWarmupMs\":15000,\"projectorShutdownConfirmMs\":5000,\"projectorCooldownMs\":120000,\"maxAttempts\":2,\"projectorOnWatts\":20,\"projectorOffWatts\":10,\"projectorPowerFallback\":false,\"transportTimeoutMs\":5000,\"x\":1380,\"y\":200,\"wires\":[[\"example-home-theatre-activity-display-commands\"],[\"example-home-theatre-activity-theatre-activity-controller\"]]},{\"id\":\"example-home-theatre-activity-display-commands\",\"type\":\"debug\",\"name\":\"display commands\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":1630,\"y\":200,\"wires\":[]},{\"id\":\"example-home-theatre-activity-to-avr\",\"type\":\"change\",\"name\":\"to avr\",\"rules\":[{\"t\":\"move\",\"p\":\"theatreCommand\",\"pt\":\"msg\",\"to\":\"avr\",\"tot\":\"msg\"}],\"x\":1140,\"y\":280,\"wires\":[[\"example-home-theatre-activity-avr-controller\"]]},{\"id\":\"example-home-theatre-activity-avr-controller\",\"type\":\"home-avr-controller\",\"name\":\"\",\"area\":\"\",\"sources\":\"{\\\"shield\\\":\\\"SAT\u002FCBL\\\",\\\"playstation\\\":\\\"GAME\\\"}\",\"retryMs\":2000,\"maxAttempts\":3,\"minVolumeDb\":-80,\"maxVolumeDb\":-20,\"x\":1380,\"y\":280,\"wires\":[[\"example-home-theatre-activity-avr-commands\"],[\"example-home-theatre-activity-theatre-activity-controller\"]],\"broker\":\"example-mqtt-broker\"},{\"id\":\"example-home-theatre-activity-avr-commands\",\"type\":\"debug\",\"name\":\"avr commands\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":1630,\"y\":280,\"wires\":[]},{\"id\":\"example-home-theatre-activity-to-source\",\"type\":\"change\",\"name\":\"to sourceCapability\",\"rules\":[{\"t\":\"move\",\"p\":\"theatreCommand\",\"pt\":\"msg\",\"to\":\"sourceCapability\",\"tot\":\"msg\"}],\"x\":1140,\"y\":360,\"wires\":[[\"example-home-theatre-activity-source-controller\"]]},{\"id\":\"example-home-theatre-activity-source-controller\",\"type\":\"home-source-capability-controller\",\"name\":\"\",\"area\":\"\",\"sources\":\"{\\\"streamer\\\":{\\\"activation\\\":\\\"command\\\",\\\"deactivation\\\":\\\"command\\\",\\\"confirmation\\\":\\\"active\\\"}}\",\"pollMs\":2000,\"confirmationTimeoutMs\":15000,\"maxAttempts\":2,\"x\":1380,\"y\":360,\"wires\":[[\"example-home-theatre-activity-source-commands\"],[\"example-home-theatre-activity-theatre-activity-controller\"]]},{\"id\":\"example-home-theatre-activity-source-commands\",\"type\":\"debug\",\"name\":\"source commands\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":1630,\"y\":360,\"wires\":[]},{\"id\":\"example-home-theatre-activity-to-lighting\",\"type\":\"change\",\"name\":\"to activityLighting\",\"rules\":[{\"t\":\"move\",\"p\":\"theatreCommand\",\"pt\":\"msg\",\"to\":\"activityLighting\",\"tot\":\"msg\"}],\"x\":1140,\"y\":440,\"wires\":[[\"example-home-theatre-activity-activity-lighting-controller\"]]},{\"id\":\"example-home-theatre-activity-to-backlighting\",\"type\":\"change\",\"name\":\"to backlighting\",\"rules\":[{\"t\":\"move\",\"p\":\"theatreCommand\",\"pt\":\"msg\",\"to\":\"backlighting\",\"tot\":\"msg\"}],\"x\":1140,\"y\":520,\"wires\":[[\"example-home-theatre-activity-backlighting-controller\"]]},{\"id\":\"example-home-theatre-activity-backlighting-controller\",\"type\":\"home-backlighting-controller\",\"name\":\"\",\"area\":\"\",\"pollMs\":2000,\"confirmationTimeoutMs\":15000,\"maxAttempts\":2,\"x\":1380,\"y\":520,\"wires\":[[\"example-home-theatre-activity-backlighting-commands\"],[\"example-home-theatre-activity-theatre-activity-controller\"]]},{\"id\":\"example-home-theatre-activity-backlighting-commands\",\"type\":\"debug\",\"name\":\"backlighting commands\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":1630,\"y\":520,\"wires\":[]},{\"id\":\"example-home-theatre-activity-room\",\"type\":\"home-room-lighting-controller\",\"name\":\"\",\"area\":\"\",\"idScheme\":\"node\",\"displayName\":\"\",\"discoveryPrefix\":\"homeassistant\",\"targets\":\"[{\\\"id\\\":\\\"main\\\"}]\",\"initialTransitionSeconds\":1,\"x\":1630,\"y\":440,\"wires\":[[],[\"example-home-theatre-activity-room-light-main\"],[\"example-home-theatre-activity-activity-lighting-controller\"]],\"broker\":\"example-mqtt-broker\",\"homeAssistant\":\"off\"},{\"id\":\"example-home-theatre-activity-room-light-main\",\"type\":\"home-z2m-light\",\"name\":\"\",\"target\":\"main\",\"baseTopic\":\"zigbee2mqtt\",\"friendlyName\":\"\\u003cyour light\\u003e\",\"group\":false,\"x\":1630,\"y\":520,\"wires\":[[],[\"example-home-theatre-activity-room\"]],\"broker\":\"example-mqtt-broker\",\"publishesThroughOutput\":false},{\"id\":\"example-mqtt-broker\",\"type\":\"mqtt-broker\",\"name\":\"your MQTT broker\",\"broker\":\"your-mqtt-broker\",\"port\":1883,\"clientid\":\"\",\"autoConnect\":true,\"usetls\":false,\"protocolVersion\":4,\"keepalive\":60,\"cleansession\":true,\"autoUnsubscribe\":true,\"birthTopic\":\"\",\"birthQos\":\"0\",\"birthRetain\":\"false\",\"birthPayload\":\"\",\"birthMsg\":{},\"closeTopic\":\"\",\"closeQos\":\"0\",\"closeRetain\":\"false\",\"closePayload\":\"\",\"closeMsg\":{},\"willTopic\":\"\",\"willQos\":\"0\",\"willRetain\":\"false\",\"willPayload\":\"\",\"willMsg\":{},\"userProps\":\"\",\"sessionExpiry\":\"\"}]",{"name":70,"path":71,"url":72,"downloadUrl":73,"flow":74},"Home theatre equipment","examples\u002FHome theatre equipment.json","https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FHome%20theatre%20equipment.json","https:\u002F\u002Fraw.githubusercontent.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fmain\u002Fexamples\u002FHome%20theatre%20equipment.json","[{\"id\":\"example-home-theatre-equipment-home-theatre-equipment-example\",\"type\":\"comment\",\"name\":\"Home theatre equipment example\",\"info\":\"Needs: your Sony Bravia TV (its host and pre-shared key, in the sony bravia node), your screen as a Shelly cover calibrated for positions (its MQTT prefix in the shelly cover node, which shows an example), and your projector's power meter as a metering Shelly switch (its MQTT prefix and switch ID in the shelly power node, which shows an example). The other controllers' commands go to Debug nodes.\\n\\nEach equipment controller accepts a generation-scoped intent and reports target state. Output 1 carries commands for your device transport; output 2 carries theatre target state.\\n\\nThe projector's power button is a broadlink ir node on the display controller's output 1: set its blaster's host and the projector's power code (learn it with msg.broadlink = {learn: true}). The TV, the screen and the projector's power are reached through the sony bravia, shelly cover and shelly power nodes, wired from the display controller's output 3 and back. Set the TV's host and pre-shared key, and the screen's and meter's prefixes (replace the examples), before deploying. Until then they show \\\"invalid configuration\\\".\",\"x\":190,\"y\":40,\"wires\":[]},{\"id\":\"example-home-theatre-equipment-receiver-on-streamer\",\"type\":\"inject\",\"name\":\"receiver on, streamer\",\"props\":[{\"p\":\"avr\",\"v\":\"{\\\"kind\\\":\\\"intent\\\",\\\"requestId\\\":\\\"example-avr-1\\\",\\\"generation\\\":1,\\\"power\\\":\\\"on\\\",\\\"source\\\":\\\"shield\\\"}\",\"vt\":\"json\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":170,\"y\":100,\"wires\":[[\"example-home-theatre-equipment-avr-controller\"]]},{\"id\":\"example-home-theatre-equipment-avr-controller\",\"type\":\"home-avr-controller\",\"name\":\"\",\"area\":\"\",\"sources\":\"{\\\"shield\\\":\\\"SAT\u002FCBL\\\",\\\"playstation\\\":\\\"GAME\\\"}\",\"retryMs\":2000,\"maxAttempts\":3,\"minVolumeDb\":-80,\"maxVolumeDb\":-20,\"x\":420,\"y\":100,\"wires\":[[\"example-home-theatre-equipment-receiver-commands\"],[\"example-home-theatre-equipment-receiver-state\"]],\"broker\":\"example-mqtt-broker\"},{\"id\":\"example-home-theatre-equipment-receiver-commands\",\"type\":\"debug\",\"name\":\"receiver commands\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":660,\"y\":80,\"wires\":[]},{\"id\":\"example-home-theatre-equipment-receiver-state\",\"type\":\"debug\",\"name\":\"receiver state\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":660,\"y\":120,\"wires\":[]},{\"id\":\"example-home-theatre-equipment-display-tv-mode\",\"type\":\"inject\",\"name\":\"display TV mode\",\"props\":[{\"p\":\"display\",\"v\":\"{\\\"kind\\\":\\\"intent\\\",\\\"requestId\\\":\\\"example-display-1\\\",\\\"generation\\\":1,\\\"mode\\\":\\\"tv\\\"}\",\"vt\":\"json\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":170,\"y\":200,\"wires\":[[\"example-home-theatre-equipment-display-mode-controller\"]]},{\"id\":\"example-home-theatre-equipment-display-mode-controller\",\"type\":\"home-display-mode-controller\",\"name\":\"\",\"area\":\"\",\"tvHost\":\"\",\"screenHost\":\"\",\"projectorPowerMeterHost\":\"\",\"screenOpenPosition\":\"\",\"screenTolerance\":2,\"pollMs\":2000,\"queryTimeoutMs\":5000,\"tvTimeoutMs\":30000,\"screenTimeoutMs\":65000,\"projectorWarmupMs\":60000,\"projectorMinimumWarmupMs\":15000,\"projectorShutdownConfirmMs\":5000,\"projectorCooldownMs\":120000,\"maxAttempts\":2,\"projectorOnWatts\":20,\"projectorOffWatts\":10,\"projectorPowerFallback\":false,\"transportTimeoutMs\":5000,\"x\":420,\"y\":200,\"wires\":[[\"example-home-theatre-equipment-broadlink-ir\",\"example-home-theatre-equipment-display-commands\"],[\"example-home-theatre-equipment-display-state\"],[\"example-home-theatre-equipment-sony-bravia\",\"example-home-theatre-equipment-screen-cover\",\"example-home-theatre-equipment-projector-power\"]]},{\"id\":\"example-home-theatre-equipment-broadlink-ir\",\"type\":\"home-device-broadlink-ir\",\"name\":\"\",\"host\":\"\",\"powerCode\":\"\",\"timeoutMs\":5000,\"learnSeconds\":30,\"x\":920,\"y\":140,\"wires\":[[]],\"model\":\"rm4-mini\"},{\"id\":\"example-home-theatre-equipment-sony-bravia\",\"type\":\"home-sony-bravia\",\"name\":\"\",\"host\":\"\",\"timeoutMs\":5000,\"x\":420,\"y\":250,\"wires\":[[\"example-home-theatre-equipment-display-mode-controller\"]]},{\"id\":\"example-home-theatre-equipment-screen-cover\",\"type\":\"home-shelly-cover\",\"name\":\"\",\"broker\":\"example-mqtt-broker\",\"publishesThroughOutput\":false,\"topicPrefix\":\"shellyplus2pm-a8032ab12346\",\"channel\":0,\"x\":920,\"y\":200,\"wires\":[[],[\"example-home-theatre-equipment-display-mode-controller\"]]},{\"id\":\"example-home-theatre-equipment-projector-power\",\"type\":\"home-shelly-power\",\"name\":\"\",\"broker\":\"example-mqtt-broker\",\"topicPrefix\":\"shellyplus1pm-a8032ab12347\",\"channel\":0,\"x\":920,\"y\":260,\"wires\":[[\"example-home-theatre-equipment-display-mode-controller\"]]},{\"id\":\"example-home-theatre-equipment-display-commands\",\"type\":\"debug\",\"name\":\"display commands\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":660,\"y\":180,\"wires\":[]},{\"id\":\"example-home-theatre-equipment-display-state\",\"type\":\"debug\",\"name\":\"display state\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":660,\"y\":220,\"wires\":[]},{\"id\":\"example-home-theatre-equipment-activate-streamer\",\"type\":\"inject\",\"name\":\"activate streamer\",\"props\":[{\"p\":\"sourceCapability\",\"v\":\"{\\\"kind\\\":\\\"intent\\\",\\\"requestId\\\":\\\"example-source-1\\\",\\\"generation\\\":1,\\\"sourceId\\\":\\\"streamer\\\",\\\"action\\\":\\\"activate\\\"}\",\"vt\":\"json\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":170,\"y\":300,\"wires\":[[\"example-home-theatre-equipment-source-capability-controller\"]]},{\"id\":\"example-home-theatre-equipment-source-capability-controller\",\"type\":\"home-source-capability-controller\",\"name\":\"\",\"area\":\"\",\"sources\":\"{\\\"streamer\\\":{\\\"activation\\\":\\\"command\\\",\\\"deactivation\\\":\\\"command\\\",\\\"confirmation\\\":\\\"active\\\"}}\",\"pollMs\":2000,\"confirmationTimeoutMs\":15000,\"maxAttempts\":2,\"x\":440,\"y\":300,\"wires\":[[\"example-home-theatre-equipment-source-commands\"],[\"example-home-theatre-equipment-source-state\"]]},{\"id\":\"example-home-theatre-equipment-source-commands\",\"type\":\"debug\",\"name\":\"source commands\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":660,\"y\":280,\"wires\":[]},{\"id\":\"example-home-theatre-equipment-source-state\",\"type\":\"debug\",\"name\":\"source state\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":660,\"y\":320,\"wires\":[]},{\"id\":\"example-home-theatre-equipment-backlighting-on\",\"type\":\"inject\",\"name\":\"backlighting on\",\"props\":[{\"p\":\"backlighting\",\"v\":\"{\\\"kind\\\":\\\"intent\\\",\\\"requestId\\\":\\\"example-backlighting-1\\\",\\\"generation\\\":1,\\\"power\\\":\\\"on\\\"}\",\"vt\":\"json\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":170,\"y\":400,\"wires\":[[\"example-home-theatre-equipment-backlighting-controller\"]]},{\"id\":\"example-home-theatre-equipment-backlighting-controller\",\"type\":\"home-backlighting-controller\",\"name\":\"\",\"area\":\"\",\"pollMs\":2000,\"confirmationTimeoutMs\":15000,\"maxAttempts\":2,\"x\":430,\"y\":400,\"wires\":[[\"example-home-theatre-equipment-backlighting-commands\"],[\"example-home-theatre-equipment-backlighting-state\"]]},{\"id\":\"example-home-theatre-equipment-backlighting-commands\",\"type\":\"debug\",\"name\":\"backlighting commands\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":660,\"y\":380,\"wires\":[]},{\"id\":\"example-home-theatre-equipment-backlighting-state\",\"type\":\"debug\",\"name\":\"backlighting state\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":660,\"y\":420,\"wires\":[]},{\"id\":\"example-mqtt-broker\",\"type\":\"mqtt-broker\",\"name\":\"your MQTT broker\",\"broker\":\"your-mqtt-broker\",\"port\":1883,\"clientid\":\"\",\"autoConnect\":true,\"usetls\":false,\"protocolVersion\":4,\"keepalive\":60,\"cleansession\":true,\"autoUnsubscribe\":true,\"birthTopic\":\"\",\"birthQos\":\"0\",\"birthRetain\":\"false\",\"birthPayload\":\"\",\"birthMsg\":{},\"closeTopic\":\"\",\"closeQos\":\"0\",\"closeRetain\":\"false\",\"closePayload\":\"\",\"closeMsg\":{},\"willTopic\":\"\",\"willQos\":\"0\",\"willRetain\":\"false\",\"willPayload\":\"\",\"willMsg\":{},\"userProps\":\"\",\"sessionExpiry\":\"\"}]",{"name":76,"path":77,"url":78,"downloadUrl":79,"flow":80},"House schedule","examples\u002FHouse schedule.json","https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FHouse%20schedule.json","https:\u002F\u002Fraw.githubusercontent.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fmain\u002Fexamples\u002FHouse%20schedule.json","[{\"id\":\"example-house-schedule-house-schedule-example\",\"type\":\"comment\",\"name\":\"House schedule example\",\"info\":\"Needs: Two Zigbee2MQTT lights on your broker, one per room.\\n\\nA house schedule shared by two areas. Each area's circadian lighting policy chooses the house schedule as its Schedule and follows it without wires, and styles its own room. \\\"wake earlier\\\" changes the schedule through the optional MQTT node, which publishes its times and reads changes to them on its set topics, with Home Assistant time entities. Each room reaches its light through a zigbee2mqtt light node: set its friendly name.\\n\\nBefore deploying, open the \\\"your MQTT broker\\\" config node (any node's Broker setting) and set your broker's host: every node here that talks MQTT subscribes and publishes through it, with no MQTT in, MQTT out or status nodes.\",\"x\":170,\"y\":40,\"wires\":[]},{\"id\":\"example-house-schedule-earlier\",\"type\":\"inject\",\"name\":\"wake earlier\",\"props\":[{\"p\":\"lighting\",\"v\":\"{\\\"kind\\\":\\\"schedule\\\",\\\"wakeTime\\\":\\\"06:30\\\"}\",\"vt\":\"json\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":130,\"y\":120,\"wires\":[[\"example-house-schedule-mqtt\"]]},{\"id\":\"example-house-schedule-mqtt\",\"type\":\"home-house-schedule-mqtt\",\"name\":\"\",\"schedule\":\"example-house-schedule-house\",\"discoveryPrefix\":\"homeassistant\",\"idScheme\":\"node\",\"x\":340,\"y\":120,\"wires\":[[]],\"broker\":\"example-mqtt-broker\",\"homeAssistant\":\"discovery\"},{\"id\":\"example-house-schedule-living-circadian\",\"type\":\"home-circadian-lighting-policy\",\"name\":\"living room\",\"area\":\"\",\"houseSchedule\":\"example-house-schedule-house\",\"wakeTime\":\"07:00\",\"bedTime\":\"23:00\",\"maxBrightnessPct\":100,\"maxColorTempKelvin\":6500,\"sleepBrightnessPct\":1,\"sleepColorTempKelvin\":2200,\"refreshTransitionSeconds\":60,\"refreshSeconds\":60,\"initialSleep\":false,\"discoveryPrefix\":\"homeassistant\",\"idScheme\":\"node\",\"x\":340,\"y\":180,\"wires\":[[\"example-house-schedule-living\"],[]],\"broker\":\"example-mqtt-broker\",\"homeAssistant\":\"off\"},{\"id\":\"example-house-schedule-bedroom-circadian\",\"type\":\"home-circadian-lighting-policy\",\"name\":\"bedroom\",\"area\":\"\",\"houseSchedule\":\"example-house-schedule-house\",\"wakeTime\":\"07:00\",\"bedTime\":\"23:00\",\"maxBrightnessPct\":100,\"maxColorTempKelvin\":6500,\"sleepBrightnessPct\":1,\"sleepColorTempKelvin\":2200,\"refreshTransitionSeconds\":60,\"refreshSeconds\":60,\"initialSleep\":false,\"discoveryPrefix\":\"homeassistant\",\"idScheme\":\"node\",\"x\":340,\"y\":240,\"wires\":[[\"example-house-schedule-bedroom\"],[]],\"broker\":\"example-mqtt-broker\",\"homeAssistant\":\"off\"},{\"id\":\"example-house-schedule-living\",\"type\":\"home-room-lighting-controller\",\"name\":\"living room\",\"area\":\"\",\"displayName\":\"\",\"targets\":\"[{\\\"id\\\":\\\"main\\\"}]\",\"initialTransitionSeconds\":1,\"x\":600,\"y\":100,\"wires\":[[],[\"example-house-schedule-living-light-main\"],[]],\"idScheme\":\"node\",\"broker\":\"example-mqtt-broker\",\"homeAssistant\":\"off\"},{\"id\":\"example-house-schedule-living-light-main\",\"type\":\"home-z2m-light\",\"name\":\"\",\"target\":\"main\",\"baseTopic\":\"zigbee2mqtt\",\"friendlyName\":\"\\u003cyour light\\u003e\",\"group\":false,\"x\":470,\"y\":100,\"wires\":[[],[\"example-house-schedule-living\"]],\"broker\":\"example-mqtt-broker\",\"publishesThroughOutput\":false},{\"id\":\"example-house-schedule-bedroom\",\"type\":\"home-room-lighting-controller\",\"name\":\"bedroom\",\"area\":\"\",\"displayName\":\"\",\"targets\":\"[{\\\"id\\\":\\\"main\\\"}]\",\"initialTransitionSeconds\":1,\"x\":600,\"y\":160,\"wires\":[[],[\"example-house-schedule-bedroom-light-main\"],[]],\"idScheme\":\"node\",\"broker\":\"example-mqtt-broker\",\"homeAssistant\":\"off\"},{\"id\":\"example-house-schedule-bedroom-light-main\",\"type\":\"home-z2m-light\",\"name\":\"\",\"target\":\"main\",\"baseTopic\":\"zigbee2mqtt\",\"friendlyName\":\"\\u003cyour light\\u003e\",\"group\":false,\"x\":470,\"y\":160,\"wires\":[[],[\"example-house-schedule-bedroom\"]],\"broker\":\"example-mqtt-broker\",\"publishesThroughOutput\":false},{\"id\":\"example-house-schedule-house\",\"type\":\"home-house-schedule\",\"name\":\"house\",\"wakeTime\":\"07:00\",\"bedTime\":\"23:00\"},{\"id\":\"example-mqtt-broker\",\"type\":\"mqtt-broker\",\"name\":\"your MQTT broker\",\"broker\":\"your-mqtt-broker\",\"port\":1883,\"clientid\":\"\",\"autoConnect\":true,\"usetls\":false,\"protocolVersion\":4,\"keepalive\":60,\"cleansession\":true,\"autoUnsubscribe\":true,\"birthTopic\":\"\",\"birthQos\":\"0\",\"birthRetain\":\"false\",\"birthPayload\":\"\",\"birthMsg\":{},\"closeTopic\":\"\",\"closeQos\":\"0\",\"closeRetain\":\"false\",\"closePayload\":\"\",\"closeMsg\":{},\"willTopic\":\"\",\"willQos\":\"0\",\"willRetain\":\"false\",\"willPayload\":\"\",\"willMsg\":{},\"userProps\":\"\",\"sessionExpiry\":\"\"}]",{"name":82,"path":83,"url":84,"downloadUrl":85,"flow":86},"Room lighting","examples\u002FRoom lighting.json","https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FRoom%20lighting.json","https:\u002F\u002Fraw.githubusercontent.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fmain\u002Fexamples\u002FRoom%20lighting.json","[{\"id\":\"example-room-lighting-room-lighting-example\",\"type\":\"comment\",\"name\":\"Room lighting example\",\"info\":\"Needs: A Zigbee2MQTT light on your broker. Injects stand in for the sensors and wall switch.\\n\\nMotion and illuminance feed occupancy fusion and the motion policy; a wall switch feeds the switch policy. Both send lighting intents to the room controller, which owns the light's commands. The circadian lighting policy sends the room how its lights should look over the day; the room uses it for lights nobody has set otherwise.\\n\\nReplace the inject nodes with your sensors. The room reaches its light through the zigbee2mqtt light node: set its friendly name. Set the circadian policy's wake and bed times (Node-RED host time) before deploying. To see the room in Home Assistant, give the room controller an area and choose what it publishes (each light's control state, and its discovery); the same for the circadian policy's circadian and sleep switches. They control and style the lights either way.\\n\\nBefore deploying, open the \\\"your MQTT broker\\\" config node (any node's Broker setting) and set your broker's host: every node here that talks MQTT subscribes and publishes through it, with no MQTT in, MQTT out or status nodes.\",\"x\":170,\"y\":40,\"wires\":[]},{\"id\":\"example-room-lighting-motion-detected\",\"type\":\"inject\",\"name\":\"motion detected\",\"props\":[{\"p\":\"payload\",\"v\":\"{\\\"motion\\\":true}\",\"vt\":\"json\"},{\"p\":\"source\",\"v\":\"motion\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":150,\"y\":100,\"wires\":[[\"example-room-lighting-occupancy-fusion\"]]},{\"id\":\"example-room-lighting-illuminance-5-lx\",\"type\":\"inject\",\"name\":\"illuminance 5 lx\",\"props\":[{\"p\":\"payload\",\"v\":\"5\",\"vt\":\"num\"},{\"p\":\"source\",\"v\":\"illuminance\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":150,\"y\":160,\"wires\":[[\"example-room-lighting-motion-lighting-policy\"]]},{\"id\":\"example-room-lighting-wall-switch-edge\",\"type\":\"inject\",\"name\":\"wall switch edge\",\"props\":[{\"p\":\"payload\",\"v\":\"{\\\"state\\\":true}\",\"vt\":\"json\"},{\"p\":\"source\",\"v\":\"switch\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":150,\"y\":220,\"wires\":[[\"example-room-lighting-switch-lighting-policy\"]]},{\"id\":\"example-room-lighting-occupancy-fusion\",\"type\":\"home-occupancy-fusion\",\"name\":\"\",\"area\":\"\",\"presenceMode\":\"none\",\"x\":380,\"y\":100,\"wires\":[[\"example-room-lighting-motion-lighting-policy\"]],\"broker\":\"example-mqtt-broker\"},{\"id\":\"example-room-lighting-motion-lighting-policy\",\"type\":\"home-motion-lighting-policy\",\"name\":\"\",\"area\":\"\",\"onTargets\":\"[\\\"main\\\"]\",\"offTargets\":\"[\\\"main\\\"]\",\"defaultDelaySeconds\":120,\"defaultIlluminanceCutoff\":10,\"x\":620,\"y\":140,\"wires\":[[\"example-room-lighting-room-lighting-controller\"]],\"broker\":\"example-mqtt-broker\"},{\"id\":\"example-room-lighting-switch-lighting-policy\",\"type\":\"home-switch-lighting-policy\",\"name\":\"\",\"area\":\"\",\"targets\":\"[\\\"main\\\"]\",\"switchWindowMs\":500,\"switchFreshnessSeconds\":3600,\"x\":380,\"y\":220,\"wires\":[[\"example-room-lighting-room-lighting-controller\"]]},{\"id\":\"example-room-lighting-circadian\",\"type\":\"home-circadian-lighting-policy\",\"name\":\"\",\"area\":\"\",\"houseSchedule\":\"\",\"wakeTime\":\"07:00\",\"bedTime\":\"23:00\",\"maxBrightnessPct\":100,\"maxColorTempKelvin\":6500,\"sleepBrightnessPct\":1,\"sleepColorTempKelvin\":2200,\"refreshTransitionSeconds\":60,\"refreshSeconds\":60,\"initialSleep\":false,\"discoveryPrefix\":\"homeassistant\",\"idScheme\":\"node\",\"x\":620,\"y\":280,\"wires\":[[\"example-room-lighting-room-lighting-controller\"],[]],\"broker\":\"example-mqtt-broker\",\"homeAssistant\":\"off\"},{\"id\":\"example-room-lighting-room-lighting-controller\",\"type\":\"home-room-lighting-controller\",\"name\":\"\",\"area\":\"\",\"displayName\":\"\",\"targets\":\"[{\\\"id\\\":\\\"main\\\"}]\",\"initialTransitionSeconds\":1,\"x\":880,\"y\":180,\"wires\":[[],[\"example-room-lighting-room-lighting-controller-light-main\"],[]],\"idScheme\":\"node\",\"broker\":\"example-mqtt-broker\",\"homeAssistant\":\"off\"},{\"id\":\"example-room-lighting-room-lighting-controller-light-main\",\"type\":\"home-z2m-light\",\"name\":\"\",\"target\":\"main\",\"baseTopic\":\"zigbee2mqtt\",\"friendlyName\":\"\\u003cyour light\\u003e\",\"group\":false,\"x\":880,\"y\":240,\"wires\":[[],[\"example-room-lighting-room-lighting-controller\"]],\"broker\":\"example-mqtt-broker\",\"publishesThroughOutput\":false},{\"id\":\"example-mqtt-broker\",\"type\":\"mqtt-broker\",\"name\":\"your MQTT broker\",\"broker\":\"your-mqtt-broker\",\"port\":1883,\"clientid\":\"\",\"autoConnect\":true,\"usetls\":false,\"protocolVersion\":4,\"keepalive\":60,\"cleansession\":true,\"autoUnsubscribe\":true,\"birthTopic\":\"\",\"birthQos\":\"0\",\"birthRetain\":\"false\",\"birthPayload\":\"\",\"birthMsg\":{},\"closeTopic\":\"\",\"closeQos\":\"0\",\"closeRetain\":\"false\",\"closePayload\":\"\",\"closeMsg\":{},\"willTopic\":\"\",\"willQos\":\"0\",\"willRetain\":\"false\",\"willPayload\":\"\",\"willMsg\":{},\"userProps\":\"\",\"sessionExpiry\":\"\"}]",{"name":88,"path":89,"url":90,"downloadUrl":91,"flow":92},"Scene","examples\u002FScene.json","https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FScene.json","https:\u002F\u002Fraw.githubusercontent.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fmain\u002Fexamples\u002FScene.json","[{\"id\":\"example-scene-comment\",\"type\":\"comment\",\"name\":\"Scene example\",\"info\":\"Needs: No devices: Debug nodes stand in for your room lighting controller and motion lighting policy.\\n\\nOne scene, \\\"Exercise mode\\\": while it is on, it holds the room's main light off and its tv socket on, and pauses motion lighting. It ends by request, by its safety timer (4 hours), or when a device's power, from a power meter on its plug, has been used and then stays below 20 W for a minute (its End below).\\n\\nWire output 1 to your room lighting controller, whose Targets JSON names main and tv (mark the socket \\\"onOffOnly\\\": true), and set each light's area in the scene's Lights to the room's Area (a room acts only on a scene's lights for its own Area). Wire output 2 to your motion lighting policy. To start and stop it from Home Assistant, give it an area and set Publish to MQTT state and Home Assistant discovery: it reads home\u002F\\u003carea\\u003e\u002Fscene\u002Fexercise_mode\u002Fset from the broker. Replace the \\\"a device's power\\\" inject with a power meter node on the device's plug (such as a zigbee2mqtt power node), wired to the scene; set End below for your device, or clear it for no power end.\\n\\nWhen it ends, the room gives each light back what it was before the scene, and motion lighting resumes.\\n\\nBefore deploying, open the \\\"your MQTT broker\\\" config node (any node's Broker setting) and set your broker's host: every node here that talks MQTT subscribes and publishes through it, with no MQTT in, MQTT out or status nodes.\",\"x\":150,\"y\":40,\"wires\":[]},{\"id\":\"example-scene-start\",\"type\":\"inject\",\"name\":\"start\",\"props\":[{\"p\":\"scene\",\"v\":\"{\\\"kind\\\":\\\"start\\\"}\",\"vt\":\"json\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":130,\"y\":140,\"wires\":[[\"example-scene-scene\"]]},{\"id\":\"example-scene-end\",\"type\":\"inject\",\"name\":\"end\",\"props\":[{\"p\":\"scene\",\"v\":\"{\\\"kind\\\":\\\"end\\\"}\",\"vt\":\"json\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":130,\"y\":180,\"wires\":[[\"example-scene-scene\"]]},{\"id\":\"example-scene-power\",\"type\":\"inject\",\"name\":\"a device's power: 5 W\",\"props\":[{\"p\":\"power\",\"v\":\"{\\\"kind\\\":\\\"observed\\\",\\\"watts\\\":5}\",\"vt\":\"json\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":140,\"y\":240,\"wires\":[[\"example-scene-scene\"]]},{\"id\":\"example-scene-scene\",\"type\":\"home-scene\",\"name\":\"Exercise mode\",\"safetyHours\":4,\"lights\":\"[{\\\"area\\\":\\\"\\u003cyour room's area\\u003e\\\",\\\"target\\\":\\\"main\\\",\\\"state\\\":\\\"OFF\\\"},{\\\"area\\\":\\\"\\u003cyour room's area\\u003e\\\",\\\"target\\\":\\\"tv\\\",\\\"state\\\":\\\"ON\\\"}]\",\"area\":\"\",\"discoveryPrefix\":\"homeassistant\",\"idScheme\":\"node\",\"x\":720,\"y\":160,\"wires\":[[\"example-scene-rooms\"],[\"example-scene-motion\"],[]],\"broker\":\"example-mqtt-broker\",\"homeAssistant\":\"off\",\"endBelowWatts\":20,\"endBelowSeconds\":60},{\"id\":\"example-scene-rooms\",\"type\":\"debug\",\"name\":\"to your room lighting controller\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"x\":990,\"y\":120,\"wires\":[]},{\"id\":\"example-scene-motion\",\"type\":\"debug\",\"name\":\"to your motion lighting policy\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"x\":980,\"y\":160,\"wires\":[]},{\"id\":\"example-mqtt-broker\",\"type\":\"mqtt-broker\",\"name\":\"your MQTT broker\",\"broker\":\"your-mqtt-broker\",\"port\":1883,\"clientid\":\"\",\"autoConnect\":true,\"usetls\":false,\"protocolVersion\":4,\"keepalive\":60,\"cleansession\":true,\"autoUnsubscribe\":true,\"birthTopic\":\"\",\"birthQos\":\"0\",\"birthRetain\":\"false\",\"birthPayload\":\"\",\"birthMsg\":{},\"closeTopic\":\"\",\"closeQos\":\"0\",\"closeRetain\":\"false\",\"closePayload\":\"\",\"closeMsg\":{},\"willTopic\":\"\",\"willQos\":\"0\",\"willRetain\":\"false\",\"willPayload\":\"\",\"willMsg\":{},\"userProps\":\"\",\"sessionExpiry\":\"\"}]",{"name":94,"path":95,"url":96,"downloadUrl":97,"flow":98},"Shelly cover","examples\u002FShelly cover.json","https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FShelly%20cover.json","https:\u002F\u002Fraw.githubusercontent.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fmain\u002Fexamples\u002FShelly%20cover.json","[{\"id\":\"example-shelly-cover-comment\",\"type\":\"comment\",\"name\":\"Shelly cover example\",\"info\":\"Needs: A Shelly Gen2 or later device in cover mode, on your broker.\\n\\nA Shelly Gen2 device in cover mode, owned by the cover controller, with no function nodes. Set the adapter's MQTT topic prefix to your device's (its device ID unless you set one). The controller's device commands go to the adapter, which sends them to the device as its MQTT control commands; the device's status, change notifications and online state come back from the broker through the adapter as the controller's readings.\\n\\nBefore deploying, open the \\\"your MQTT broker\\\" config node (any node's Broker setting) and set your broker's host: every node here that talks MQTT subscribes and publishes through it, with no MQTT in, MQTT out or status nodes.\",\"x\":150,\"y\":40,\"wires\":[]},{\"id\":\"example-shelly-cover-open\",\"type\":\"inject\",\"name\":\"open\",\"props\":[{\"p\":\"payload\",\"v\":\"open\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":120,\"y\":140,\"wires\":[[\"example-shelly-cover-cover\"]]},{\"id\":\"example-shelly-cover-close\",\"type\":\"inject\",\"name\":\"close\",\"props\":[{\"p\":\"payload\",\"v\":\"close\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":120,\"y\":180,\"wires\":[[\"example-shelly-cover-cover\"]]},{\"id\":\"example-shelly-cover-position\",\"type\":\"inject\",\"name\":\"set position 60\",\"props\":[{\"p\":\"payload\",\"v\":\"60\",\"vt\":\"num\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"x\":140,\"y\":220,\"wires\":[[\"example-shelly-cover-cover\"]]},{\"id\":\"example-shelly-cover-cover\",\"type\":\"home-cover-controller\",\"name\":\"\",\"area\":\"\",\"presets\":\"{}\",\"positionTolerance\":2,\"invert\":false,\"travelTimeoutMs\":90000,\"maxAttempts\":2,\"pollMs\":5000,\"settleMs\":5000,\"x\":380,\"y\":160,\"wires\":[[\"example-shelly-cover-adapter\"],[\"example-shelly-cover-state\"],[]],\"broker\":\"example-mqtt-broker\"},{\"id\":\"example-shelly-cover-adapter\",\"type\":\"home-shelly-cover\",\"name\":\"\",\"topicPrefix\":\"shellyplus2pm-a8032ab12345\",\"channel\":0,\"x\":640,\"y\":160,\"wires\":[[],[\"example-shelly-cover-cover\"]],\"broker\":\"example-mqtt-broker\",\"publishesThroughOutput\":false},{\"id\":\"example-shelly-cover-state\",\"type\":\"debug\",\"name\":\"state and results\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":640,\"y\":240,\"wires\":[]},{\"id\":\"example-mqtt-broker\",\"type\":\"mqtt-broker\",\"name\":\"your MQTT broker\",\"broker\":\"your-mqtt-broker\",\"port\":1883,\"clientid\":\"\",\"autoConnect\":true,\"usetls\":false,\"protocolVersion\":4,\"keepalive\":60,\"cleansession\":true,\"autoUnsubscribe\":true,\"birthTopic\":\"\",\"birthQos\":\"0\",\"birthRetain\":\"false\",\"birthPayload\":\"\",\"birthMsg\":{},\"closeTopic\":\"\",\"closeQos\":\"0\",\"closeRetain\":\"false\",\"closePayload\":\"\",\"closeMsg\":{},\"willTopic\":\"\",\"willQos\":\"0\",\"willRetain\":\"false\",\"willPayload\":\"\",\"willMsg\":{},\"userProps\":\"\",\"sessionExpiry\":\"\"}]",{"name":100,"path":101,"url":102,"downloadUrl":103,"flow":104},"Shelly switch","examples\u002FShelly switch.json","https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FShelly%20switch.json","https:\u002F\u002Fraw.githubusercontent.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fmain\u002Fexamples\u002FShelly%20switch.json","[{\"id\":\"example-shelly-switch-comment\",\"type\":\"comment\",\"name\":\"Shelly switch example\",\"info\":\"Needs: A Shelly Gen2 or later relay behind a wall switch, on your broker.\\n\\nA wall switch wired to a Shelly Gen2 relay in detached mode, where the relay is the room's main light: the switch's presses go through the switch policy to the room controller, and the room switches the relay through the same Shelly node, with no function nodes. The adapter reads the device's own configuration (its mode and input type) each time it connects and shows it in its status. Its Target, main, is the light's id in the room's Targets JSON, marked onOffOnly; the room's light commands reach it on its input, and its readings go back to the room on its third output.\\n\\nSet the adapter's MQTT topic prefix to your device's (its device ID unless you set one). If the relay powers smart bulbs instead, leave the Target empty and wire the switch policy to the room that drives the bulbs.\\n\\nBefore deploying, open the \\\"your MQTT broker\\\" config node (any node's Broker setting) and set your broker's host: every node here that talks MQTT subscribes and publishes through it, with no MQTT in, MQTT out or status nodes.\",\"x\":150,\"y\":40,\"wires\":[]},{\"id\":\"example-shelly-switch-adapter\",\"type\":\"home-shelly-switch\",\"name\":\"\",\"topicPrefix\":\"shellyplus1-a8032ab12345\",\"channel\":0,\"mode\":\"auto\",\"x\":460,\"y\":200,\"wires\":[[],[\"example-shelly-switch-policy\"],[\"example-shelly-switch-room\"]],\"target\":\"main\",\"broker\":\"example-mqtt-broker\",\"publishesThroughOutput\":false},{\"id\":\"example-shelly-switch-policy\",\"type\":\"home-switch-lighting-policy\",\"name\":\"\",\"area\":\"\",\"targets\":\"[\\\"main\\\"]\",\"switchWindowMs\":500,\"switchFreshnessSeconds\":3600,\"x\":700,\"y\":240,\"wires\":[[\"example-shelly-switch-room\"]]},{\"id\":\"example-shelly-switch-room\",\"type\":\"home-room-lighting-controller\",\"name\":\"\",\"area\":\"\",\"displayName\":\"\",\"targets\":\"[{\\\"id\\\":\\\"main\\\",\\\"onOffOnly\\\":true}]\",\"initialTransitionSeconds\":1,\"x\":940,\"y\":240,\"wires\":[[],[\"example-shelly-switch-adapter\"],[]],\"idScheme\":\"node\",\"broker\":\"example-mqtt-broker\",\"homeAssistant\":\"off\"},{\"id\":\"example-mqtt-broker\",\"type\":\"mqtt-broker\",\"name\":\"your MQTT broker\",\"broker\":\"your-mqtt-broker\",\"port\":1883,\"clientid\":\"\",\"autoConnect\":true,\"usetls\":false,\"protocolVersion\":4,\"keepalive\":60,\"cleansession\":true,\"autoUnsubscribe\":true,\"birthTopic\":\"\",\"birthQos\":\"0\",\"birthRetain\":\"false\",\"birthPayload\":\"\",\"birthMsg\":{},\"closeTopic\":\"\",\"closeQos\":\"0\",\"closeRetain\":\"false\",\"closePayload\":\"\",\"closeMsg\":{},\"willTopic\":\"\",\"willQos\":\"0\",\"willRetain\":\"false\",\"willPayload\":\"\",\"willMsg\":{},\"userProps\":\"\",\"sessionExpiry\":\"\"}]","\u003Ch1 id=\"node-red-home-automation\">\u003Ca class=\"header-anchor\" href=\"#node-red-home-automation\">Node-RED Home Automation\u003C\u002Fa>\u003C\u002Fh1>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Factions\u002Fworkflows\u002Fci.yml\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg\" alt=\"CI\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Favantics-hq.github.io\u002Fnode-red-home-automation\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocs-GitHub%20Pages-0969da\" alt=\"Docs\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fko-fi.com\u002Favantics\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FKo--fi-support-FF5E5B?logo=ko-fi&amp;logoColor=white\" alt=\"Ko-fi\" \u002F>\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>State-aware Node-RED controllers for reliable lighting and home-theatre automation.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>\u003Ca href=\"https:\u002F\u002Favantics-hq.github.io\u002Fnode-red-home-automation\u002F\">View the smart-home programme and completed project records →\u003C\u002Fa>\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>Most home automations translate an event directly into a command. This package adds a deterministic control layer between them: it tracks desired and observed state, preserves manual control, confirms outcomes, retries bounded failures, and rejects stale work.\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>[!NOTE]\n\u003Cstrong>Under active development.\u003C\u002Fstrong> This package is changing quickly. Versions follow semver, but an update can\nstill change behaviour in ways that aren't marked as breaking. Read the release notes before updating, pin the\nversion you run, and check your flows after each update.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch2 id=\"what-it-solves\">\u003Ca class=\"header-anchor\" href=\"#what-it-solves\">What it solves\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Occupancy without flicker:\u003C\u002Fstrong> combine PIR motion with optional presence sensing before changing room state.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Circadian lighting with manual ownership:\u003C\u002Fstrong> a circadian lighting policy styles a room's lights over the day, never overwriting a light a person set or an activity holds.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Honest wall inputs:\u003C\u002Fstrong> preserve restart baselines while exposing unconfirmed, stale and unavailable physical-input evidence.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Reliable AV transitions:\u003C\u002Fstrong> coordinate AVR inputs, TV power, projector warm-up and cooldown, and motorised screens from observed state rather than blind toggles.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Honest source readiness:\u003C\u002Fstrong> model controllable, externally controlled, and unavailable playback sources without claiming success from an input selection alone.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Owned theatre atmosphere:\u003C\u002Fstrong> apply activity lighting only to active, non-manual room lights and confirm TV backlighting independently.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Bounded receiver volume:\u003C\u002Fstrong> coordinate absolute and relative requests through one transport owner while preserving later physical adjustments.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Scenes that hand everything back:\u003C\u002Fstrong> turn on \"Exercise mode\" or \"Bath\" from Home Assistant, and when it ends, by request, a safety timer or a condition in your flow, each light goes back to what it was and motion lighting resumes.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Recoverable automation:\u003C\u002Fstrong> adopt one fresh, uniquely matching physical activity after lost state; otherwise report the activity as unknown and leave the devices alone until the next request.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Favantics-hq.github.io\u002Fnode-red-home-automation\u002Fimages\u002Farchitecture.svg\" alt=\"Architecture diagram. Motion and presence sensors, through the z2m-sensor adapter for Zigbee2MQTT ones, and illuminance feed occupancy-fusion and motion-lighting-policy; wall switch presses come from the shelly-switch adapter to switch-lighting-policy. Both policies send intents to room-lighting-controller, and circadian-lighting-policy, which follows a house-schedule configuration node without wires, sends it a style. The room sends neutral light commands to each light's adapter (z2m-light) and takes back its readings. A cover-controller, which a cover-group can drive, does the same through the z2m-cover and shelly-cover adapters, and pauses motion lighting while a cover moves. Theatre activities: theatre-state-contract passes activity intents to theatre-activity-controller; your flow routes each theatreCommand by target to the equipment controllers (AVR, display mode, source capability, backlighting), which command the AV devices, or to activity-lighting-controller, which holds room lights; both report target state back. The adapters and the theatre contract use the MQTT broker, which carries device topics to and from the Zigbee2MQTT, Shelly and WLED devices. Home Assistant is only the panel: it shows state and sends set messages over MQTT.\" \u002F>\u003C\u002Fp>\n\u003Cp>Each controller keeps the desired and the observed state, sends semantic\ncommands, and reports done only when fresh observations confirm them.\u003C\u002Fp>\n\u003Ch2 id=\"included-nodes\">\u003Ca class=\"header-anchor\" href=\"#included-nodes\">Included nodes\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>In the editor's palette the nodes sit in five categories, by kind:\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Palette category\u003C\u002Fth>\n\u003Cth>Nodes (palette label: type)\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>home devices\u003C\u002Ftd>\n\u003Ctd>zigbee2mqtt light: \u003Ccode>home-z2m-light\u003C\u002Fcode>; zigbee2mqtt cover: \u003Ccode>home-z2m-cover\u003C\u002Fcode>; zigbee2mqtt sensor: \u003Ccode>home-z2m-sensor\u003C\u002Fcode>; zigbee2mqtt power: \u003Ccode>home-z2m-power\u003C\u002Fcode>; shelly switch: \u003Ccode>home-shelly-switch\u003C\u002Fcode>; shelly cover: \u003Ccode>home-shelly-cover\u003C\u002Fcode>; shelly power: \u003Ccode>home-shelly-power\u003C\u002Fcode>; wled: \u003Ccode>home-wled\u003C\u002Fcode>; everything presence one: \u003Ccode>home-everything-presence-one\u003C\u002Fcode>; apollo r pro-1: \u003Ccode>home-apollo-r-pro-1\u003C\u002Fcode>; sony bravia: \u003Ccode>home-sony-bravia\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>home lighting\u003C\u002Ftd>\n\u003Ctd>room lighting: \u003Ccode>home-room-lighting-controller\u003C\u002Fcode>; occupancy: \u003Ccode>home-occupancy-fusion\u003C\u002Fcode>; motion policy: \u003Ccode>home-motion-lighting-policy\u003C\u002Fcode>; switch policy: \u003Ccode>home-switch-lighting-policy\u003C\u002Fcode>; circadian policy: \u003Ccode>home-circadian-lighting-policy\u003C\u002Fcode>; scene: \u003Ccode>home-scene\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>home covers\u003C\u002Ftd>\n\u003Ctd>cover: \u003Ccode>home-cover-controller\u003C\u002Fcode>; cover group: \u003Ccode>home-cover-group\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>home theatre\u003C\u002Ftd>\n\u003Ctd>theatre activity: \u003Ccode>home-theatre-activity-controller\u003C\u002Fcode>; theatre contract: \u003Ccode>home-theatre-state-contract\u003C\u002Fcode>; display: \u003Ccode>home-display-mode-controller\u003C\u002Fcode>; receiver: \u003Ccode>home-avr-controller\u003C\u002Fcode>; source: \u003Ccode>home-source-capability-controller\u003C\u002Fcode>; backlighting: \u003Ccode>home-backlighting-controller\u003C\u002Fcode>; activity lighting: \u003Ccode>home-activity-lighting-controller\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>home house\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>home-house-schedule\u003C\u002Fcode> (its configuration node); house schedule mqtt: \u003Ccode>home-house-schedule-mqtt\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>Below, they come in five groups by what they do together. Each group has an\nimportable example flow (\u003Cstrong>Import → Examples\u003C\u002Fstrong> in the Node-RED editor).\u003C\u002Fp>\n\u003Ch3 id=\"room-lighting\">\u003Ca class=\"header-anchor\" href=\"#room-lighting\">Room lighting\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Motion, presence, illuminance and wall switches drive one room's lights, with\nmanual ownership, and a circadian lighting policy styles them over the day.\nWire occupancy fusion into the motion policy, wall switches into the switch\npolicy, and both policies and the circadian policy into the room controller. A\nroom without a circadian policy styles nothing: its lights just go on and off.\nThe room controller keeps a light a person set after the room went\nvacant, so motion doesn't switch it straight off. Without a Node-RED context\nstore, a motion node that restarts or is redeployed doesn't know whether the\nroom is occupied, so it counts the room as vacant from then: someone sitting\nstill in a lit room has the motion-lit lights switched off after the vacancy\ndelay unless motion is seen. After a restart the room has also forgotten which\nlights a person set, so it doesn't keep those either. Circadian\nlevels follow the circadian policy's wake and bed times (default 07:00 and\n23:00): they rise over the hour after waking, stay bright and cool through the\nday, and wind down to the sleep settings over the three hours before bed. Times\nare the Node-RED host's local time. The policy sends the room a \u003Cem>style\u003C\u002Fem> (a\nbrightness and colour temperature) once the flows start, every restyle\ninterval and at every change; the room uses it for lights it controls, never\nfor one a person set or an owner such as an activity holds. One policy can\nstyle several rooms, or each area can have its own, with its own switches in\nHome Assistant. A light that only switches on and off can be marked\n\u003Ccode>\"onOffOnly\": true\u003C\u002Fcode> in the room's targets: it is never sent brightness, colour\nor a transition.\nExample: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FRoom%20lighting.json\">\u003Ccode>Room lighting.json\u003C\u002Fcode>\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>The room controller reaches each light through an adapter: a \u003Cstrong>zigbee2mqtt\nlight\u003C\u002Fstrong> node per Zigbee2MQTT light or group. Wire the room's second output into\nevery light's node and each node's second output back into the room, and give\neach light's node a \u003Cstrong>Broker\u003C\u002Fstrong> (Node-RED's MQTT broker node): it subscribes to\nthe light's topics and publishes its commands itself, and reads the light each\ntime the broker connects. (Without a Broker, as before 6.2, its first output\ngoes to MQTT out unchanged and an MQTT in node on the light's\n\u003Ccode>&lt;base&gt;\u002F&lt;friendly name&gt;\u002F#\u003C\u002Fcode> feeds it.) The light's node tells the room's\nown commands from other people's on the light's \u003Ccode>\u002Fset\u003C\u002Fcode> topic, so a function\nthat rewrites them on the way makes them look like someone else's. To stop that\nbecoming a loop, a bare ON or OFF that arrives within 5 seconds of one of its\nown commands with that power, before that command has come back on the topic,\nis taken as that command, and the room restyles a light after someone else's\nbare ON at most once every 5 seconds. A person's bare ON or OFF in that moment\nis taken as the room's own, which changes nothing, as the light is already being\nset that way; other rewrites can still be misread. The node also skips a\nrestyle the light already shows.\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Node\u003C\u002Fth>\n\u003Cth>Purpose\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-occupancy-fusion\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Combines PIR motion with optional presence sensing.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-z2m-sensor\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Connects one Zigbee2MQTT motion, presence or light sensor: its occupancy and presence to occupancy fusion, its light level to the motion policy.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-everything-presence-one\u003C\u002Fcode>, \u003Ccode>home-apollo-r-pro-1\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Connect those ESPHome presence sensors the same way, one node per device, finding their entities from the device's own MQTT discovery (or the node's preset without it); while the device is online, its retained state at a restart is the room's starting point.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-motion-lighting-policy\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Converts occupancy and illuminance into lighting intent. A \u003Ccode>delay\u003C\u002Fcode> message (in seconds) or \u003Ccode>illuminance-cut-off\u003C\u002Fcode> message overrides its settings until they are changed and redeployed. The house-wide \u003Ccode>global-enabled\u003C\u002Fcode> is deprecated and removed in 7.0: send \u003Ccode>area-enabled\u003C\u002Fcode> to each policy instead.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-switch-lighting-policy\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Converts raw edges or pre-classified button actions into lighting intent while exposing input freshness and availability.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-circadian-lighting-policy\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Styles rooms over the day: brightness and colour temperature from wake and bed times, sleep mode, and circadian and sleep switches for Home Assistant.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-room-lighting-controller\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Owns the room's light commands, manual and held lights, and lighting state, and applies the style it is sent.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-z2m-light\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Connects one Zigbee2MQTT light or group to a room controller: the room's neutral commands become Zigbee2MQTT's \u003Ccode>\u002Fset\u003C\u002Fcode> messages, and the light's reports become readings.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-shelly-switch\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Connects one switch channel of a Shelly Gen2+ relay as the device is set up: a detached wall switch's presses to the switch policy, or the relay as the light; with a Target, the relay is a room light on the neutral light contract.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>A Shelly Gen2 or later relay behind a wall switch wires straight in through the\nShelly switch adapter, with no function nodes: give it a \u003Cstrong>Broker\u003C\u002Fstrong> and it\nsubscribes to the device's \u003Ccode>&lt;prefix&gt;\u002F#\u003C\u002Fcode> and publishes to it itself (without\none, an MQTT in node on \u003Ccode>&lt;prefix&gt;\u002F#\u003C\u002Fcode> feeds it and its first output goes to an\nMQTT out node). It reads the device's own configuration for its channel (with\n\u003Ccode>Shelly.GetConfig\u003C\u002Fcode>, the reply addressed under the device's prefix so its own\nsubscription receives it) each time the broker connects and whenever the device comes online, and shows what it found. In\ndetached mode, the switch's\npresses go to the switch policy: a toggle switch's on\u002Foff as edges, with the\ndevice's status as the baseline, and a push button's single, double or long\npresses as actions (the switch policy acts on single and double; long is passed\non for later use). Without a Target, the relay stays on to power smart bulbs:\nit is never commanded, and a relay that reports off is flagged, as the bulbs\nhave lost power. In any other mode the relay is the light: the node reports its\nstate and takes on and off. Its \u003Cstrong>Mode\u003C\u002Fstrong> setting overrides what was read, and\ndecides when the configuration can't be read.\u003C\u002Fp>\n\u003Cp>When the relay is a room light (ordinary bulbs), give the node a \u003Cstrong>Target\u003C\u002Fstrong>:\nthe light's id in the room's Targets JSON, marked \u003Ccode>\"onOffOnly\": true\u003C\u002Fcode>. The node\nis then that light's adapter on the neutral light contract, in detached or any\nother mode: wire the room's second output into it and its third output back\ninto the room. The room's ON and OFF switch the relay, an \u003Ccode>observe\u003C\u002Fcode> asks for its\nstatus, and its reports come back as readings, with a change nobody here asked\nfor (a person at a switch the relay follows, the Shelly app, someone else's\ncommand on its topic) as \u003Ccode>external\u003C\u002Fcode>. Detached, the presses still go to the\nswitch policy. \u003Ccode>msg.switchState\u003C\u002Fcode> and \u003Ccode>msg.switchCommand\u003C\u002Fcode> work as before.\nExample: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FShelly%20switch.json\">\u003Ccode>Shelly switch.json\u003C\u002Fcode>\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>One house schedule can set the wake and bed times for many rooms. It is a\nconfiguration node, like an MQTT broker: choose it as a circadian lighting\npolicy's \u003Cstrong>Schedule\u003C\u002Fstrong> and the policy follows it, hearing of every change\nwithout wires. Those policies then have no wake and bed time entities of their\nown in Home Assistant. A policy that needs its own times (a child's room, say)\nchooses none. Deleting the house schedule in the editor returns its policies to\ntheir own times.\nThe optional house schedule MQTT node publishes the schedule's times and Home\nAssistant time entities, and takes changes from them.\nExample: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FHouse%20schedule.json\">\u003Ccode>House schedule.json\u003C\u002Fcode>\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Node\u003C\u002Fth>\n\u003Cth>Purpose\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-house-schedule\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>A configuration node: one wake and bed time for every circadian lighting policy that uses it.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-house-schedule-mqtt\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Publishes a house schedule for Home Assistant and changes it from Home Assistant.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Ch3 id=\"scenes\">\u003Ca class=\"header-anchor\" href=\"#scenes\">Scenes\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>A scene, such as \"Exercise mode\" or \"Bath\", takes some of a room's lights for\na while: it holds each on or off with the values it gives them, and pauses\nmotion lighting. It ends by request, by its safety timer (4 hours by default;\n0 turns it off), when a device's power, from a power meter node on its plug,\nstays below its End below for a while, or when your flow sends it an end. Each room then gives its lights back what they were (see \"Room\nlight control\"): a light the room was running is the room's again, on or off\nas it was, in the room's style as it is now; one that was off goes off; one a\nperson had set gets their values back. A light a person changes during the\nscene stays theirs. Scenes stack: a newer scene holding the same light hands it\nback to the older one when it ends.\u003C\u002Fp>\n\u003Cp>Wire the scene's first output to each room lighting controller whose lights it\nsets, and its second to each motion lighting policy to pause. To start and\nstop it from Home Assistant, give it an area, set \u003Cstrong>Publish\u003C\u002Fstrong> to \u003Cem>MQTT state\nand Home Assistant discovery\u003C\u002Fem> and choose its \u003Cstrong>Broker\u003C\u002Fstrong>: it reads\n\u003Ccode>home\u002F&lt;area&gt;\u002Fscene\u002F&lt;name&gt;\u002Fset\u003C\u002Fcode> from the broker itself.\nIts lights are listed by their room's Area and their ids in that room's\nTargets JSON; a socket is a target marked \u003Ccode>\"onOffOnly\": true\u003C\u002Fcode>. A room acts only\non a scene's lights for its own Area, so set the Area on each room a scene uses;\ntwo rooms may each have a \u003Ccode>main\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-json\">[{\"area\": \"gym\", \"target\": \"main\", \"state\": \"OFF\"}, {\"area\": \"gym\", \"target\": \"tv\", \"state\": \"ON\"},\n {\"area\": \"gym\", \"target\": \"lamp\", \"state\": \"ON\", \"brightnessPct\": 30, \"colorTempKelvin\": 2700}]\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Start it with \u003Ccode>msg.scene = {kind: \"start\"}\u003C\u002Fcode> and end it with\n\u003Ccode>msg.scene = {kind: \"end\", by: \"door opened\"}\u003C\u002Fcode> (\u003Ccode>by\u003C\u002Fcode> is optional and shows\non its status). Example: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FScene.json\">\u003Ccode>Scene.json\u003C\u002Fcode>\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Node\u003C\u002Fth>\n\u003Cth>Purpose\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-scene\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>One scene: holds room lights on or off and pauses motion while on, and hands everything back when it ends; a Home Assistant switch starts and stops it.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Ch3 id=\"home-theatre-equipment\">\u003Ca class=\"header-anchor\" href=\"#home-theatre-equipment\">Home theatre equipment\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Each controller owns one kind of device. It accepts a generation-scoped intent,\nsends commands for your device transport on output 1, and reports target state\non output 2. Example: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FHome%20theatre%20equipment.json\">\u003Ccode>Home theatre equipment.json\u003C\u002Fcode>\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Node\u003C\u002Fth>\n\u003Cth>Purpose\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-avr-controller\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Owns AVR power, zones, source selection and bounded absolute or relative volume from observed state.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-display-mode-controller\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Coordinates TV, projector, and screen transitions.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-source-capability-controller\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Gates source readiness on fresh availability, active-device, application or playback evidence.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-backlighting-controller\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Owns TV-backlight power with observation-gated confirmation.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-z2m-power\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Reads a Zigbee2MQTT plug or meter's power as \u003Ccode>msg.power\u003C\u002Fcode>: the display controller's projector power, or a scene's End below.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-sony-bravia\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Reads and sets a Sony Bravia TV's power over its own local REST API, for the display controller: wire the controller's third output into it and its output back. The controller's own TV host is deprecated and removed in 7.0, as is its screen host: its screen is a cover node, such as \u003Ccode>home-shelly-cover\u003C\u002Fcode>, on the same output.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-shelly-power\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Reads the power a Shelly Gen2+ switch channel meters (\u003Ccode>apower\u003C\u002Fcode>) as \u003Ccode>msg.power\u003C\u002Fcode>, over the device's own MQTT: the display controller's projector power, or a scene's End below. The controller's own power meter host is deprecated and removed in 7.0.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-wled\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Connects a WLED strip to a backlighting controller over WLED's own MQTT: on and off, read back from the brightness WLED reports.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>The display controller reads the projector's power from any meter or adapter:\nsend \u003Ccode>msg.display = {kind: \"observed\", device: \"projector\", power: \"on\"}\u003C\u002Fcode>\n(\u003Ccode>\"on\"\u003C\u002Fcode>, \u003Ccode>\"standby\"\u003C\u002Fcode> or \u003Ccode>\"transitioning\"\u003C\u002Fcode>), or \u003Ccode>watts\u003C\u002Fcode> from a meter. Its\nbuilt-in Shelly meter is optional. Without one, it asks for a reading on output\n3 whenever it needs one; wire that to your meter, unless the meter reports on\nits own at least once per query timeout. A device that doesn't report fails\nthe request with reason \u003Ccode>no-reading\u003C\u002Fcode>. The node's help has the details.\u003C\u002Fp>\n\u003Cp>For projector mode it opens the screen to its \u003Cstrong>Screen viewing position\u003C\u002Fstrong>, or,\nleft empty (the default for a new node), by the screen's own open command,\nconfirmed when the screen reports itself fully open. A node saved with a\nposition keeps it.\u003C\u002Fp>\n\u003Ch3 id=\"theatre-activities\">\u003Ca class=\"header-anchor\" href=\"#theatre-activities\">Theatre activities\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>One request, such as \"tv\" or \"off\", drives every target. The state contract\nturns MQTT requests into activity intents and publishes retained state; the\nactivity controller plans each target and sends \u003Ccode>msg.theatreCommand\u003C\u002Fcode> messages.\nYour flow routes each command by its \u003Ccode>target\u003C\u002Fcode> (\u003Ccode>avr\u003C\u002Fcode>, \u003Ccode>display\u003C\u002Fcode>, \u003Ccode>source\u003C\u002Fcode>,\n\u003Ccode>lighting\u003C\u002Fcode>, \u003Ccode>backlighting\u003C\u002Fcode>) to the matching controller's input\n(\u003Ccode>msg.avr\u003C\u002Fcode>, \u003Ccode>msg.display\u003C\u002Fcode>, \u003Ccode>msg.sourceCapability\u003C\u002Fcode>, \u003Ccode>msg.activityLighting\u003C\u002Fcode>,\n\u003Ccode>msg.backlighting\u003C\u002Fcode>); the example does this with one switch node and a change\nnode per target. Every controller reports its progress on output 2 as\n\u003Ccode>msg.theatre = {kind: \"target_state\", target, requestId, generation, status, observedAt}\u003C\u002Fcode>, alongside its own events: wire each controller's output 2 straight\nback to the activity controller. The activity controller refreshes settled\ntargets, and each controller answers a refresh from fresh readings. Activity\nlighting feeds the room lighting controller.\nExample: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FHome%20theatre%20activity.json\">\u003Ccode>Home theatre activity.json\u003C\u002Fcode>\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Node\u003C\u002Fth>\n\u003Cth>Purpose\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-theatre-state-contract\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Bridges non-retained activity requests to retained MQTT truth and, optionally, HA discovery.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-theatre-activity-controller\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Owns latest-request-wins activity state and aggregates target evidence.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-activity-lighting-controller\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Applies activity styles to room lights and holds them while the activity is active.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>Pure TypeScript policy modules live in \u003Ccode>lib\u002F\u003C\u002Fcode>; thin Node-RED runtime and editor adapters live in \u003Ccode>nodes\u002F\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>Importable example flows for the Node-RED editor live in \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Ftree\u002Fmain\u002Fexamples\">\u003Ccode>examples\u002F\u003C\u002Fcode>\u003C\u002Fa> (\u003Cstrong>Import → Examples\u003C\u002Fstrong>). Executable, deployment-neutral contract examples live in \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Ftree\u002Fmain\u002Fcontract-examples\">\u003Ccode>contract-examples\u002F\u003C\u002Fcode>\u003C\u002Fa> and exercise the same reducers as the runtime adapters.\u003C\u002Fp>\n\u003Ch3 id=\"covers\">\u003Ca class=\"header-anchor\" href=\"#covers\">Covers\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>One cover controller owns one position cover: a blind, shutter or curtain motor\nthat takes and reports a position from 0 (closed) to 100 (open). Send it\n\u003Ccode>\"open\"\u003C\u002Fcode>, \u003Ccode>\"close\"\u003C\u002Fcode>, \u003Ccode>\"stop\"\u003C\u002Fcode>, a position, or the name of a preset such as\n\u003Ccode>partial\u003C\u002Fcode>. It confirms a move from what the cover reports, retries a bounded\nnumber of times, and leaves a cover a person moved where they put it. A move is\nconfirmed only once the cover has stopped at the target, from a \u003Ccode>stopped\u003C\u002Fcode>\nmotion report or the same position for the settle time (with or without\nanother report), so a transport that echoes the requested position at once\ndoesn't end the move early. Set the settle time to at least how often the\nmotor reports while it travels: otherwise an echo can be confirmed before the\nfirst travel report arrives. An\nautomatic target, such as a position computed from the weather, sets\n\u003Ccode>msg.respectManual = true\u003C\u002Fcode> so it waits while a person's move holds; a target\nthe cover is already at is confirmed without a command. A button can send\n\u003Ccode>msg.stopIfMoving = true\u003C\u002Fcode> with \u003Ccode>\"open\"\u003C\u002Fcode> or \u003Ccode>\"close\"\u003C\u002Fcode> to stop the cover if it is\nmoving and do the request otherwise. The cover's availability report\n(\u003Ccode>{kind: \"availability\", online}\u003C\u002Fcode>) keeps requests from going to an offline\ndevice: they are answered \u003Ccode>unavailable\u003C\u002Fcode>, and the cover is read again when it is\nback. A motor with no reliable position can be set to \u003Cem>open, close and\nstop only\u003C\u002Fem>: it confirms a move from a reported end state, or from a move that\nran for its full travel time, and says when it could only judge by travel time\nor could not confirm at all. Its third output says whether the cover is\nmoving, so other policies can react. To pause motion lighting while a blind\nmoves, send it to the motion policy's pause input\n(\u003Ccode>msg.source = \"pause\"\u003C\u002Fcode>, \u003Ccode>msg.payload\u003C\u002Fcode> true or false, \u003Ccode>msg.owner\u003C\u002Fcode> naming the\ncover), as the example does; a pause lasts at most the motion policy's\n\u003Cstrong>Maximum pause\u003C\u002Fstrong> unless sent again; never its enable (\u003Ccode>area-enabled\u003C\u002Fcode>), which is the\nuser's own switch. Device commands come out in a neutral\nshape (\u003Ccode>set_position\u003C\u002Fcode>, \u003Ccode>stop\u003C\u002Fcode> or \u003Ccode>observe\u003C\u002Fcode>); the example flow wires them to and\nfrom a Zigbee2MQTT cover through the Zigbee2MQTT cover adapter (below). Battery\nand charging status are kept as reported facts and never acted on.\u003C\u002Fp>\n\u003Cp>Switched on, a cover node publishes its state (and position) under\n\u003Ccode>home\u002F&lt;area&gt;\u002Fcover\u002F&lt;name&gt;\u002F\u003C\u002Fcode>, named by its \u003Cstrong>Name in topics\u003C\u002Fstrong> (no default: give\neach cover in a room its own), and announces a Home Assistant cover entity of that name. Its open,\nclose and stop (and, for a position cover, set position) come back to the cover node on its own set topics\nas requests like any other, carried out and confirmed as above; nothing\ncommands the device through Home Assistant. A cover group has no entity of its\nown: Home Assistant can group the covers' entities itself.\u003C\u002Fp>\n\u003Cp>A cover group moves several covers as one, such as the left and right of a\ncurtain: it sends each member the request on that member's own output, labelled\nfrom its Members setting, and reports ready only when every member confirms,\nor, if only some do, which did what.\nExample: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FCover%20pair.json\">\u003Ccode>Cover pair.json\u003C\u002Fcode>\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>A Shelly Gen2 or later device in cover mode wires straight to a cover\ncontroller through the Shelly cover adapter, with no function nodes: give it a\n\u003Cstrong>Broker\u003C\u002Fstrong> and it subscribes to the device's \u003Ccode>&lt;prefix&gt;\u002F#\u003C\u002Fcode> and publishes to it\nitself, and reads the cover each time the broker connects; the controller's\ndevice commands go to it, and its second output goes back to the controller.\n(Without a Broker, an MQTT in node on \u003Ccode>&lt;prefix&gt;\u002F#\u003C\u002Fcode> feeds it and its first\noutput goes to an MQTT out node.) It speaks the device's own MQTT API, never\nHome Assistant: it sends \u003Ccode>pos,&lt;0-100&gt;\u003C\u002Fcode>, \u003Ccode>stop\u003C\u002Fcode>, and \u003Ccode>status_update\u003C\u002Fcode> (for a fresh\nreading) on \u003Ccode>&lt;prefix&gt;\u002Fcommand\u002Fcover:&lt;id&gt;\u003C\u002Fcode> (the device's MQTT Control, on by\ndefault), and turns the device's status and\nchange notifications into position and motion readings, and its online topic\ninto availability. A cover that isn't calibrated, or has lost its position,\nfails the command in hand with the reason rather than reporting a position.\nExample: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FShelly%20cover.json\">\u003Ccode>Shelly cover.json\u003C\u002Fcode>\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>A Zigbee2MQTT cover wires the same way through the Zigbee2MQTT cover adapter:\nset its base topic (\u003Ccode>zigbee2mqtt\u003C\u002Fcode> by default), the device's friendly name and\nits \u003Cstrong>Broker\u003C\u002Fstrong>, and it subscribes to \u003Ccode>&lt;base&gt;\u002F&lt;friendly name&gt;\u003C\u002Fcode> and its\n\u003Ccode>\u002Favailability\u003C\u002Fcode> itself (without a Broker, MQTT in nodes on those feed it and\nits first output goes to an MQTT out node). It sends\n\u003Ccode>{\"position\": n}\u003C\u002Fcode> and \u003Ccode>{\"state\": \"OPEN\" | \"CLOSE\" | \"STOP\"}\u003C\u002Fcode> on the device's\n\u003Ccode>\u002Fset\u003C\u002Fcode>, and asks for a fresh reading on its \u003Ccode>\u002Fget\u003C\u002Fcode>. Each state report becomes a\nposition reading, with motion from \u003Ccode>motor_state\u003C\u002Fcode> or \u003Ccode>moving\u003C\u002Fcode> where the device\nreports one; a cover that reports none is confirmed by the controller's settle\ntime. A cover with no position (set the controller to open, close and stop\nonly) reports its end state once its motion says it has stopped.\nExample: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fblob\u002Fmain\u002Fexamples\u002FCover%20control.json\">\u003Ccode>Cover control.json\u003C\u002Fcode>\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Node\u003C\u002Fth>\n\u003Cth>Purpose\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-cover-controller\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Owns one cover's moves (a position cover, or open, close and stop only), confirmed from what it reports, with presets, manual ownership and a moving signal.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-cover-group\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Moves several covers as one, with an honest result when only some confirm.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-shelly-cover\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Connects a Shelly Gen2+ cover to a cover controller over the device's own MQTT API.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>home-z2m-cover\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Connects a Zigbee2MQTT cover to a cover controller over Zigbee2MQTT's MQTT messages.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Ch2 id=\"requirements\">\u003Ca class=\"header-anchor\" href=\"#requirements\">Requirements\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Node.js 22.9 or newer, as Node-RED 5 (releases 6.0.0 to 6.3.0 asked for 24)\u003C\u002Fli>\n\u003Cli>Node-RED 5.0.0 or newer\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"install\">\u003Ca class=\"header-anchor\" href=\"#install\">Install\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>In Node-RED, open \u003Cstrong>Manage palette → Install\u003C\u002Fstrong> and search for\n\u003Ccode>@avantics\u002Fnode-red-home-automation\u003C\u002Fcode>. Or install it from your Node-RED user\ndirectory (usually \u003Ccode>~\u002F.node-red\u003C\u002Fcode>) and restart Node-RED:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-sh\">npm install @avantics\u002Fnode-red-home-automation\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Each \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Freleases\">GitHub Release\u003C\u002Fa>\nalso attaches the package tarball and its SHA-256 checksum. Download both into\none folder and check the tarball there (on macOS, \u003Ccode>shasum -a 256 -c\u003C\u002Fcode> instead):\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-sh\">sha256sum -c avantics-node-red-home-automation-&lt;version&gt;.tgz.sha256\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>It prints the tarball's name and \u003Ccode>OK\u003C\u002Fcode>. Checksum files from releases up to\n6.1.0 name it as \u003Ccode>release\u002F…tgz\u003C\u002Fcode>: put the tarball in a \u003Ccode>release\u003C\u002Fcode> folder beside\nthe checksum file to check those. Install a downloaded tarball through\n\u003Cstrong>Manage palette → Install → Upload module\u003C\u002Fstrong>, or with:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-sh\">npm install \u002Fpath\u002Fto\u002Favantics-node-red-home-automation-6.5.0.tgz\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Add the installed nodes from the \u003Cstrong>home automation\u003C\u002Fstrong> section of the Node-RED palette, then configure the room, device hosts, MQTT topics, source mappings, and timing limits for your deployment.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Choose a Broker on each node that talks MQTT\u003C\u002Fstrong> (Node-RED's own MQTT broker\nconfig node, the one MQTT in and out nodes use): the device adapters subscribe\nto their devices' topics and publish to them, and the publishing nodes publish\ntheir state and Home Assistant discovery and read their set topics, each by\nitself. No MQTT in, MQTT out or Status nodes are needed around them, and each\nannounces itself again every time the broker connects. A node's edit dialog\noffers the first broker in your flows. Nodes saved before 6.2 keep working\nthrough their MQTT in and out nodes until you choose one; the example flows\nuse one broker node, \"your MQTT broker\", whose host you set.\u003C\u002Fp>\n\u003Ch3 id=\"650\">\u003Ca class=\"header-anchor\" href=\"#650\">6.5.0\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Nothing to migrate from 6.4.0. The display controller's own device\nconnections move into device nodes, and three of its settings are deprecated.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Device nodes for the display.\u003C\u002Fstrong> The display mode controller no longer needs\nto talk to its devices itself. Leave a device's host empty, wire the\ncontroller's output 3 into its device node, and that node's output back into\nthe controller:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>sony bravia\u003C\u002Fstrong> (\u003Ccode>home-sony-bravia\u003C\u002Fcode>) reads and sets a Bravia TV's power over\nthe TV's own local REST API, with its pre-shared key kept as a credential.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The screen\u003C\u002Fstrong> goes through the cover contract: a shelly cover node (or any\ncover node) drives it. The shelly cover node now also acts on open and close,\nso an open-close cover controller drives a calibrated Shelly cover too, and a\ncover it knows is uncalibrated refuses them without moving.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>shelly power\u003C\u002Fstrong> (\u003Ccode>home-shelly-power\u003C\u002Fcode>) reads a Shelly switch channel's\nmetered watts over MQTT as the projector's power, like zigbee2mqtt power.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cstrong>Deprecated: the display controller's TV host, screen host and projector meter\nhost.\u003C\u002Fstrong> Each still works, but warns once per deploy and says so on its status;\nthey're removed in 7.0, along with the TV's pre-shared key on the controller.\u003C\u002Fp>\n\u003Cp>Also fixed:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>A display controller's request no longer fails \u003Ccode>no-reading\u003C\u002Fcode> when its\nzigbee2mqtt power meter's draw is steady: after a read, the next report is\npassed on even when unchanged (#236).\u003C\u002Fli>\n\u003Cli>Each reference page shows its node's palette category, taken from the node\n(#231), and an orphaned page for a node that doesn't exist is gone (#233).\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3 id=\"640\">\u003Ca class=\"header-anchor\" href=\"#640\">6.4.0\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Nothing to migrate from 6.3.0.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Node.js 22.9 or newer again.\u003C\u002Fstrong> The package's minimum is back to Node-RED 5's\nown, 22.9; releases 6.0.0 to 6.3.0 asked for 24. Node.js 24 still works. This\nalso clears the Flow Library scorecard's Node.js warning.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>The nodes are grouped by kind.\u003C\u002Fstrong> The editor's palette has five categories\n(home devices, home lighting, home covers, home theatre, home house) instead\nof one, and every node has a short palette label, such as \"zigbee2mqtt light\"\nor \"receiver\". Node types are unchanged, so saved flows are untouched. The\nREADME and the documentation site list the nodes the same way.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Deprecated: the house-wide motion enable.\u003C\u002Fstrong> \u003Ccode>global-enabled\u003C\u002Fcode>, sent to any\nmotion lighting policy, still switches motion lighting for every policy, but\neach policy now warns once per deploy. Send \u003Ccode>area-enabled\u003C\u002Fcode> to each motion\nlighting policy instead; \u003Ccode>global-enabled\u003C\u002Fcode> is removed in 7.0.\u003C\u002Fp>\n\u003Ch3 id=\"630\">\u003Ca class=\"header-anchor\" href=\"#630\">6.3.0\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Nothing to migrate from 6.2.0. New device nodes replace hand-wired MQTT in,\nchange and function nodes for sensors, power meters and a WLED backlight, and\nthe theatre now recovers its activity after a restart.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Sensors.\u003C\u002Fstrong> Each feeds occupancy fusion (motion and presence, output 1) and\nthe motion lighting policy (light level in lux, output 2), sends only changes,\nand shows offline on its status:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>zigbee2mqtt sensor\u003C\u002Fstrong> (\u003Ccode>home-z2m-sensor\u003C\u002Fcode>), one per Zigbee2MQTT motion or\npresence sensor, with an \"Occupancy is\" setting for presence-only devices. A\nretained occupancy is never acted on.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Everything Presence One\u003C\u002Fstrong> and \u003Cstrong>Apollo R PRO-1\u003C\u002Fstrong> (ESPHome), one node per\ndevice. Each finds its sensors from the device's own MQTT discovery, so a\nfirmware rename can't break it, and falls back to known entity names\nwithout it. Turn on \u003Ccode>mqtt: discovery: true\u003C\u002Fcode> in the device's ESPHome\nconfiguration to use discovery.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Occupancy fusion takes a start-up baseline\u003C\u002Fstrong> from the ESPHome nodes: a room\nempty at start waits out its vacancy time, and an occupied one switches\nnothing on.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cstrong>Power.\u003C\u002Fstrong> A \u003Cstrong>zigbee2mqtt power\u003C\u002Fstrong> node (\u003Ccode>home-z2m-power\u003C\u002Fcode>) reports a plug's\nwatts. The display controller takes it as the projector's power, and a scene's\nnew \u003Cstrong>End below\u003C\u002Fstrong> setting ends the scene once the device has been used and\nthen stays below the threshold for the set time.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>WLED.\u003C\u002Fstrong> A \u003Cstrong>wled\u003C\u002Fstrong> node (\u003Ccode>home-wled\u003C\u002Fcode>) drives a WLED strip for the\nbacklighting controller: on and off, and its brightness as the reading. WLED\ncan't be asked for its state over MQTT, so after a restart its reading comes\nat its next change.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>The theatre after a restart.\u003C\u002Fstrong> With nothing saved, the display, receiver,\nsource and backlighting controllers now answer the activity controller's\nprobe with what their devices show, and the theatre adopts the one activity\nthat matches, commanding nothing. It needs the display and receiver to have\nanswered; a device that can't be asked, such as a WLED backlight, shows as\nunobserved until it reports.\u003C\u002Fp>\n\u003Cp>Also changed:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>A theatre light that never reports ends \u003Cstrong>unobserved\u003C\u002Fstrong> after the\nconfirmation timeout, leaving the theatre ready but degraded instead of\nconfirming forever, and a Zigbee2MQTT group with no state says to set\n\u003Ccode>retain: true\u003C\u002Fcode> for it (#186).\u003C\u002Fli>\n\u003Cli>Each device node's reference links to its maker's or project's\ndocumentation.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3 id=\"620\">\u003Ca class=\"header-anchor\" href=\"#620\">6.2.0\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Nothing to migrate from 6.1.0: flows wired the 6.1.0 way keep working. Two\nthings are worth doing when you're ready.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Choose a Broker, and delete the MQTT plumbing around your nodes.\u003C\u002Fstrong> Every\nnode that publishes, and every device adapter, has a new \u003Cstrong>Broker\u003C\u002Fstrong> setting:\nNode-RED's own MQTT broker node. With one, the node talks MQTT itself:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>publishing nodes publish their state and Home Assistant discovery, and read\ntheir set topics, themselves;\u003C\u002Fli>\n\u003Cli>device adapters (zigbee2mqtt light and cover, Shelly cover and switch)\nsubscribe to their device's topics and send its commands themselves, and read\nthe device each time the broker connects;\u003C\u002Fli>\n\u003Cli>each time the broker connects, and each time Home Assistant restarts, a node\nruns its startup and announces everything again, so entities come back by\nthemselves.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The MQTT out, the MQTT in for set or device topics, and the Status node around\nthat node can then be deleted. A node keeps working through its old wiring\nuntil you choose a broker: an output it no longer needs goes quiet, and a\nmessage it now gets from the broker itself is ignored, with a trace. Opening\nand saving a node offers the first broker in your flows. The examples show the\nnew wiring.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>One Publish setting.\u003C\u002Fstrong> \"Publish state over MQTT\" and \"Home Assistant\ndiscovery\" become one choice, \u003Cstrong>Publish\u003C\u002Fstrong>: Don't publish, MQTT state, or MQTT\nstate and Home Assistant discovery. Saved nodes read their old settings\nexactly as before.\u003C\u002Fp>\n\u003Cp>Also new in 6.2.0:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>A scene node\u003C\u002Fstrong> (\u003Ccode>home-scene\u003C\u002Fcode>): one per scene, such as Bath or Exercise mode.\nWhile on, it holds some rooms' lights on or off and pauses motion lighting.\nWhen it ends, by request, by its safety timer (4 hours by default) or by a\nmessage your flow sends, each room gives its lights back what they were.\nScenes stack, a person's change during a scene stands, and Home Assistant\ngets a switch for each. Lights are named by their room's Area and id.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A Shelly relay as a room light.\u003C\u002Fstrong> Give a Shelly switch node a Target and it\nbecomes that light's adapter, in detached or relay mode.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Fixed:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Motion lighting acts on a vacancy that came while it was paused or switched\noff, so lights in an empty room go off when a scene or activity ends (#193).\u003C\u002Fli>\n\u003Cli>A cover acts only on its own set topics; wired to a wildcard, its own or\nanother cover's published state no longer moves it (#198).\u003C\u002Fli>\n\u003Cli>The theatre state contract publishes a retained topic only when it changes,\ninstead of every topic on each target refresh (#206).\u003C\u002Fli>\n\u003Cli>A theatre target's confirmation time is measured once per transition (#208),\nand an untimed transition no longer counts as 0 ms in the latency objective\n(#210).\u003C\u002Fli>\n\u003Cli>The release checksum file names the tarball alone, so \u003Ccode>sha256sum -c\u003C\u002Fcode> works\nnext to a download (#178).\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3 id=\"610\">\u003Ca class=\"header-anchor\" href=\"#610\">6.1.0\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Nothing to migrate from 6.0.0, but check one wiring change: publishing nodes\nnow announce themselves when MQTT out connects.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Wire a Status node watching MQTT out into each publishing node.\u003C\u002Fstrong> Node-RED's\nMQTT broker node connects after the flows start and drops anything sent before\nthen, so in 6.0.0 the Home Assistant discovery and availability a node announced\nas the flows started could be lost after a restart or a full deploy (#185). A\nmessage from a Status node whose scope is your MQTT out node now counts as the\nnode's startup message when it reports \"connected\", including after every\nreconnect. An existing startup inject keeps working. From 6.2, choose a\n\u003Cstrong>Broker\u003C\u002Fstrong> on the node instead: it announces itself on every connect, and the\nStatus node is no longer needed.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Room owners hold lights on or off, stack, and give lights back.\u003C\u002Fstrong> An owner,\nsuch as an activity or the coming scene node, now keeps a light it switches\noff held off, so motion leaves it alone. Owners stack per light: the newest\nholds a shared light and hands it to the one beneath when it releases. When the\nlast owner lets go, a light the room was running is the room's again, a light\nthat was off goes off, and a light a person set gets its values back and stays\nmanual. In a home theatre, a light a person changed during an activity and a\nlater request took back now gets the person's values back when the activity\nends.\u003C\u002Fp>\n\u003Cp>Also fixed:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Zigbee2MQTT light nodes\u003C\u002Fstrong> no longer log an error for every command meant for\nanother light in the same room (#184).\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Zigbee2MQTT groups:\u003C\u002Fstrong> the docs recommend \u003Ccode>retain: true\u003C\u002Fcode> under the group in\nZigbee2MQTT's \u003Ccode>configuration.yaml\u003C\u002Fcode>, so the room has a group's state after a\nrestart (#186).\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3 id=\"600\">\u003Ca class=\"header-anchor\" href=\"#600\">6.0.0\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Circadian lighting becomes its own node, the room controller reaches its\nlights through light adapters, 6.0 requires Node.js 24, and it removes what 5.0\nkept working for a release. Check these after upgrading from 5.x; each shows\nitself rather than failing silently.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Every room lighting controller needs migrating.\u003C\u002Fstrong> Two things moved out of the\nroom controller: circadian lighting, sleep, the wake and bed times and the house\nschedule, to a new \u003Cstrong>circadian lighting policy\u003C\u002Fstrong>; and each light's Zigbee2MQTT\ntopics, to a \u003Cstrong>zigbee2mqtt light\u003C\u002Fstrong> node per light, which now speaks to the\nlight. A room saved before 6.0 is an \u003Cem>invalid configuration\u003C\u002Fem> until you migrate\nit, and its lights don't respond to anything until then. Every room saved by\n5.x has both, so migrate each one; its edit dialog lists everything below. One\nedit covers both moves:\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Its lights.\u003C\u002Fstrong> In the room's dialog, click \u003Cstrong>Create Zigbee2MQTT light\nnodes\u003C\u002Fstrong>: it adds a zigbee2mqtt light per light, with the base topic and\nfriendly name read from the light's old topics, wired from the room's light\ncommands (its new second output) and back into the room, its MQTT messages to\nthe MQTT out the room publishes through, and an MQTT in node on the light's\ntopics when that MQTT out shows the broker. Or add them yourself: Target is\nthe light's id, and an MQTT in node on \u003Ccode>&lt;base&gt;\u002F&lt;friendly name&gt;\u002F#\u003C\u002Fcode> feeds each.\nDelete the old MQTT in nodes on the lights' state and command topics. A light\nwhose topics weren't Zigbee2MQTT's (\u003Ccode>&lt;base&gt;\u002F&lt;name&gt;\u003C\u002Fcode> and \u003Ccode>&lt;base&gt;\u002F&lt;name&gt;\u002Fset\u003C\u002Fcode>)\nis flagged: set it up by hand on the\n\u003Ca href=\"#neutral-light-contract\">neutral light contract\u003C\u002Fa>. A Zigbee2MQTT group works\nthe same way: tick \u003Cstrong>Zigbee2MQTT group\u003C\u002Fstrong> on its node, and set\n\u003Ccode>retain: true\u003C\u002Fcode> under the group in Zigbee2MQTT's \u003Ccode>configuration.yaml\u003C\u002Fcode>, so the room has its state after a restart (a\ngroup can't be asked for it).\u003C\u002Fli>\n\u003Cli>Add a \u003Cstrong>circadian lighting policy\u003C\u002Fstrong> from the palette and wire its first\noutput into the room controller. One policy can feed several rooms that\nshare its settings, but its Home Assistant switches and set topics are named\nafter its own area only: rooms in other areas lose their\n\u003Ccode>home\u002F&lt;area&gt;\u002Fcircadian\u002Fset\u003C\u002Fcode> topics and switches, so give each area that\nneeds its own switches its own policy.\u003C\u002Fli>\n\u003Cli>Copy the room's old settings into it: wake and bed times (or its house\nschedule), the daytime and sleep brightness and kelvin, the refresh\ntransition and interval (now \u003Cem>Restyle transition\u003C\u002Fem> and \u003Cem>Restyle interval\u003C\u002Fem>),\nand initial sleep. The room's edit dialog lists its old values.\u003C\u002Fli>\n\u003Cli>To keep the Home Assistant switches, give the policy the room's area, set\n\u003Cstrong>Publish\u003C\u002Fstrong> to \u003Cem>MQTT state and Home Assistant discovery\u003C\u002Fem> (before 6.2: switch\non \u003Cstrong>Publish state\u003C\u002Fstrong> and \u003Cstrong>Home Assistant discovery\u003C\u002Fstrong>), and choose its\n\u003Cstrong>Broker\u003C\u002Fstrong>, or wire its second output to MQTT out. Move any MQTT in node on \u003Ccode>home\u002F&lt;area&gt;\u002Fcircadian\u002Fset\u003C\u002Fcode>,\n\u003Ccode>…\u002Fsleep\u002Fset\u003C\u002Fcode>, \u003Ccode>…\u002Fwake-time\u002Fset\u003C\u002Fcode> or \u003Ccode>…\u002Fbed-time\u002Fset\u003C\u002Fcode> from the room to the\npolicy, and any flow sending \u003Ccode>{kind: \"circadian\" | \"sleep\" | \"schedule\"}\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Click \u003Cstrong>Done\u003C\u002Fstrong>: saving keeps only each light's id in Targets JSON and clears\nthe old circadian settings, and the room runs again. Deploy it with its\npolicy and light nodes. A room that should stay unstyled skips steps 2 to 4.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>The room's own output is now three: 1, its MQTT publications (control states,\navailability, discovery), still wired to MQTT out; 2, light commands\n(\u003Ccode>msg.light\u003C\u002Fcode>) for its lights' nodes; 3, each light's reading, for activity\nlighting, which now confirms its lights from them. A flow that filtered the\nroom's output by the old command topics must now take the zigbee2mqtt light\nnodes' output instead. The \u003Ccode>\u002Fset\u003C\u002Fcode> messages are byte for byte what the room sent\nbefore, proven by a regression test over 400 generated histories.\u003C\u002Fp>\n\u003Cp>As it starts, the policy clears the circadian, sleep, wake and bed entities\nthat rooms in its area published before 6.0, migrated or not, then announces\nits own in the same batch, so Home Assistant can give them the old entity IDs.\nThe room clears its own as it starts too. A 5.x room deleted rather than\nmigrated is invalid, so it clears nothing: remove its retained topics and\nentities yourself. A room inside a subflow isn't found this way yet\n(\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Favantics-hq\u002Fnode-red-home-automation\u002Fissues\u002F171\">#171\u003C\u002Fa>):\nmigrate it and send it a startup message before you add its policy, so it\nclears its own old entities first. A room without\na circadian policy just switches its lights on and off. Two further room\nchanges come with it:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\n\u003Cp>\u003Cstrong>A light's availability\u003C\u002Fstrong> from its node (Zigbee2MQTT's availability) is shown\non its control state (\u003Ccode>available\u003C\u002Fcode>) and in the room's status, and changes\nnothing.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>A light can be marked on\u002Foff only\u003C\u002Fstrong> with \u003Ccode>\"onOffOnly\": true\u003C\u002Fcode> in the room's\ntargets: it is never sent brightness, colour or a transition, and values for\nit are left out with a warning. Activity lighting judges each light by what it\nreports: one that has never reported brightness or colour temperature since\nstart is confirmed by being on, with a warning once per deploy if a profile\ngives it values.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>An intent's values alone no longer make a light manual\u003C\u002Fstrong>: only\n\u003Ccode>manual: true\u003C\u002Fcode> does (a wall switch's double press sends it). Before 6.0, an\nowner-less intent with values made the light manual, so circadian lighting\nleft it alone; now the next style restyles it.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>A person changing a light an activity holds is a manual override.\u003C\u002Fstrong> Before\n6.0, activity lighting counted such a light as preserved and stayed ready.\nNow it reports \u003Ccode>manual_override\u003C\u002Fcode> for it, as the display, receiver and\nbacklight do; lighting is optional, so the theatre is degraded, not failed,\nand the next activity request takes the light back. A light that was a\nperson's before the activity is still left alone, as before.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>An intent's \u003Ccode>refresh: true\u003C\u002Fcode> no longer changes its transition.\u003C\u002Fstrong> Before 6.0\nit styled the light over the refresh transition instead of the turn-on one;\nthe circadian policy now sends a new style whenever anything changes.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The other changes:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Node.js 24 or newer is required.\u003C\u002Fstrong> Node.js 22 is no longer supported.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Enable inputs take only \u003Ccode>true\u003C\u002Fcode> or \u003Ccode>false\u003C\u002Fcode>.\u003C\u002Fstrong> The motion policy's\n\u003Ccode>area-enabled\u003C\u002Fcode>, \u003Ccode>global-enabled\u003C\u002Fcode> and \u003Ccode>pause\u003C\u002Fcode>, and the circadian lighting\npolicy's \u003Ccode>{kind: \"circadian\" | \"sleep\", enabled}\u003C\u002Fcode>, no longer read strings such\nas \u003Ccode>\"ON\"\u003C\u002Fcode> or \u003Ccode>\"on\"\u003C\u002Fcode>. Any other value is refused: nothing changes, the node logs\na warning once per input per deploy, and its status says what was refused.\nBefore 6.0 the motion policy read \"on\" in any case as on and anything else as\noff, and the room controller read anything but \u003Ccode>true\u003C\u002Fcode> as off. Home Assistant's own \u003Ccode>ON\u003C\u002Fcode>\nand \u003Ccode>OFF\u003C\u002Fcode> on the \u003Ccode>…\u002Fset\u003C\u002Fcode> topics are unchanged: the nodes translate them.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Lighting values in Zigbee2MQTT's units are gone.\u003C\u002Fstrong> Intents take only\n\u003Ccode>brightnessPct\u003C\u002Fcode> (0-100) and \u003Ccode>colorTempKelvin\u003C\u002Fcode>: a \u003Ccode>brightness\u003C\u002Fcode> or \u003Ccode>color_temp\u003C\u002Fcode>\nin an intent is left out, never sent to the light, and the room controller\nlogs a warning once per deploy. An activity lighting profile using them is an\ninvalid configuration, shown on the node. For example, brightness 64 becomes\nbrightnessPct 25, and color_temp 400 becomes colorTempKelvin 2500.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Receiver volume is only in dB.\u003C\u002Fstrong> A volume request with \u003Ccode>value\u003C\u002Fcode> (the\nreceiver's 0-98) and no \u003Ccode>valueDb\u003C\u002Fcode> is answered \u003Ccode>volume_rejected\u003C\u002Fcode> with reason\n\u003Ccode>removed-volume-value\u003C\u002Fcode>, and the node logs a warning once per deploy. A node\nsaved before 5.0 and never re-saved, with only its 0-98 \u003Cstrong>minVolume\u003C\u002Fstrong> and\n\u003Cstrong>maxVolume\u003C\u002Fstrong>, is an invalid configuration naming the dB setting to set,\nrather than getting the default bounds, which could be louder than its old\ncap. In the editor such a node shows as invalid until its dB bounds are set,\nand deploying it from the editor keeps it invalid rather than dropping the\nold bounds.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>projectorMeterHost\u003C\u002Fcode> is no longer read.\u003C\u002Fstrong> Set \u003Cstrong>Projector power meter\nhost\u003C\u002Fstrong> (\u003Ccode>projectorPowerMeterHost\u003C\u002Fcode>). A node that still names only the old key\nis an invalid configuration saying so, in the editor and when deployed, until\nthe new host is set.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The package's files can no longer be imported directly.\u003C\u002Fstrong> Its exports map\nexposes only \u003Ccode>package.json\u003C\u002Fcode>, so \u003Ccode>require\u003C\u002Fcode> or \u003Ccode>import\u003C\u002Fcode> of\n\u003Ccode>@avantics\u002Fnode-red-home-automation\u002Fdist\u002F…\u003C\u002Fcode> fails with\n\u003Ccode>ERR_PACKAGE_PATH_NOT_EXPORTED\u003C\u002Fcode>. Only the nodes are a public interface, as\n5.0.0 said. Node-RED loads them by file path, so installing and using the\nnodes is unchanged.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Also new in 6.0.0, with nothing to change:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Zigbee2MQTT cover\u003C\u002Fstrong> and \u003Cstrong>Shelly switch\u003C\u002Fstrong> nodes. The Zigbee2MQTT cover\nadapter replaces the hand-written function nodes in the Cover control\nexample. The Shelly switch node follows the relay's own mode: a detached\nwall switch's presses go to the switch policy, and the relay is never\nswitched.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A Shelly script\u003C\u002Fstrong> (\u003Ccode>shelly\u002Fwall-switch-fallback.js\u003C\u002Fcode>) that keeps a detached\nwall switch working as an ordinary switch while MQTT or Node-RED is down (see\nthe wall switches guide).\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Discovery as the flows start.\u003C\u002Fstrong> Every publishing node, now including the\nroom controller and the theatre state contract, announces its Home Assistant\nentities once the flows start, as well as at its startup message. On a\nfirst start, a full deploy or a restart that announcement is lost, as\nNode-RED's MQTT broker node connects only afterwards, so from 6.0.1 wire a\n\u003Cstrong>Status node\u003C\u002Fstrong> watching your MQTT out node into each publishing node: it\nannounces again each time MQTT out connects (see \"Send each publishing node\nits startup message\" below).\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A documentation site\u003C\u002Fstrong> with a guide for each area, a reference page for\nevery node and a releases page:\n\u003Ca href=\"https:\u002F\u002Favantics-hq.github.io\u002Fnode-red-home-automation\u002F\">avantics-hq.github.io\u002Fnode-red-home-automation\u003C\u002Fa>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3 id=\"500\">\u003Ca class=\"header-anchor\" href=\"#500\">5.0.0\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Separates the decision logic from the devices it drives, adds a Shelly cover\nadapter, and fixes theatre recovery and screen handling. Check these after\nupgrading from 4.0:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Lighting values are in percent and kelvin.\u003C\u002Fstrong> Intents and activity lighting\nprofiles take \u003Ccode>brightnessPct\u003C\u002Fcode> (0-100) and \u003Ccode>colorTempKelvin\u003C\u002Fcode> instead of\nZigbee2MQTT's \u003Ccode>brightness\u003C\u002Fcode> (1-254) and \u003Ccode>color_temp\u003C\u002Fcode> (mireds), and the switch\npolicy's double press now sends \u003Ccode>{brightnessPct: 100}\u003C\u002Fcode>. Your lights get the\nsame commands. The old values still work in 5.x, with a warning in the log;\nchange them before 6.0. For example, brightness 64 becomes brightnessPct 25,\nand color_temp 400 becomes colorTempKelvin 2500 (1,000,000 ÷ mireds). 0% is\nthe dimmest level, not off: send state OFF to switch a light off.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Receiver volume is in dB\u003C\u002Fstrong> (a Denon's 80 is 0 dB). Send \u003Ccode>valueDb\u003C\u002Fcode> in volume\nrequests. \u003Ccode>value\u003C\u002Fcode> on the receiver's 0-98 scale still works in 5.x, with a\nwarning, and stops in 6.0. Saved volume bounds are converted when read; open\nand save the node to store them in dB. The published volume state and the\nHome Assistant volume number now show dB, as do the node's volume results and\nstate messages, so update any automation or flow that sets or reads them with\n0-98 values. Without a context store, the old retained\nvolume can sit outside Home Assistant's new dB range until the receiver\nfirst reports after a restart.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The display controller's settings are named by role:\u003C\u002Fstrong> TV host, TV\npre-shared key, Screen controller host and Projector power meter host (saved\nas \u003Ccode>projectorPowerMeterHost\u003C\u002Fcode>). A flow saved before 5.0 keeps working; open and\nsave the node to store the new name before 6.0, when \u003Ccode>projectorMeterHost\u003C\u002Fcode>\nstops being read. No warning is logged for this one.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The projector's power can come from any meter or adapter:\u003C\u002Fstrong> send\n\u003Ccode>msg.display = {kind: \"observed\", device: \"projector\", power: \"on\" | \"standby\" | \"transitioning\"}\u003C\u002Fcode>, or \u003Ccode>watts\u003C\u002Fcode>. The built-in power meter host is\nnow optional. Without it, wire the new third output (projector power queries)\nto ask your meter for a reading. Leave output 3 unwired only if your meter\nreports on its own at least once every Query timeout, even when the power\ndoesn't change: a meter that reports only on a change says nothing while the\nprojector sits steady. Saved wiring on outputs 1 and 2 is kept. Power values\nare lower case only (\u003Ccode>on\u003C\u002Fcode>, \u003Ccode>standby\u003C\u002Fcode>, \u003Ccode>transitioning\u003C\u002Fcode>); a smart plug's own\n\u003Ccode>ON\u003C\u002Fcode> or \u003Ccode>OFF\u003C\u002Fcode> is rejected, so send its watts.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A display request fails rather than waiting\u003C\u002Fstrong> when a device hasn't reported\nwithin Query timeout × Maximum attempts (it's asked again once): the reason is\n\u003Ccode>no-reading\u003C\u002Fcode>, naming the device. Before, it waited in discovering. This\napplies with the built-in hosts too.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The screen opens by its own command when no viewing position is set.\u003C\u002Fstrong> A\ndisplay node with no Screen viewing position (new nodes, and flows written\nwithout the key) opens the screen with the screen's own open command and\nconfirms it fully open, rather than going to 82%. Nodes saved with a position\nkeep it; a saved position must now be above 0 and at most 100, or empty, or\nthe node won't deploy. Closing always uses the screen's own close command and runs to the\nend, which also restores a position the screen has lost. A screen with a\nviewing position but no known position is closed first, then sent to the\nposition; one that has never been calibrated fails with\n\u003Ccode>screen-not-calibrated\u003C\u002Fcode>. The display's state events may report the screen's\nposition as null when it reports only open or closed.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Theatre recovery now reaches the devices.\u003C\u002Fstrong> After the theatre recovers an\nactivity, each device takes on the new request by reading itself, never by\ncommanding: one that matches is ready, and its old manual override clears;\none that doesn't reports a manual override once. Before, devices kept the old\nrequest, and a flow that recovered on every manual override could loop.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Backlighting's ready carries the time of its reading,\u003C\u002Fstrong> so a repeated\nrequest no longer counts as a fresh reading, and a silent device is reported\nstale and then not responding.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>New node: Shelly cover\u003C\u002Fstrong>, which connects a Shelly Gen2+ cover to a cover\ncontroller over the device's own MQTT API (see \"Covers\").\u003C\u002Fli>\n\u003Cli>\u003Cstrong>For code that imports the package's files directly:\u003C\u002Fstrong> the display's device\ntransport moved from \u003Ccode>dist\u002Flib\u002Fdisplay-transport\u003C\u002Fcode> to\n\u003Ccode>dist\u002Flib\u002Ftransports\u002Fdisplay-transport\u003C\u002Fcode>. Only the nodes are a public\ninterface.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3 id=\"403\">\u003Ca class=\"header-anchor\" href=\"#403\">4.0.3\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Fixes the theatre state flapping on every scheduled refresh: with an activity\nsettled and ready, backlighting and room lighting reported themselves as\nconfirming while they re-read their devices, so the theatre published\n\u003Ccode>unknown\u003C\u002Fcode> and back, and counted drift each time. A refresh of a ready target\nnow re-reads it without leaving ready, as the display, receiver and source\nalready did. A target that really changes on its own still counts as drift.\u003C\u002Fp>\n\u003Ch3 id=\"402\">\u003Ca class=\"header-anchor\" href=\"#402\">4.0.2\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Fixes the display controller switching the TV off before the projector was\nready: with a source playing, there was sound but no picture while the screen\nopened and the projector warmed up. Projector mode now starts the projector and\nwaits for its warm-up, opens the screen, then puts the TV in standby, so the\npicture stays up and the TV stays on if the projector fails to start. A request\nmade while the projector is warming up or cooling down now waits for that to\nfinish, so the lamp is no longer left on or toggled mid-warm-up.\u003C\u002Fp>\n\u003Ch3 id=\"401\">\u003Ca class=\"header-anchor\" href=\"#401\">4.0.1\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Fixes the cover controller ending a move too early when a transport echoes the\nrequested position as soon as the command is sent, before the motor moves: the\ncover showed as stopped while it was still travelling, and the travel after it\nwas taken for a person's move. A move now confirms only once the cover has\nstopped at the target, from a \u003Ccode>stopped\u003C\u002Fcode> motion report or the same position for\nthe settle time. Set the settle time to at least how often the motor reports\nwhile it travels (see Covers).\u003C\u002Fp>\n\u003Ch3 id=\"400\">\u003Ca class=\"header-anchor\" href=\"#400\">4.0.0\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Adds cover control, a house schedule, and Home Assistant entities for every\npublishing node. Check these after upgrading from 3.0:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Breaking: theatre recovery never switches a running activity off.\u003C\u002Fstrong> After a\nrestart or redeploy with unclear evidence, the activity is reported as unknown\nand the devices are left alone until the next request. The \"Recovery Off\nactivity\" setting is gone, and a saved value is ignored. The metric\n\u003Ccode>recoveriesSafeOff\u003C\u002Fcode> is now \u003Ccode>recoveriesUnknown\u003C\u002Fcode> (in \u003Ccode>&lt;base&gt;\u002Fmetrics\u003C\u002Fcode>, shown as\nattributes of the \"Transition latency\" sensor), and the event\n\u003Ccode>recovery_safe_off\u003C\u002Fcode> is now \u003Ccode>recovery_unknown\u003C\u002Fcode>. Update any dashboard, template\nor flow that uses the old names.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Breaking: the theatre's readiness moved topics.\u003C\u002Fstrong> It is now on\n\u003Ccode>&lt;base&gt;\u002Freadiness\u003C\u002Fcode>, and its Home Assistant sensor is \"Readiness\".\n\u003Ccode>&lt;base&gt;\u002Favailability\u003C\u002Fcode> now carries \u003Ccode>online\u003C\u002Fcode> or \u003Ccode>offline\u003C\u002Fcode> (see \"Availability\"\nbelow).\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Breaking for areas that aren't identifiers:\u003C\u002Fstrong> a room or theatre contract whose\narea has spaces or other characters now publishes under the lowercase form,\nfor example \u003Ccode>home\u002Fliving_room\u002F…\u003C\u002Fcode> instead of \u003Ccode>home\u002FLiving Room\u002F…\u003C\u002Fcode> (see\n\"Discovery\" below).\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Without a context store, a restart or redeploy is gentler:\u003C\u002Fstrong> a room leaves\nits lights alone until something names them, motion lighting starts its\nvacancy countdown, and a theatre device re-learns its activity from the\ntheatre instead of being marked unresponsive. A \u003Ca href=\"#recommended-setup-a-file-context-store\">file context store\u003C\u002Fa> keeps state\nacross restarts instead.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A Catch node fires once per input error,\u003C\u002Fstrong> not twice.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>New nodes:\u003C\u002Fstrong> a cover controller for blinds, shutters and curtains, a cover\ngroup, a house schedule that sets many rooms' wake and bed times, and a house\nschedule MQTT node for Home Assistant (see \"Covers\" and \"Room lighting\").\u003C\u002Fli>\n\u003Cli>\u003Cstrong>New outputs, off until you switch publishing on:\u003C\u002Fstrong> occupancy fusion and the\nmotion policy gain a second output, and the AVR controller a third, for their\nMQTT state and Home Assistant entities. Saved nodes are unchanged.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Home Assistant:\u003C\u002Fstrong> availability, entity names that survive area renames, the\nroom's sleep switch and wake and bed times, receiver volume, and cleanup of a\ndeleted node's entities, described under \"Upgrading from 2.x\" below.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Other flows can pause motion lighting\u003C\u002Fstrong> without changing the user's enable.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3 id=\"301\">\u003Ca class=\"header-anchor\" href=\"#301\">3.0.1\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Fixes the room lighting controller looping on its own commands when something\nbetween it and MQTT out rewrites them, for example a function that cuts a styled\nON down to \u003Ccode>{\"state\":\"ON\"}\u003C\u002Fcode>: it took each rewritten command for someone else's\nand answered with another, without end. It now takes a bare ON or OFF that\narrives within 5 seconds of one of its own commands with that power, before that\ncommand has come back on the topic, as that command, and restyles a light after\nsomeone else's bare ON at most once every 5 seconds.\nIt also no longer marks a light manual when its own command is seen twice. Wire\nits commands to MQTT out unchanged (see Room lighting).\u003C\u002Fp>\n\u003Ch3 id=\"upgrading-from-2x\">\u003Ca class=\"header-anchor\" href=\"#upgrading-from-2x\">Upgrading from 2.x\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Version 3.0 changed some behaviour, and later versions added to it. Check these after upgrading from 2.x, along with the notes above:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Wall switches go through the switch lighting policy node.\u003C\u002Fstrong> The motion lighting policy no longer handles them,\nand ignores switch messages, so rewire any wall switch that feeds a motion node. The room lighting controller now\nkeeps a light that a person set after the room went vacant, instead of the motion node.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The motion node's \u003Ccode>delay\u003C\u002Fcode> message takes seconds,\u003C\u002Fstrong> the same unit as its \"Vacancy seconds\" setting; it took\nminutes before. A redeploy with a changed vacancy delay or lux cutoff now takes effect.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Settings are checked when you deploy.\u003C\u002Fstrong> An emptied or unusable setting shows \"invalid configuration\", and the\nnode's log says which setting is wrong. A setting your flow saved before it existed still takes its default.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>No node assumes a room.\u003C\u002Fstrong> An empty area is allowed. A node that publishes needs one where it names something:\nthe theatre state contract for its default base topic (\u003Ccode>home\u002F&lt;area&gt;\u002Ftheatre\u003C\u002Fcode>), and a room lighting controller for\nthe topics it publishes. A theatre state contract added from now on doesn't need one for Home Assistant\ndiscovery: its entity IDs then come from its display name. With an area, it suggests that area to Home Assistant,\nwhich creates it if no area of that name exists. One saved before needs an area for discovery, as before. A room\nlighting controller with no area still controls its lights only with state publishing and discovery both off;\nwith either on (or unset, as on a room saved before 3.0), it reports an invalid configuration.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>MQTT state publishing and Home Assistant discovery are opt-in\u003C\u002Fstrong> on the room lighting controller and the theatre\nstate contract. New nodes start with them off. Nodes in a flow saved before 3.0 keep publishing until you untick\nthe setting. Switching discovery off removes the entities from Home Assistant.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Discovery\u003C\u002Fstrong> goes under the \u003Cstrong>Discovery prefix\u003C\u002Fstrong> setting (\u003Ccode>homeassistant\u003C\u002Fcode> by default, as in Home Assistant) on\nboth nodes, and every entry names this package and its version as its origin. Topics and IDs use the area in\nlowercase, with each run of spaces or other characters (anything but letters, digits, \u003Ccode>_\u003C\u002Fcode> and \u003Ccode>-\u003C\u002Fcode>) as \u003Ccode>_\u003C\u002Fcode>:\n\"Living Room\" publishes under \u003Ccode>home\u002Fliving_room\u002F…\u003C\u002Fcode>, and \"living-room\" is unchanged.\nNames shown in Home Assistant keep the area as you typed it.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Entity names.\u003C\u002Fstrong> A room lighting controller or theatre state contract you add from now on names its Home\nAssistant device, unique IDs and discovery topics after its Node-RED node ID (\u003Ccode>nrha_&lt;node id&gt;…\u003C\u002Fcode>), so renaming its\narea or display name updates the same entities. Nodes in flows saved before this keep naming them after the area,\nexactly as before, so nothing changes for them in Home Assistant. Either way, the entity ID Home Assistant first\ngives an entity comes from the area, with \u003Ccode>-\u003C\u002Fcode> as \u003Ccode>_\u003C\u002Fcode>.\nImporting or pasting a node in the editor keeps its saved settings, including its ID scheme and publishing, so\nan older node restored from a backup keeps its area-named entities. Only a node added from the palette starts as\nnew.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Occupancy fusion can publish too\u003C\u002Fstrong>, off unless you switch it on: its occupancy as retained \u003Ccode>ON\u003C\u002Fcode>\u002F\u003Ccode>OFF\u003C\u002Fcode> on\n\u003Ccode>home\u002F&lt;area&gt;\u002Foccupancy\u002Fstate\u003C\u002Fcode>, with availability, and an occupancy binary sensor in Home Assistant. These go on its\nnew second output, so wire that to an MQTT out node; the first output still feeds the motion policy.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The motion lighting policy can publish too\u003C\u002Fstrong>, off unless you switch it on: whether this node's motion lighting\nis enabled and its vacancy delay in seconds (\u003Ccode>home\u002F&lt;area&gt;\u002Fmotion\u002Fenabled\u002Fstate\u003C\u002Fcode> and \u003Ccode>…\u002Fdelay\u002Fstate\u003C\u002Fcode>), which it also\ntakes from their \u003Ccode>\u002Fset\u003C\u002Fcode> topics, and a switch and a vacancy delay number in Home Assistant. These go on its new\nsecond output; the shared global enable is not published.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The AVR controller can publish what the receiver reports\u003C\u002Fstrong>, off unless you switch it on: power, source and\nvolume, retained under \u003Ccode>home\u002F&lt;area&gt;\u002Freceiver\u002F\u003C\u002Fcode>, with availability, and Home Assistant power and source sensors\nand a volume number (see \"Receiver volume ownership\"). These go on its new\nthird output, apart from the receiver commands and the theatre's state.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Topics no longer published are cleared.\u003C\u002Fstrong> Once the flows have started, and again at its startup message, a node\nclears any retained topic it published before and no longer does, for example after an area, base topic,\ndiscovery prefix or target change. It remembers what it published in its node context, which lasts across\ndeploys and restarts only with a context store configured (see \"Recommended setup\"). Without that record, an occupancy, motion, receiver or\nhouse schedule MQTT node named after itself (node-based IDs) that publishes state still clears its own Home Assistant\nentities it no longer publishes, such as after you switch discovery off; it never clears topics another node could\npublish. Other old topics, after an area, base topic, discovery prefix or target change, or after you switch\npublishing off entirely, are cleared only from the record. A node that never gets a startup message\nkeeps clearing its old topics at every start, so to move an area from one older room node to another, send the old\nnode a startup message, or delete it.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Send each publishing node its startup message once MQTT out has connected: wire in a Status node.\u003C\u002Fstrong> Node-RED's\nMQTT broker node connects after the flows have started and drops anything it is given before then, without a\nwarning, so what a node announces as the flows start (its availability, discovery and state) is lost on a first\nstart, a full deploy or a restart. Add a \u003Cstrong>Status node\u003C\u002Fstrong> whose scope is your MQTT out node and wire it into each\npublishing node (room, circadian policy, house schedule MQTT, motion, occupancy, cover controller, AVR controller,\ntheatre state contract, Shelly switch, scene). Each time MQTT out shows \"connected\", including after the broker\nreconnects, the Status node passes it on, and the node takes it as its startup message. Other status messages are\nignored, so a Status node watching every node on the flow works too. Since 6.0.1; before\nthat, the examples sent the startup message from an inject node 3 seconds after a deploy, which is lost if the\nbroker takes longer. A node still takes its own startup message (each node's section gives it). From 6.2, choose a\n\u003Cstrong>Broker\u003C\u002Fstrong> on the node instead: it runs its startup on every connect itself, with no Status node.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Removing entities:\u003C\u002Fstrong> deleting a node clears its Home Assistant entities and retained state, but only when you\ndeploy with \"Modified nodes\" or \"Modified flows\". On a full deploy (the deploy button's default), Node-RED stops the\nMQTT out node at the same moment, so the clearing never reaches the broker. Disabling a node or its flow keeps its\nentities, so they come back unchanged when you enable it again. To remove a node's entities after a full deploy,\nor to remove the entities of a flow you copied to another Node-RED (the copy's nodes have new IDs, so new\nentities), delete the device in Home Assistant: Settings → Devices &amp; services → Devices, open the device, then\nDelete. Home Assistant then clears its retained discovery entry itself.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Availability:\u003C\u002Fstrong> each publishing node sends a retained \u003Ccode>online\u003C\u002Fcode> once the flows have started (and again at its\nstartup message) and \u003Ccode>offline\u003C\u002Fcode> when it stops, on \u003Ccode>home\u002F&lt;area&gt;\u002Flighting\u002Favailability\u003C\u002Fcode> (room) or\n\u003Ccode>&lt;base&gt;\u002Favailability\u003C\u002Fcode> (theatre), and its Home Assistant entities follow it. These get through when the node is\ndeployed on its own (\"Modified nodes\" or \"Modified flows\"), while the MQTT connection stays up. On a full deploy, a\nrestart or a shutdown, Node-RED stops the MQTT out node at the same moment and reconnects to the broker afterwards,\nso set the MQTT broker node's \u003Cstrong>Birth message\u003C\u002Fstrong> to \u003Ccode>online\u003C\u002Fcode>, and its \u003Cstrong>Close message\u003C\u002Fstrong> and \u003Cstrong>Will message\u003C\u002Fstrong> (which\ncovers crashes) to \u003Ccode>offline\u003C\u002Fcode>, all retained, on the same topic; with several publishing nodes, the broker can cover\none of them. With discovery on, each publishing node also announces its Home Assistant entries once the flows have\nstarted, just before its \u003Ccode>online\u003C\u002Fcode>, and again at its startup message. The theatre's readiness (\u003Ccode>unknown\u003C\u002Fcode>,\n\u003Ccode>available\u003C\u002Fcode>, \u003Ccode>degraded\u003C\u002Fcode> or \u003Ccode>unavailable\u003C\u002Fcode>), which used \u003Ccode>&lt;base&gt;\u002Favailability\u003C\u002Fcode> before, is now on \u003Ccode>&lt;base&gt;\u002Freadiness\u003C\u002Fcode>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"theatre-mqtt-contract\">\u003Ca class=\"header-anchor\" href=\"#theatre-mqtt-contract\">Theatre MQTT contract\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The whole-theatre MQTT contract uses non-retained requests at\n\u003Ccode>home\u002F&lt;area&gt;\u002Ftheatre\u002Frequest\u003C\u002Fcode>; every request supplies a unique \u003Ccode>requestId\u003C\u002Fcode> and an\nexplicit configured activity. Controller output is retained under \u003Ccode>desired\u003C\u002Fcode>,\n\u003Ccode>current\u003C\u002Fcode>, \u003Ccode>phase\u003C\u002Fcode>, \u003Ccode>transition\u003C\u002Fcode> (when the latest transition started and finished, and which\ntargets it left degraded), \u003Ccode>failure\u003C\u002Fcode>, \u003Ccode>readiness\u003C\u002Fcode>, \u003Ccode>metrics\u003C\u002Fcode>, \u003Ccode>slo\u003C\u002Fcode>, and \u003Ccode>health\u002F&lt;target&gt;\u003C\u002Fcode>,\neach only when it changes beyond its times (\u003Ccode>observedAt\u003C\u002Fcode>,\u003C\u002Fp>\n",1795945084904]