Skip to content
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

Closed
wants to merge 6 commits into from
Closed

Sunrise timer #2317

wants to merge 6 commits into from

Conversation

gemu2015
Copy link
Contributor

@gemu2015 gemu2015 commented Apr 1, 2018

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

works, but should update time when switching sunrise option (to doo)
# Conflicts:
#	sonoff/_releasenotes.ino
#	sonoff/xdrv_09_timers.ino
@arendst
Copy link
Owner

arendst commented Apr 1, 2018

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.

@gemu2015
Copy link
Contributor Author

gemu2015 commented Apr 1, 2018 via email

@arendst
Copy link
Owner

arendst commented Apr 3, 2018

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 ...

@arendst
Copy link
Owner

arendst commented Apr 3, 2018

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.

@gemu2015
Copy link
Contributor Author

gemu2015 commented Apr 3, 2018 via email

@arendst
Copy link
Owner

arendst commented Apr 3, 2018

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.

arendst added a commit that referenced this pull request Apr 5, 2018
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)
@reaper7
Copy link

reaper7 commented Apr 5, 2018

only for sure...

Add support for Sunrise and sunset tools (+16k)

+16k ?

@gemu2015
Copy link
Contributor Author

gemu2015 commented Apr 5, 2018 via email

@arendst arendst closed this Apr 5, 2018
@arendst
Copy link
Owner

arendst commented Apr 5, 2018

This is how it looks like:

image

@gemu2015
Copy link
Contributor Author

gemu2015 commented Apr 5, 2018 via email

@arendst
Copy link
Owner

arendst commented Apr 5, 2018

@gemu2015 couldn't do it without you.

@gemu2015
Copy link
Contributor Author

gemu2015 commented Apr 5, 2018 via email

@dasMopo dasMopo mentioned this pull request Apr 6, 2018
curzon01 pushed a commit to curzon01/Tasmota that referenced this pull request Sep 6, 2018
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants