-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sunrise timer #2317
Sunrise timer #2317
Conversation
works, but should update time when switching sunrise option (to doo)
# Conflicts: # sonoff/_releasenotes.ino # sonoff/xdrv_09_timers.ino
Considering the amount of math how much does the code grow by this? Don't you think a light sensor like BH1750 is a much better tool to switch as it will act on current local situation. In my case I use a BH1750 to switch lights on the lights in the evening. |
Ok , the code is huge (about 20k)
but i had my own timer implementation for about a couple of weeks and needing no external sensor is nice. a light sensor would shut down also during a dark storm during the day
i use it for roller shutters sonoff t1/2 gang and used it for christmas lightning with an s20
you have to enter longitude and latitude once to get the correct result but is works perfect.
… Am 01.04.2018 um 20:23 schrieb Theo Arends ***@***.***>:
Considering the amount of math how much does the code grow by this?
Don't you think a light sensor like BH1750 is a much better tool to switch as it will act on current local situation.
In my case I use a BH1750 to switch lights on the lights in the evening.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#2317 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ALG4Y348PMnUx3aQWrnkYzmefrWrnrIdks5tkRshgaJpZM4TCxeK>.
|
I'm looking into it. Pity it takes at least 14k for the sunrise/sundown measurement but compared to Domoticz it is only 2 minutes off. I'll add it as an option but I still have to find out what happens at TimerEverySecond ... |
Ah, that makes sense. Now I'm looking at the Zeitzone parameter set to 2 in dusktilldawn. I wonder if UTC time would make a better source with Zeitzone set to 0. |
with Timezone set to 99 this 2 hours worked for me, but UTC might be better ?
… Am 03.04.2018 um 18:14 schrieb Theo Arends ***@***.*** ***@***.***>>:
Ah, that makes sense.
Now I'm looking at the Zeitzone parameter set to 2 in dusktilldawn. I wonder if UTC time would make a better source with Zeitzone set to 0.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#2317 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ALG4Y1zYmueMoIW2yDLYkR_gJ2QHvdi_ks5tk5_ugaJpZM4TCxeK>.
|
It worked for you as you (and I) live in timezone 2. Others live on differen timezone so I have to take that into account. Will study. |
5.12.0j * Add optional Sunrise and Sunset timers with commands Latitide and Longitude to be enabled with define USE_SUNRISE in user_config.h (#2317)
only for sure...
+16k ? |
15,6k at present mainly because of angle functions and double math
… Am 05.04.2018 um 13:01 schrieb reaper7 ***@***.*** ***@***.***>>:
only for sure...
Add support for Sunrise and sunset tools (+16k)
+16k ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#2317 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ALG4YwPMfyDcl4HgG2o_tAFGO4UUtSRTks5tlfmbgaJpZM4TCxeK>.
|
Well done !!!
… Am 05.04.2018 um 13:44 schrieb Theo Arends ***@***.*** ***@***.***>>:
This is how it looks like:
<https://user-images.githubusercontent.com/11044339/38364074-60f4969c-38d7-11e8-8f9a-e5066e8be92a.png>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#2317 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ALG4Y3YU-AmLdNo_mN4D1rgyiIBVcbAuks5tlgOOgaJpZM4TCxeK>.
|
@gemu2015 couldn't do it without you. |
What about my oldest mod ? SML reader ?
you only need a phototransistor and a 1k resistor to monitor your houses current consumption.
works with most current meters according to https://www.volkszaehler.org <https://www.volkszaehler.org/> most meters output these values without intervention
some need commands to emmit the values this would require a ir diode for sending
This was my 1. mod, i have put it into a sonoff 4 channel into the meter box
it decodes SML binary or OBIS asci
by the way a comment to SGP30 :
i examined again the original Sensirion docus and driver examples and now there are some conclusions:
the sensor by itself calculates a continuous baseline calibration which takes at least 1 hour to become stable (at 1 second sample rate)
this means that the sensor results are valid after at least one hour
this baseline could be stored in non volatile memory if one wants to shorten this restart period. Sensirion suggest to store the baseline at 1 hour intervals (30 seconds make no sense either)
in this case the values stored in NVM could be written to the baseline registers at a restart of the module. so the values would be valid directly at startup.
i do not think this is a very important feature and this baseline thing can be omitted totally.
probably one could count the first hour after a restart and mark the result with a "!" mark to sign that they are not yet valid.
… Am 05.04.2018 um 13:56 schrieb Theo Arends ***@***.***>:
@gemu2015 <https://github.com/gemu2015> couldn't do it without you.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#2317 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ALG4Y9gs73OcrjSC-q_RcoPo_yE03Aziks5tlgZcgaJpZM4TCxeK>.
|
5.12.0j * Add optional Sunrise and Sunset timers with commands Latitide and Longitude to be enabled with define USE_SUNRISE in user_config.h (arendst#2317)
add the ability to select sunrise and sunset calculated times to a timer.
#define USE_SUNRISE
added a mode variable with
=> given time, sunrise or sunset
also added longitude and latitude for time calculation
// nor working yet =>
however it does not update the time on selecting the options
only after reentering the timer setup
remark => used 2 bits of currently unused mday TIMER field