Cynical Weather

Posted on
Sun Feb 16, 2014 1:19 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Cynical Weather

I'm thinking it is probably our bug. I'll look into it. ;-)

Image

Posted on
Sun Feb 16, 2014 5:01 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Cynical Weather

CREATE TABLE device_history_1176915653 ( id #AUTO_INCR_KEY, ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP, azimuth INTEGER, height INTEGER, index INTEGER);

Whoever generates this line should quote the column names - all of them. Basically, whenever you take column names from someone else, you need to quote them to avoid the "keyword issue":
CREATE TABLE device_history_1176915653 ( id #AUTO_INCR_KEY, ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP, "azimuth" INTEGER, "height" INTEGER, "index" INTEGER);

would work fine. (Except for the #auto_incr_key, which my sqlite3 doesn't like. Some other SQL dialect?)

Cheers
-- perry

Posted on
Tue Mar 04, 2014 4:26 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Cynical Weather

Indigo 6.0.11 is now available and includes the proper escaping of column names to avoid this problem.

Image

Posted on
Tue Mar 04, 2014 7:21 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Cynical Weather

matt (support) wrote:
Indigo 6.0.11 is now available and includes the proper escaping of column names to avoid this problem.

Great service as always.

Thanks, Matt!
-- perry

Posted on
Thu Mar 20, 2014 10:53 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Cynical Weather

durosity wrote:
*Squeal* Just what i always wanted.. Perry, you’re the man!

As for extra features i think the one main thing i’d like to see is future forecasts and summaries. Specifically i think i’d like to see today and tomorrows weather as listed on the forecast.io site.


All right-y, here you go. Version 0.9.1 has two new device types, for hourly and daily forecasts. Make a Location, then make Forecast devices referring to it. You can get "today's weather" from a daily forecast at zero days, and tomorrow's at +1 day. You can make as many forecast devices as you like; they're all using the same data as their "parent" location, so they don't cost extra.

Enjoy.
-- perry

Posted on
Fri Mar 21, 2014 7:06 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Cynical Weather

Excellento! I look forward to trying it this weekend!

Computer says no.

Posted on
Fri Mar 21, 2014 10:24 am
Korey offline
User avatar
Posts: 811
Joined: Jun 04, 2008
Location: Henderson, NV

Re: Cynical Weather

Nice work!

Thanks for the new options Perry!

--
Korey

Posted on
Fri Mar 21, 2014 2:08 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Cynical Weather

Perry The Cynic wrote:
You can get "today's weather" from a daily forecast at zero days, and tomorrow's at +1 day. You can make as many forecast devices as you like; they're all using the same data as their "parent" location, so they don't cost extra.


If i try to put in a value of 0 it won’t validate the field.. or am i mis-understanding and 1 is for today/this hour, and 2 would be for tomorrow/next hour?

Computer says no.

Posted on
Fri Mar 21, 2014 3:37 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Cynical Weather

durosity wrote:
If i try to put in a value of 0 it won’t validate the field.. or am i mis-understanding and 1 is for today/this hour, and 2 would be for tomorrow/next hour?

No, you got it right and the plug-in got it wrong. (Or rather, I pushed the second-to-last version to the server.)

The documentation isn't updated for this yet, BTW. But a zero-{hour,day} forecast is for the current hour or day (the one that's already begun).

0.9.2 ahoy.
-- perry

Posted on
Fri Mar 21, 2014 5:58 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Cynical Weather

Awesome… all working beautifully :D

Computer says no.

Posted on
Tue Apr 08, 2014 6:20 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Cynical Weather

Thank you very much for this nice plugin Perry!
It works even in the Netherlands! :lol:

Question: I want to make a Trigger when the sun is after the highest height.
The most simple solution is a Variable. But there is only a Variable Trigger with greater and less than (a value)
but not a Variable solution with "becomes lower".

Anybody a solution?

Thanks and kind regards,

John

Posted on
Wed Apr 09, 2014 9:18 am
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Cynical Weather

McJohn wrote:
Question: I want to make a Trigger when the sun is after the highest height.
The most simple solution is a Variable. But there is only a Variable Trigger with greater and less than (a value)
but not a Variable solution with "becomes lower".

Whatever are you planning to do with that?

Note that the time of highest elevation is roughly constant for any geographic location - the height varies but not the time of day when it occurs. That time is roughly noon, give or take half an hour depending on where in your time zone you reside. In other words, to do something when the Sun is just about highest in the sky, you might as well check it one day, write it down, and create a daily schedule at that time. As long as you don't move, you're good.

Caveats: I said roughly because the time varies by minutes over the year due to astronomical irregularities. And you need to add an hour while daylight savings time is in effect. (Sadly, Indigo schedules don't have a DST reverse-adjust clause, clearly a major failing of the facility. :-))

If you really want to engage the powers of Indigo, you need to save the previous elevation value in a variable and trigger on "new value is lower than saved value and this is the first time today." A few lines of Python would do that. I'm not sure it's worth the effort, though.

Cheers
-- perry

Posted on
Thu Apr 10, 2014 5:12 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Cynical Weather

Hi Perry,

Thank you very much for your comprehensive explanation.
What I want is for example to close the sunshades when the sun is at the highest level (that’s in my case at the SW side of of my house).
BUT, I discovered a nice other solution in your plugin yesterday evening: the index value is very useful and I think I can do something with that feature.
(and personal I want to know when the sun is at the highest level :-) )

The benefits of Indigo + a Plugin is very good for the general knowledge of a human being! These days I discovered a lot of sun tracking and told my wife proud what the definition is of azimuth :-) Thanks, this data was the missing link for my own weather station in Indigo!

One last question; what about the moon phrase data from forecast.io?

Kind regards!

John

Posted on
Thu Apr 10, 2014 8:22 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Cynical Weather

McJohn wrote:
One last question; what about the moon phrase data from forecast.io?


On a side note to that, would tide information be available from forecast.io? I'd quite like to see when the next high/low tides are down at tynemouth :)

Computer says no.

Posted on
Thu Apr 10, 2014 3:43 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Cynical Weather

durosity wrote:
On a side note to that, would tide information be available from forecast.io? I'd quite like to see when the next high/low tides are down at tynemouth :)

No tides from forecast.io; sorry. That would have to be an entirely different data source. So no, not in this plugin.

Moon phase might be in the cards...

Cheers
-- perry

Who is online

Users browsing this forum: No registered users and 2 guests

cron