# Enable or disable processing or flows

**URL:** <https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379>\
**Category:** General\
**Created:** [20 March 2020 22:58 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379 "2020-03-20T22:58:32Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![makowski13](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/makowski13/32/19483_2.png) [@makowski13](https://discourse.nodered.org/u/makowski13)\
**Post date:** [20 March 2020 22:58 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379/1 "2020-03-20T22:58:32Z")

</div>

I am new to Node-RED and starting to create flows.  
I'm looking for a way to automatically disable processing or flows every 1st of the month or year.  
Then I want to manually enable them

---

<div class="post-metadata">

**Author:** ![hoolahoous](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hoolahoous/32/16612_2.png) [@hoolahoous](https://discourse.nodered.org/u/hoolahoous)\
**Post date:** [21 March 2020 02:37 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379/2 "2020-03-21T02:37:12Z")

</div>

use a [traffic node](https://flows.nodered.org/node/node-red-contrib-traffic) and use inject node to enable/disable on days you want flow to be enabled/disable.

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [21 March 2020 02:50 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379/3 "2020-03-21T02:50:01Z")

</div>

You can also use [node-red-contrib-simple-gate](https://flows.nodered.org/node/node-red-contrib-simple-gate). It functions very much like the `traffic` node, with some added features and flexibility.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [21 March 2020 04:10 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379/4 "2020-03-21T04:10:08Z")

</div>

(The only think I like `traffic` more for is it allows `true` and `false` signals to control it too, where as `gate` wants text.)

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [21 March 2020 04:11 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379/5 "2020-03-21T04:11:43Z")

</div>

Is there a particular reason for this?

How are the flows getting their _input_? (From where)

Where are they sending their _output_?

Could you send a screen shot of the flow - just out of curiosity.

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [22 March 2020 22:08 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379/6 "2020-03-22T22:08:05Z")

</div>

> [@Trying\_to\_learn](#):
>
> The only think I like `traffic` more for is it allows `true` and `false` signals to control it too, where as `gate` wants text.

Thanks for pointing that out. I think it is a trivial change to allow `gate` commands to be numbers or booleans. I will raise an issue for myself on GitHub and release an update as soon as I can test and document it.

---

<div class="post-metadata">

**Author:** ![makowski13](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/makowski13/32/19483_2.png) [@makowski13](https://discourse.nodered.org/u/makowski13)\
**Post date:** [23 March 2020 21:02 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379/7 "2020-03-23T21:02:50Z")

</div>

Sorry for the delay but been crazy lately.  
I have existing proprietary HVAC block program that I want to convert to  
NODE-RED for my controller powered by Rasberry PI.  
I have Inputs and Outputs on the controller and I want to perform  
a local subscription that will require the process to be re-enabled  
every month/year or the process will shutdown. It will take the OA weather  
as input to the program and looking for security access options so  
people cannot access the program.  
Again, I am new to NODE-RED so just learning.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 March 2020 21:05 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379/8 "2020-03-23T21:05:19Z")

</div>

What is your flow?

How are the things "signalled"?

---

<div class="post-metadata">

**Author:** ![makowski13](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/makowski13/32/19483_2.png) [@makowski13](https://discourse.nodered.org/u/makowski13)\
**Post date:** [23 March 2020 21:12 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379/9 "2020-03-23T21:12:34Z")

</div>

Quick overview  
looking at OA weather and resetting a temp setpoint.  
If OA temp is 90 deg then I want a setpoint of 55 deg  
If OA temp is 55 deg then I want a setpoint of 80 deg

There are other modeling factors but the above gives you an idea

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 March 2020 21:23 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379/10 "2020-03-23T21:23:39Z")

</div>

I think either a screen shot of the flow or posting the actual flow will yield faster results.

Try this:

Get a `switch` node and put it where the "OA weather" is _shown_.

Edit the `switch` node so:  
if msg.payload == 90 --\> output 1  
if msg.payload == 55 --\> output 2

HOW this is done depends if the `msg.payload` is a STRING or a NUMBER.  
You will know this if it is RED or BLUE in the `debug` node.

![Screenshot from 2020-03-24 08-22-14](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/0/00c9f2960a7e3a1aca8ad1b08375b240b7712c40.png)

If they are STRINGS (red)

 ![Screenshot from 2020-03-24 08-20-32](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/d/4d6bb7defb2cd642d6d99699e0cac19ca10bc95a.png)

Otherwise change the bits show to number.

That should get you going some way to what you want to do.

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [23 March 2020 21:23 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379/11 "2020-03-23T21:23:47Z")

</div>

Hysteresis is the thing to look over the available contrib nodes

---

<div class="post-metadata">

**Author:** ![makowski13](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/makowski13/32/19483_2.png) [@makowski13](https://discourse.nodered.org/u/makowski13)\
**Post date:** [23 March 2020 21:42 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379/12 "2020-03-23T21:42:57Z")

</div>

I have not created any flows in NODE RED yet but i will try your example to start.  
thank you for getting me started

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 May 2020 21:43 UTC](https://discourse.nodered.org/t/enable-or-disable-processing-or-flows/23379/13 "2020-05-22T21:43:04Z")

</div>

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