Skip to content

A module for MagicMirror that displays moonrise, moonset, and an image of the moon using AstronomyAPI!

License

Notifications You must be signed in to change notification settings

EnderFlop/MMM-Moon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMM-Moon

Display a picture of the current moon phase along with moonrise and moonset times on your MagicMirror²!

❗❗❗ JANUARY 2025 API CHANGE ❗❗❗

To reduce server load, AstronomyAPI has asked every user to register for their own FREE API application. Please visit AstronomyAPI, create an application, and add the new required appId and appSecret variables to your modules config.

How it works

Add the module to your MagicMirror² like any other module. Visit AstronomyAPI and quickly create a free application. Save the appId and appSecret variables and add them to your configuration file. Then add the "lat, lon, and timezone parameters to your configuration file! The app calls the AstronomyAPI and gets an image with your parameters, then throws it onto your mirror!

Screenshots

Sample Picture One

Preconditions

  • MagicMirror² instance
  • Node.js version >= 19
  • npm

Installation

Just clone the module into your MagicMirror’s modules folder:

git clone https://github.com/EnderFlop/MMM-Moon
cd MMM-Moon

Updating

Updating is as easy as navigating to the module’s folder, pull the latest version from GitHub and install.

git pull

Configuration

| Option | Description |

| ------ | ----------- |

| appId | Your AstronomyAPI app id
Type: string
Example: 72182420-85c1-12fe-9152-97ec098a6150
Default value: NONE
|

| appSecret | Your AstronomyAPI app secret
Type: string
Example: 07428a61bff20a38d606... {many more characters} ...3adc4314a8c8aab2c461cf4ad53209b13ef
Default value: NONE
|

| lat | The latitude of your location
Type: number
Example: 20.545
Default value: 41.657
|

| lon | The longitude of your location
Type: number
Example: -67.420
Default value: 91.534
|

| timezone | Your timezone in TZ database format
Type: string
Example: Europe/Paris
Default value: America/Chicago
Note: You can find a list of all TZ timezones here.

Here is an example for an entry in config.js:

{

module: "MMM-Moon",

position: "top_left",

config: {
//TO GET YOUR app_id AND app_secret, VISIT AstronomyAPI AND CREATE AN APPLICATION.
appId: "72182420-85c1-12fe-9152-97ec098a6150",

appSecret: "07428a61bff20a38d606... {many more characters}  ...3adc4314a8c8aab2c461cf4ad53209b13ef",

lat: 20.545,

lon: -67.420,

timezone: "Europe/Paris"

}

},

About

A module for MagicMirror that displays moonrise, moonset, and an image of the moon using AstronomyAPI!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •