[userMODULE] ScheduleSun

Tips, Tricks and Scripts to enhance your home automation and workaround known device bugs, limitations and incompatibilities
Vantskruv
Posts: 13
Joined: 06 Nov 2014 18:26

[userMODULE] ScheduleSun

Post by Vantskruv »

Module is only tested on server version Z-Way 2.0.0-rc13. So I'm unsure if it will work for earlier versions of the server.

Description for version 1.0.1 and later--------
NOTE: This description does not apply to module version 1.0.0 .
Scene scheduler for sun positions. The calculations is based from source-code by mourner:
https://github.com/mourner/suncalc
These are merged in the module code, as I don't know how to import objects in javascript code. This will make you independent of internet-connection.

Basically, this module calculates the nearest time and date of your selected sunposition and calls a selected scene at that time. When the scene has been called, the next time and date of the selected sunposition will be calculated, and the selected scene will be called at that time, this will continue on until you remove or change the options of the module.

Values that are needed is your preferred latitude and longitude in decimal format which can be retrieved from i.e:
http://itouchmap.com/latlong.html

Also you can add time values offset to your selected sunposition, i.e. turn on a scene 15 minutes before or after sunset.

Status update 2014/11/12 12:10
Added a new module and updated the text of this post.
Attachments
ScheduleSun_v.1.0.1.zip
Version 1.0.1.
You need to remove the old version as some old settings are removed, and new settings are added.
Changes----
* You individually select the position of sun. The options are:
sunrise, sunset, sunriseEnd, sunsetStart, dawn, dusk, nauticalDawn, nauticalDusk, nightEnd, night, goldenHourEnd, goldenHour

* If you want both sunrise and sunset, you need to create two instances of this module.
* Added default value the time offset option.
* Cleaned up the code a little.
(3.49 KiB) Downloaded 502 times
ScheduleSun.zip
Version 1.0.0.
Keeping this version until there is proof that version 1.0.1 is working.
(6.74 KiB) Downloaded 427 times
Last edited by Vantskruv on 12 Nov 2014 14:16, edited 3 times in total.
ScheduleSun - a sunset/sunrise module
viewtopic.php?f=3424&t=20801
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: [MODULE] ScheduleSun

Post by pz1 »

Thank you for sharing this module.
I think it would be helpful for users to kown on which version you have tested this, since there are some differences between 1.7 ans the upcoming 2.x versions. Could you add that to your text? Thank you.
Since 29-12-2016 I am no longer a moderator for this forum
Vantskruv
Posts: 13
Joined: 06 Nov 2014 18:26

Re: [MODULE] ScheduleSun

Post by Vantskruv »

I'm glad to help, and everything is free to modify, and of course if something is missing or you have new ideas just tell me. When I've time I'll try to fix and improve as much as I can. :)
ScheduleSun - a sunset/sunrise module
viewtopic.php?f=3424&t=20801
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: [MODULE] ScheduleSun

Post by pz1 »

I did unzip the module to automation/userModules. Restarted Z-Way.
Did not see the module show up under modules in the HA-UI. Next stop Z-Way followed by reboot on console brought up the console. I 'll report more later

Note to zwave.me team: The Modules edit window is rather narrow. (update: I was using FF; Chrome is better)
Since 29-12-2016 I am no longer a moderator for this forum
Vantskruv
Posts: 13
Joined: 06 Nov 2014 18:26

Re: [MODULE] ScheduleSun

Post by Vantskruv »

Double check if the folder exist and is not a double folder i.e. Scheduleasun/ScheduleSun.

Also, actually I've been putting the module in the automation/modules folder which you shouldn't do.
ScheduleSun - a sunset/sunrise module
viewtopic.php?f=3424&t=20801
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: [MODULE] ScheduleSun

Post by pz1 »

Did not work for me last night. In reviewing the settings I noticed that I should have selected add and subtract operators :oops:
Can those selectors be preset to some value?
Since 29-12-2016 I am no longer a moderator for this forum
Vantskruv
Posts: 13
Joined: 06 Nov 2014 18:26

Re: [MODULE] ScheduleSun

Post by Vantskruv »

Thanks pz1 for pointing that out. I've been making some vital changes to make the module more dynamic, and not forcing users to have both sunrise and sunset to be set. As it takes a day at least to see everything works, I'm keeping the version 1.0.0 here for others to download.
ScheduleSun - a sunset/sunrise module
viewtopic.php?f=3424&t=20801
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: [MODULE] ScheduleSun

Post by pz1 »

I'll keep the old one till tomorrow morning to make sure it works.
Next I'll test your new "split" module after that. Looks interesting.
Since 29-12-2016 I am no longer a moderator for this forum
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: [MODULE] ScheduleSun

Post by pz1 »

Sorry for late feedback. The "old" one has been doing quite well for me (up and inclusive rc20). Haven't had the time to play with the new one yet
Since 29-12-2016 I am no longer a moderator for this forum
Vantskruv
Posts: 13
Joined: 06 Nov 2014 18:26

Re: [MODULE] ScheduleSun

Post by Vantskruv »

It is nice to hear, and you shouldn't be sorry. You should be thanked for being so active and kind.

Version 1.0.1 is working nice for me without any problems (yet ;) ).
ScheduleSun - a sunset/sunrise module
viewtopic.php?f=3424&t=20801
Post Reply