alisdairjsmyth / node-red-contrib-blindcontroller

node-RED node that determines blind position based on the position of the sun and climatic conditions
Apache License 2.0
24 stars 12 forks source link
blind node-red sun-position

node-red-contrib-blindcontroller

npm version

A collection of Node-RED 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

node-red-contrib-blindcontroller is compatible with node-red-contrib-sunpos.

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 Sun Position Node. This can be supplemented with current weather conditions, such as that from forecastio or weather underground. msg.topic should be set to weather, and msg.payload 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 max open setting, otherwise it will be positioned in the max closed setting. In overcast conditions the blind will be positioned in the max closed setting.

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

Output

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

In addition, msg.data includes information useful for monitoring:

msg.topic is set to "blind".

Manual Override

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

Manual positions can be forced to expire by processing a message with msg.topic set to blindPositionReset, and msg.payload 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 Blind Controller node.

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

Sample Flow

The figure below represents a sample flow of Blind Controller 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 Multi Blind Controller node for the same use case, where the blind configuration is stored in a Cloudant database.

Multi Blind Controller Screenshot