# seeking out assist on thermostat common sense - counting instances over/underneath a value.

**URL:** <https://discourse.nodered.org/t/seeking-out-assist-on-thermostat-common-sense-counting-instances-over-underneath-a-value/24250>\
**Category:** General\
**Created:** [5 April 2020 07:28 UTC](https://discourse.nodered.org/t/seeking-out-assist-on-thermostat-common-sense-counting-instances-over-underneath-a-value/24250 "2020-04-05T07:28:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JorgeDamien](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@JorgeDamien](https://discourse.nodered.org/u/JorgeDamien)\
**Post date:** [5 April 2020 07:28 UTC](https://discourse.nodered.org/t/seeking-out-assist-on-thermostat-common-sense-counting-instances-over-underneath-a-value/24250/1 "2020-04-05T07:28:34Z")

</div>

I think this is likely a stupid question, but I'm looking at a few counter nodes and I'm not exactly getting from them what I thought I would.

Basically I have a flow now that checks the temperature from a Zigbee device and outputs the current temp, converts to F, and if it's over 74 I have it call home assistant to turn off a switch (which has a space heater on it). Right now I'm bifurcating the temperature into true and false, if it's over or under.

When it's over 74, turn off, when it's under though I sent the message to a delay node and wait. Basically I want it to be under 74 for 30 minutes before the space heater comes back on again.

This works well, but I wanted to combine some logic here. I was thinking of waiting for 3+ reports or some magic number, when that number is hit allow the heater to come back on.

Message Counter seems to do this, but debugging shows no output even when the node itself shows "2" currently. How can I act on the logic without output?

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [5 April 2020 07:40 UTC](https://discourse.nodered.org/t/seeking-out-assist-on-thermostat-common-sense-counting-instances-over-underneath-a-value/24250/2 "2020-04-05T07:40:13Z")

</div>

To use (some) logic, instead of a delay node, use a trigger node (or 2) instead.  
How often do you receive the temperature updates ?

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [5 April 2020 08:45 UTC](https://discourse.nodered.org/t/seeking-out-assist-on-thermostat-common-sense-counting-instances-over-underneath-a-value/24250/3 "2020-04-05T08:45:36Z")

</div>

> [@JorgeDamien](#):
>
> When it's over 74, turn off, when it's under though I sent the message to a delay node and wait. Basically I want it to be under 74 for 30 minutes before the space heater comes back on again.

One option could be to use the ramp-thermostat (hysteresis feature)

> **[GitHub - cflurin/node-red-contrib-ramp-thermostat: A Node-RED contrib-node...](https://github.com/cflurin/node-red-contrib-ramp-thermostat)**
>
> A Node-RED contrib-node that emulates a thermostat - GitHub - cflurin/node-red-contrib-ramp-thermostat: A Node-RED contrib-node that emulates a thermostat

or the dsm:

> **[Hysteresis](https://github.com/cflurin/node-red-contrib-dsm/wiki/Hysteresis)**
>
> A dynamic state machine node based on the Finite state machine. - cflurin/node-red-contrib-dsm

---

<div class="post-metadata">

**Author:** ![JorgeDamien](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@JorgeDamien](https://discourse.nodered.org/u/JorgeDamien)\
**Post date:** [8 April 2020 05:22 UTC](https://discourse.nodered.org/t/seeking-out-assist-on-thermostat-common-sense-counting-instances-over-underneath-a-value/24250/4 "2020-04-08T05:22:40Z")

</div>

> [@JorgeDamien](#):
>
> I think this is likely a stupid question, but I'm looking at a few counter nodes and I'm not exactly getting from them what I thought I would.
> 
> Basically I have a flow now that checks the temperature from a Zigbee device and outputs the current temp, converts to F, and if it's over 74 I have it call home assistant to turn off a switch (which has a space heater on it). Right now I'm bifurcating the temperature into true and false, if it's over or under.
> 
> When it's over 74, turn off, when it's under though I sent the message to a delay node and wait. Basically I want it to be under 74 for 30 minutes before the space heater comes back on again.
> 
> This works well, but I wanted to combine some logic here. I was thinking of waiting for 3+ reports or some magic number, when that number is hit allow the heater to come back on. [https://omegle.onl/](https://omegle.onl/)
> 
> Message Counter seems to do this, but debugging shows no output even when the node itself shows "2" currently. How can I act on the logic without output?

thankyou my issue has been solved

---

<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:** [7 June 2020 05:34 UTC](https://discourse.nodered.org/t/seeking-out-assist-on-thermostat-common-sense-counting-instances-over-underneath-a-value/24250/5 "2020-06-07T05:34:30Z")

</div>

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