SmartAxiom / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

Support for Date Java Formatter on the URL itself in the HTTP Binding #194

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1. Feature Description
I want to be able to get the sunrise, twilight time, etc. from earthtools.org 
(This has the advantage that you also can get the nautical, civil, twilight) 
but unfortunately you can't pass the day & month via the HTTP parameters to 
earthtools, you rather need to pass them in the URL itself.
However the java formatter works only on the URL parameters part, not on the 
URL itself. It seems rare that we need to use the variables in the URL but here 
it is needed. I will post a proposal fix to support this feature.

2. Example use case
So for getting the sunset in Brussels via earth tools I need to be able to use 
(to use in rules and show on GUI main page)
DateTime        Sunrise         "Sunrise [%1$tA, %1$td.%1$tm.%1$tY, %1$tT]" { 
http="<[http://www.earthtools.org/sun-1.0/50.85/-4.35/%1$td/%1$tm/99/1?date=%1$t
d:6000000:XSLT(earthtools_org_sunrise.xsl)]" }

Original issue reported on code.google.com by Ptr.brou@gmail.com on 27 Jan 2013 at 11:40

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 28 Jan 2013 at 6:11

GoogleCodeExporter commented 8 years ago
the dynamic url enhancement feature is currently implement for the 
HttpOutBinding not for the HttpInBinding. So from my point of view it would 
never work for InBindings (yet). Will put that on the List.

Original comment by teichsta on 29 Jan 2013 at 11:44

GoogleCodeExporter commented 8 years ago
Simple code change for those who would like to use earthtools.org already:
http://code.google.com/r/ptrbrou-openhab/source/detail?r=c5104b7128058d023edbc0e
aca5cb7ea32ae1035

Original comment by Ptr.brou@gmail.com on 23 Mar 2013 at 3:33

GoogleCodeExporter commented 8 years ago
fixed with 
http://code.google.com/p/openhab/source/detail?r=73679e0a4c3b0777680f27386731079
6b56adaf0

thanks for your proposal!

Original comment by teichsta on 24 Mar 2013 at 10:35