[Re-RELEASE] Moon Phase Driver

Thought I'd open a new thread (old thread link) on this driver because there has been some recent interest and I've accepted a merge request which added SVG and Emoji outputs to the driver.

Available via HPM or github at https://raw.githubusercontent.com/thebearmay/hubitat/refs/heads/main/moonPhase.groovy

Driver can be set to automatically refresh image at sunset or be used on demand for the current or a requested date/time (yyyy-MM-dd HH:mm:ss format).

Outputs are:

  1. HTML with an image suitable for dashboard display
  2. Link to image only
  3. Phase Emoji
  4. Generated SVG image (which should be closer to the "live view" than the static images)
8 Likes

Nice! I like it!

1 Like

Merged several SVG enhancements including dynamic resizing of the image to match its container (i.e. dashboard tile). If you are hosting the image files locally you’ll need to copy one additional file lunar_surface.png.

With this set of enhancements, I’m considering retiring the original tile set. Thoughts?

3 Likes

I am having some confusion with Moon Phase - the HTML and the other icons aren't really in sync. I build a tile from the parts using Tile Builder ...
easiest just to show this mornings images: Here is the device page:

and here is the tile results:
image

This was working up until a few days ago, then the tile first got to large to display, and just 1-2 days ago it changed to this:
image

I can look closer at this tonite - sorry for the poor feedback.

Everything on the driver page looks consistent; driver only updates one of html or moonPhaseTile - looks like you have moonPhaseTile selected. The phase text and static image will switch at 0.125

This is the image I am getting on my dashboards when I click on the moon icon.

Doesn’t look like it has updated in a few days. Click on Get Phase and see if that changes it. If it does, refresh the page and then look to see that there is a scheduled event down near the bottom. If not check your preferences to make sure Auto Update at Sunset is still checked and click Update.

"Enable automatic update at sunset" doesn't work for me. It only automatically updates once and then stops working.

Me either so I just created a rule to Get Phase every morning.

1 Like

I'll take a look to see what changed...

Edit: found it - v2.0.3 is up, re-save the Preferences

1 Like