-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Enhacements to 'time' expression in rules #633
Comments
this lib looks promising http://www.jstott.me.uk/jsuntimes/ |
I use these fields in Misterhouse, would welcome them in Openhab: |
This can be achieved by using the following (thanks RaK for providing the base script) ################################################# // constants // coordinates (see Google-Maps) rule "Calculate Sunheight and Azimut"
end ################################################# furthermore you need two new items of type 'Number'
In order to react properly please add other rules with an Item-Changed-Trigger in Sun_Height or Sun_Azimut which in turn can do all the time tweaks using joda-time Does that suite your needs? |
may be this will also help: import org.openhab.core.library.types.* import java.lang.Math // Change this reflecting your destination var Calendar sunrise = Calendar::getInstance() rule "Sun"
end |
Can someon confirm that comment #4 give valid results? I tried it for my self (northern germany) and got SunRise 3:44 seems to be wrong while Google gives me SunRise 8:34 local |
This code works for me : // Constants // Change this reflecting your destination rule "Set Sun and Dawn States"
undenwinkel).doubleValue())
end in items Maybe this helps. |
#7 gzockoll Apr 2, 2013 Delete comment #8 kristian.backstrom It also seems to me that #6 gives me negative sun height values quite too early in the evenings. My coordinates are roughly 25,66E and 60,39N (if you like to test). Have anyone written a rule for calculating the solar beam hitting angle against flat solar collectors for a given time? The additional parameters would naturally be panel tilt angle and panel rotation angle. I would like to forecast their power, by also using weather forecasts for estimating the cloud cover. Regards, Apr 3, 2013 Delete comment Project Member #9 teichsta I would propose to ask the question on the google group since there are more observers than on this issue. Regards, Thomas E.-E. Jun 28, 2013 Delete comment #11 Erland.Lestander Jul 17, 2013 Delete comment #12 evazzoler Jul 18, 2013 Delete comment Project Member #13 teichsta Jul 24, 2013 Delete comment #14 [email protected] "Time is sunset" Pay attention on this: there is no home automation where no astronomical timer is provided... Jul 24, 2013 Delete comment Project Member #15 belovictor Jul 25, 2013 Delete comment Project Member #16 kai.openhab Sep 15, 2013 Delete comment #17 [email protected] Sep 16, 2013 Delete comment Project Member #18 kai.openhab |
meanwhile the Astro-Binding (see https://github.com/openhab/openhab/wiki/Astro-binding) has been implemented which should solve the problem |
Original issue: http://code.google.com/p/openhab/issues/detail?id=71
The text was updated successfully, but these errors were encountered: