(Beginner) Sunset, timer, blinds

Hi
I am totaly new to this and struggeling to find the right nodes for the job

I want to roll up my blinds at 06:20 in the morning and roll down my blinds at sunset, if sunset is before 21:00

I have the blinds working with a simple doorsensor for testing purpose.

Is there a kind person who can help a newbie out :smiley:

Welcome to the forum!

You could do this with just 2 nodes; node-red-contrib-simple-gate & node-red-contrib-cron-plus.

Create 4 schedules in Cron+ to;

  1. Open the blinds at 06:20
  2. Close the blinds at sunset
  3. Close the simple-gate node at 21:00
  4. Open the simple-gate node at 0600

If you check the readme for the simple-gate, you can set 3) & 4) above to the Control topic, so at 21:00 the gate will close and prevent further messages reaching the blinds until it's opened again at 06:00.

cron

I must admit i am almost as green as they come :grin:

Took me a little while to figure out how the gate works
i imported the Examples Basic Operation, i think i got the hang of the gate now... awesome node

But in Cron-plus i cant figure out how to trigger the control topic
Can you enlighten me ?

And thanks alot for your help !

Ok, take a look at the example flow below.
The 2 inject nodes open & close the gate to show you how it works.
The Cron+ node will do exactly the same, but at 21:00 and 06:00.

[{"id":"b3bc4f31328ab115","type":"cronplus","z":"217df193.d774ce","name":"","outputField":"payload","timeZone":"","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"Close gate","topic":"control","payloadType":"str","payload":"close","expressionType":"cron","expression":"0 0 21 * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"},{"name":"Open gate","topic":"control","payloadType":"str","payload":"open","expressionType":"cron","expression":"0 0 06 * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":725,"y":395,"wires":[["90da55b0a09e9d60"]]},{"id":"90da55b0a09e9d60","type":"gate","z":"217df193.d774ce","name":"","controlTopic":"control","defaultState":"open","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"RAM","x":895,"y":335,"wires":[[]]},{"id":"145f06f76daf5d73","type":"inject","z":"217df193.d774ce","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"open","payloadType":"str","x":715,"y":320,"wires":[["90da55b0a09e9d60"]]},{"id":"871419e5ee7e76b1","type":"inject","z":"217df193.d774ce","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"close","payloadType":"str","x":715,"y":355,"wires":[["90da55b0a09e9d60"]]}]

Hallo,

the package node-red-contrib-sun-position has a lot of nodes for time control and also a blind-control node integrated.

For the blind control only one node is needed, where the rules could be defined. Over the import examples could be added.

I got it working
i skipped the gate but the cron+ did the job! :smiley:
thanks alot for the help :smiley:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.