[RELEASE] Meteorological Seasons driver

I'm putting this out there - my first.
Meteorological Seasons
(Previously - Meteorological Seasons of the Northern Hemisphere)

Update 2021-04-10 - Now with both hemispheres as of 2.x!

Update 2021-10-25 - now with better Hubitat Dashboard - Android dashboard app

Update 2021-10-27 - tile font color , size and position control added. From ReadMe:"
**

Additionally, as of x.2.1x further features to support the tiles have been added - Font Color can be specified either as hex #xxxxxx or using websafe color names. Font-size can be specified from 1%-500% or using standard font values such as 12px or LG etc. Lastly, the vertical position within the tile of the test ovelay is now adjustable! the default, 55 (percent) puts the text about 2/3rds from the top. but you can specify 1-100 (%) and control it from top edge to bottom edge."

**

GitHub source location {latest/current version}

(Original Post / Release announcement below)
This driver I wrote with the help of the community - (all of them I think!) as a way to solve a small need to have seasons in my rules and some tiles.
Basically it allows a Virtual Device to be created that has the Season name, a Season number, an Icon, a background image and an HTML tile. I have done rudimentary testing - and it works with Rules easily (using custom attributes) and integrates nicely to the dashboard.

I also intended to make it switchable from Meteorological to Astronomical and have user capable of control of the start/stop of each season - but again - I bit off more than I could chew! Maybe someday...

Feel free to download and install, laugh, or send comments. And thanks again to all that got me this far.

9 Likes

Well done @jshimota on getting your first driver released :slight_smile:

2 Likes

Thanks for releasing this @jshimota.
It looks good.
Does the driver auto update? As in if the date changes from Feb 28th to March 1st it will auto update from winter to spring.
Many thanks for releasing this. :+1:

1 Like

Looks like he has it set to check every morning at 0600

    schedule("0 0 6 * * ?", currentSeason) //  daily at 6am   

Might want to consider adding an unschedule() in front of each schedule() just to make sure that you don’t accidently have more than one refresh scheduled in the future. Looks like the logic would stop this from happening right now, but if/when you do an update to it, it’s really easy to end up with multiple schedules running.

3 Likes

OMG! talk about timing! I'm literally doing the unschedule stuff now - learning about sending log commands for when values change etc. coming along swimmingly. at my current rate of speed - will need a few hours to learn and implement!

3 Likes

@jshimota just installed a virtual device and can see the auto-update button within the device.
I really should pay more attention. :blush:

Please pull and overwrite another copy from the github link. I've made some substantial changes - to logging, scheduling and a bug fix of the daily value being updated.
I created a rule to Say the season on my Alexa - really cute!
image

(and have successfully tested turning off my Air Conditioners and enabling my floor heater based on season :slight_smile:

2 Likes

More than happy to do that thankyou.
Have you thought of putting it into Hubitat Package Manager.
I have no clue what is involved in doing it but it does make life easier for lazy people like me. :wink:

Takes a little setup but not too difficult. Down near the bottom of: GitHub - dcmeglio/hubitat-packagemanager

1 Like

I feel I'm just a hack and shouldn't be posting with the real great code thats been/being built - however. I also feel i have an obligation to do my best to make things easier and smarter for others who might find my tool useful - so... I'm going to do my best to embark down that path.
My github repository is a mess, my desktop IDE messes up the Github... I need to get that organized correctly then I'll tie into the HPM. I suspect as I learn more, and improve I'll be happy I did the work!
I'll post back here when I get that far. I always wondered about that big green 'RELEASE' thing. I suspect you may ultimately see that pop-off when I get it right... we'll see. Thanks for trying my tool out.

1 Like

Yeah, you’ll want to get that right before you start building manifests; no good way to change it afterward.

I just updated driver to 0,1.16 and season icons no longer working. 0.1.15 was working fine.
Thanks great addition... :grinning:

Thats completely on me ... I was cleaning Github in preparation to integrate with Hubitat Package Manager.
There is a new version (0.1.17) which now includes the permanent future reference. FYI, I do not know the implication of having the driver installed when (if?) I succeed to tie to HPM. There may be a required removal of your hand installed driver - be advised! I'm trying my hardest :slight_smile:

No problem....
Thanks

Given how quickly you are moving to get this setup, compared to when you released the driver, I think most users would accept a short manual step to remove and re-setup the devices. Perhaps ask the question before investing too much time in this part of the transition.

That said, there is a match function in HPM that may be worth looking at... And sometimes in situations like this HPM may install a copy of the driver, in that case it should be a simple case of updating the Virtual device to point to the HPM managed driver and then removing the manually installed driver.

They should be able to do a Match to connect HPM to their source as long as the driver name is consistant.

1 Like

well - I've got my fingers crossed! I've submitted a pull request to merge my package into the HPM - and with any luck HPM will pick up Met Seasons and versioning issues will become a thing of the past.

2 Likes

@jshimota

First, thanks for taking the plunge. I've written several drivers (and attempted a app) but haven't taken the time to user proof or optimize them yet so I would be comfortable releasing them (there is no test like production!).

Q of the moment, I've looked at the code and want to check how you are deciding it's change of season. Are you using the current month to determine the season?

Thanks,
Alan

Hi @alan564923 - yes. In a nutshell there are 2 basic methods to determine season - Astronomical and Meteorological.
In the Astronomical method seasons are based on the equinoxes... there are deviations and the dates are not aligned on monthly boundaries - such as Sept 22 -Dec 21 for Fall (also called Autumn to add another layer of complexity!).
In the Meteorological method seasons are based in a monthly boundary - Sept 1 - Nov. 30. This was the method I used, hence the title of the driver - Meteorological.

Here is a document I wrote that may help explain things:

I should have looked at your site first! I appreciate the explanation. I didn't know there was a distinction or even the essence of a difference.

Alan