theyosh / TerrariumPI

Home automated terrarium/aquarium or other enclosed environment with a Raspberry Pi
https://terrarium.theyosh.nl
GNU General Public License v3.0
410 stars 98 forks source link

[FEATURE]: Time of day temperature #602

Closed PhoenixNP closed 2 years ago

PhoenixNP commented 3 years ago

Is your feature request related to a problem? Please describe. Would it be possible to adjust the min/max temperature based on the time of day? Right now it's only possible to set a min/max with a deviation for the night time (where im semi-uncertain it works)

Describe the solution you'd like Options to add times and temperates as to emulate sunrise/sundown. For example; 08:00 - 28 degree's 11:00 - 29 degree's 13:00 - 30 degree's 15:00 - 29,5 degree's 18:00 - 29 degree's 22:00 - 28 degree's

Just listing arbitrary values

theyosh commented 3 years ago

And you still want to use the sun rise and sun set for start and end?

My main issue is how to make it in the webgui. I am thinking of adding new rows with the needed values.

Then the next question is, do you enter absolute values of relative? In your example you have absolute values. But I can imagine you could also use relative values. So increase by 1 degree every 2 hours for 3 times and then go down by 1 degree every 2 hours for 3 times.

But what to do when we follow the above example, which is 12 hours in total, you have only 10 hours of daylight. Or you have 14 hours of daylight... So then we should use percentage for the duration.?

And this should happen on the area with the temperature type/mode. As you are going to increase the temperature.

So, there are some questions/options to think of. Any suggestions..

PhoenixNP commented 3 years ago

Well I actually think there are multiple ways of achieving it. Relative Settings, user configureable Absolute settings, user configurable Follow the Sun/Weather settings and raise/lower temperature based on the weather. This would probably be an annoying one since a lot of our animals come from tropical area's with a way different time zone. So that would also mean mapping their "normal" time to our time.

At the moment I heat up most of my environments with Radiant Heat Panels or Deep Heat Projectors on a dimmer (they don't really emit light). That means that for the sunlight im less reliant on the lightings. For example in my case I switch the lights at sunrise, in a delayed fashion, to mimick sunrise, and do the same with the shutdown in the evening.

As for suggestions; Both relative as well as absolute value's could and would work, I think this mostly comes down to user preference and easy of setup. I think that just setting a min and max value for the day and a min/max value for the night and calculate percentages throughout the 24/7 would be less predicatable and perhaps for users end up with wrong times

Edit: right now my herpstats and microclimates are set up using absolute values throughout the day, maybe I'm spoiled. (but I'd love to replace those with TerrariumPI)

theyosh commented 3 years ago

Well I actually think there are multiple ways of achieving it. Relative Settings, user configureable Absolute settings, user configurable

I think it is much easier to enter '-4' and '+4' for relative values and '28' as an absolute value. Else you get so much options, that is not handy

Follow the Sun/Weather settings and raise/lower temperature based on the weather. This would probably be an annoying one since a lot of our animals come from tropical area's with a way different time zone. So that would also mean mapping their "normal" time to our time.

Not sure, but I am afraid that this is not correct. At the moment, I use the weather for sun rise and sun set. And if you specify a location in the tropics, it only uses the on and off times. And yes, that is mapped to our location. Else your reptile can have daylight while it is night at your location. And I still offer the option to specify weather source for the lights, and that needs to be supported. Weather data only tells how long there is light.

The only 'new' thing is, that you want your sensors to go up and down with the alarms based on the weather / location temperatures. That is harder to do.

At the moment I heat up most of my environments with Radiant Heat Panels or Deep Heat Projectors on a dimmer (they don't really emit light). That means that for the sunlight im less reliant on the lightings. For example in my case I switch the lights at sunrise, in a delayed fashion, to mimick sunrise, and do the same with the shutdown in the evening.

This is possible with my software (In TP4 better then TP3). Dimming is using the PID principle https://en.wikipedia.org/wiki/PID_controller

As for suggestions; Both relative as well as absolute value's could and would work, I think this mostly comes down to user preference and easy of setup. I think that just setting a min and max value for the day and a min/max value for the night and calculate percentages throughout the 24/7 would be less predicatable and perhaps for users end up with wrong times

I think this is still an option to use/explore

Edit: right now my herpstats and microclimates are set up using absolute values throughout the day, maybe I'm spoiled. (but I'd love to replace those with TerrariumPI)

The only problem I found is that when you have multiple heating area's in your enclosure, do you set the temperature changes on all area's. Or do you specify a special (new) area type, which will only control the min and max alarm values of all the temperature sensors that are being used in the enclosure...

I need some more thinking about this.

theyosh commented 2 years ago

Hi, if you do a git pull, restart TP4 and clear browser cache, you should now have an extra tab at the area editing screen.

image

In every row you can now set at at time and a timestamp. And you fill a value for example temperatures. That row means, that at that time, the temperature will be at value. If you have multiple rows, the temperature value will change from the value from 1 row to the next. So if the first row is 20 degrees, and second row is 25 degrees and 2 hours later, the temperature will shift from 20 to 25 degrees in 2 hours.

So no jumping temperatures, but nice smooth increase and decrease of the values.

Important: This will not work nice with the day/nigh difference option. So that should be zero if you want to use the new variation option.

Only the option at time and absolute times and values are tested. But that is exactly what you asked. So give it a try.

theyosh commented 2 years ago

If someone wants to test this with TP4, you can do it now. I will close this issue next month if there are now responses.

theyosh commented 2 years ago

Closing this issue, as with the new release 4.1.0 this is now possible.