Home

Awesome

node-red-contrib-blindcontroller

npm version

A collection of <a href="http://nodered.org" target="_new">Node-RED</a> nodes that automate the control of household roller blinds based on the current position of the sun.

Install

Run the following command in the root directory of your Node-RED install

npm install node-red-contrib-blindcontroller

<b>node-red-contrib-blindcontroller</b> is compatible with <b>node-red-contrib-sunpos</b>.

Blind Controller

This node calculates the appropriate blind position to restrict or maximise direct sunlight through the associated window.

Properties

Blind Controller Properties Header

Blind Controller Properties Dimensions

Blind Controller Properties Positions

Blind Controller Properties Thresholds

Blind Controller Properties Manual

Calculation

The calculation requires the output of the <a href="https://www.npmjs.com/package/node-red-contrib-sunpos" target="_new">Sun Position</a> Node. This can be supplemented with current weather conditions, such as that from forecastio or weather underground. <b>msg.topic</b> should be set to weather, and <b>msg.payload</b> either or both of the following properties:

In Summer mode, the node calculates the appropriate blind position to restrict the amount of direct sunlight entering the room. This calculation includes:

In Winter mode, the node calculates the appropriate blind position to maximise the amount of direct sunlight entering the room. This calculation is based on whether direct sunlight is entering the room based on the orientation of the blind and the azimuth of the sun - taking into account the negative and positive offset properties. When the sun is in the window the blind will positioned in the <b>max open</b> setting, otherwise it will be positioned in the <b>max closed</b> setting. In overcast conditions the blind will be positioned in the <b>max closed</b> setting.

The mode can be changed via a message. <b>msg.topic</b> should be set to mode, and <b>msg.payload</b> with the following property:

Output

In the event the node determines a blind position change is required, it will emit a <b>msg.payload</b> with the properties of the blind including:

In addition, <b>msg.data</b> includes information useful for monitoring:

<b>msg.topic</b> is set to "blind".

Manual Override

The node also supports manual overrides by processing messages with <b>msg.topic</b> set to blindPosition, and <b>msg.payload</b> containing the following properties:

Manual positions can be forced to expire by processing a message with <b>msg.topic</b> set to blindPositionReset, and <b>msg.payload</b> containing the following properties:

Status

The node also reports its status within the Node-RED flow editor:

Multi Blind Controller

This node calculates the appropriate blind position to restrict direct sunlight through a number of windows. This node processes three types of input messages:

When processing either a Sun Position, Weather or Mode message, the blind position calculation is performed for each blind for which a configuration message has previously been received. Emitted messages from this node have the same properties as those emitted from the <b>Blind Controller</b> node.

This node does not report status within the Node-RED flow editor.

Sample Flow

The figure below represents a sample flow of <b>Blind Controller</b> node can be used to control 6 Qmotion blinds at the one geo location. The flow is initiated by an Injector node configured to run periodically.

Blind Controller Screenshot

The figure below represents a sample flow using the <b>Multi Blind Controller</b> node for the same use case, where the blind configuration is stored in a Cloudant database.

Multi Blind Controller Screenshot