Horoscope Module for MagicMirror²
Clone or download



Horoscope Module for MagicMirror² v.0.1.0

This is a module for MagicMirror² that adds daily horoscope pulled from the Yahoo Style Horoscopes. API endpoint used for this module is not officially supported and may break at any time.



npm modules (should already be available with your MM installation):

  • request
  • moment

Installation steps

cd ~/MagicMirror/modules
git clone https://github.com/morozgrafix/MMM-horoscope.git
cd MMM-horoscope
npm install

Using the module

To use this module, add it to the modules array in the config/config.js file:

modules: [
    module: 'MMM-horoscope',
    position: 'top_right',  // This can be any of the regions.
    config: {
      // See 'Configuration options' for additional options and more information.
      sign: 'aries', // Zodiac sign

Since this module is using node helper you would need to restart your MagicMirror electron app in order for it to be activated.

Configuration options

Option Description
sign Zodiac sign for daily horoscope. (String)

This value is REQUIRED

Possible values: aries, taurus, gemini, cancer, leo, virgo, libra, scorpio, sagittarius, capricorn,aquarius,pisces
Default value: aries
maxWidth Overall width of the module to help you fit it in your layout (String CSS value)

Possible values can be specified in: px, %, em etc.
Default value: 400px
updateInterval How often does the content needs to be fetched? (Milliseconds)

Since we are looking at daily horoscope data doesn't change much it is recommended not to pull it very often. Once an hour should be more than enough.

Possible values: 1000-86400000
Default value: 3600000 (1 hour)
timeShift Shifting time to display next or previous day horoscope. (Milliseconds)

This is done for conveniece of displaying next day horoscope in the evening. For example you'd like to start displaying next day horoscope after 7pm, in that case you would need to set timeShift value to 18000000. Math works out to 24 - 19 = 5, converting 5 hours into milliseconds 5 * 60 * 60 * 1000 = 18000000

Possible values: 0-86400000
Default value: 18000000 (5 hours)
useTextIcon Display Zodiac sign using text or image for the module output (Boolean)

See screenshot: left side is useTextIcon=true, right side is useTextIcon=false. CSS styles are using DejaVu Sans font which should be present on RasPi, other platforms may need CSS stylesheet adjustments.

Possible values: true or false
Default value: true
initialLoadDelay The initial delay before loading. (Milliseconds)

Largely Unused. If you have multiple modules that use the same API endpoint, you might want to delay one of the requests.

Possible values: 1000 - 5000
Default value: 0
animationSpeed Speed of the update animation. (Milliseconds)

Possible values:0 - 5000
Default value: 2000 (2 seconds)


This is my very first MM module and I probably missed something obvious. Please get in touch with me if you have a suggestion or feature request. Feel free to file a GitHub issue