Page 1 of 2

[userMODULE] ScheduleSun

Posted: 09 Nov 2014 20:16
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.

Re: [MODULE] ScheduleSun

Posted: 10 Nov 2014 13:31
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.

Re: [MODULE] ScheduleSun

Posted: 10 Nov 2014 21:14
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. :)

Re: [MODULE] ScheduleSun

Posted: 11 Nov 2014 12:28
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)

Re: [MODULE] ScheduleSun

Posted: 11 Nov 2014 18:09
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.

Re: [MODULE] ScheduleSun

Posted: 12 Nov 2014 11:29
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?

Re: [MODULE] ScheduleSun

Posted: 12 Nov 2014 14:07
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.

Re: [MODULE] ScheduleSun

Posted: 12 Nov 2014 14:22
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.

Re: [MODULE] ScheduleSun

Posted: 17 Nov 2014 11:46
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

Re: [MODULE] ScheduleSun

Posted: 17 Nov 2014 18:52
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 ;) ).