# Breeding tank themperatur control

**URL:** <https://discourse.nodered.org/t/breeding-tank-themperatur-control/33667>\
**Category:** General\
**Created:** [2 October 2020 11:15 UTC](https://discourse.nodered.org/t/breeding-tank-themperatur-control/33667 "2020-10-02T11:15:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edstobi](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@edstobi](https://discourse.nodered.org/u/edstobi)\
**Post date:** [2 October 2020 11:15 UTC](https://discourse.nodered.org/t/breeding-tank-themperatur-control/33667/1 "2020-10-02T11:15:47Z")

</div>

Hello  
I need an idea how to realize my project.  
I need to reduce a large amount of water in a breeding tank in a controlled way. The temperature is kept constant at 0.5 Gard by a heater.  
I manage this today with a fixed temperature variable, DS18S20 temperature sensor, and a heater

I want to:  
\*Over the dashboard set the start over a date  
\*the difference by how the temperature may fall in degre  
I have a heater available for switching on and off over MQTT  
The current temperature is available to me with MQTT with an accuracy of 0.1 degree

For example  
I would like to lower the temperature from 24 degrees to 17 degrees from 5 October. A maximum of only 0.5 degrees per day may be lowered. Theoretically this would take (24-17)/0.5 days. Unfortunately this is not so linear, because on sunny days the temperature of the water rises more than it reduces, so I can not say that the heating must keep the temperature at the new value after reaching the calculated value. The water can rise 1 degree on sunny days without heating and fall several degrees on cold days with rain. This prevents the heating and tries to keep the water always at a given temperature.  
Since this is so important, the current information must be cached, whether in a SQL DB or directly on the Raspberry. After a restart, work must continue where it stopped before the failure. This is a very slow process, but must be kept, otherwise the breeding can be damaged.

I'm somehow on the end of my brain and I always get lost in a lot of variables which I read and write from the SQL DB. The whole thing works so badly that I have deleted the whole flow several times and started from scratch. I think I need a completely different approach and hope you can show me a new direction

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 October 2020 18:30 UTC](https://discourse.nodered.org/t/breeding-tank-themperatur-control/33667/2 "2020-10-02T18:30:39Z")

</div>

Initially forget about how you are going to implement it and concentrate on getting a clear, well defined spec of what should happen.  
Once you have that then you can worry about how to implement it.

---

<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:** [1 December 2020 18:30 UTC](https://discourse.nodered.org/t/breeding-tank-themperatur-control/33667/3 "2020-12-01T18:30:40Z")

</div>

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