scottcl88 / MMM-DynamicWeather

A heavily configurable MagicMirror Module to display different animations based on current weather and show customized event effects.
MIT License
30 stars 7 forks source link

Black Screen #42

Closed tqb43 closed 3 years ago

tqb43 commented 3 years ago

New to Magic Mirror. For some reason, whenever I try to add this module- it just makes my MM go black. Any ideas?

Here's my config file.

    // serverOnly:  true/false/"local" ,
    // local for armv6l processors, default
    //   starts serveronly and then starts chrome browser
    // false, default for all NON-armv6l devices
    // true, force serveronly mode, because you want to.. no UI on this device

    modules: [
            {
                    module: "alert",
            },
            {
                    module: "updatenotification",
                    position: "top_bar"
            },
            {
                    module: "clock",
                    position: "top_left"
            },
            {
                    module: "compliments",
                    position: "lower_third"
            },
            {
                     module: 'MMM-DynamicWeather',
                     position: 'fullscreen_above',
                     config: { // See https://github.com/scottcl88/MMM-DynamicWeather for more information.
                      api_key: "XXX",
                      locationID: "4365387",
                      effects: [
                       {
                        direction: "down"
                       }
                      ],
                     }
            },
    ]

};

/ DO NOT EDIT THE LINE BELOW / if (typeof module !== "undefined") {module.exports = config;}

scottcl88 commented 3 years ago

@tqb43 Can you explain what you mean by it goes black? Do the other modules not show?

Have you read the troubleshooting page? https://github.com/scottcl88/MMM-DynamicWeather/wiki/Troubleshooting

I would also recommend removing the "effects" portion of your config since its not intended to work with only "direction" specified.

tqb43 commented 3 years ago

@tqb43 Can you explain what you mean by it goes black? Do the other modules not show?

Have you read the troubleshooting page? https://github.com/scottcl88/MMM-DynamicWeather/wiki/Troubleshooting

I would also recommend removing the "effects" portion of your config since its not intended to work with only "direction" specified.

Thanks for the reply. Complete black screen- no modules are showing. I ran through the troubleshooting, keeps saying my API key is invalid, even knowing i'm copying them directly from Openweather

tqb43 commented 3 years ago

I reinstalled all my magic mirror files. Now the modules are showing except Dynamic Weather. I tested another weather module that uses the same API key, which then worked. But for some reason, Dynamic Weather just isn't displaying.

scottcl88 commented 3 years ago

@tqb43 Did you change your config as suggested with removing the "effects" portion? I'd also recommend copying the config example from this page.

Also, what says your API key is invalid? What do you see when you call the API in the browser? Such as go to this URL with your ApiKey: https://api.openweathermap.org/data/2.5/weather?appid=[API_KEY]&id=4365387 Do you see actual data? I see the following with my key as expected:

{
  "coord": {
    "lon": -76.7225,
    "lat": 39.3743
  },
  "weather": [
    {
      "id": 803,
      "main": "Clouds",
      "description": "broken clouds",
      "icon": "04d"
    }
  ],
  "base": "stations",
  "main": {
    "temp": 301.37,
    "feels_like": 303.83,
    "temp_min": 299.29,
    "temp_max": 303.49,
    "pressure": 1019,
    "humidity": 67
  },
  "visibility": 10000,
  "wind": {
    "speed": 1.34,
    "deg": 292,
    "gust": 7.15
  },
  "clouds": {
    "all": 79
  },
  "dt": 1631549795,
  "sys": {
    "type": 2,
    "id": 2005366,
    "country": "US",
    "sunrise": 1631529995,
    "sunset": 1631575148
  },
  "timezone": -14400,
  "id": 4365387,
  "name": "Pikesville",
  "cod": 200
}
tqb43 commented 3 years ago

Okay, after reinstalling everything on my magic mirror. It seems to be working. I had to npm install the module. BUT (at least at the time of writing this) the graphic that is displaying is incorrect. It's almost midnight here and the picture it's showing is the sun. The API and ID code are accurate- i'm using them in a forecast module. Any thoughts?

scottcl88 commented 3 years ago

@tqb43 Glad to hear its working. The sun is intended, this shows weather regardless of time. By default it will show the sun for clear skies (Weather Code 800 from https://openweathermap.org/weather-conditions).

Although that would be a neat feature to add - show sun/stars/etc based on time of day.

tqb43 commented 3 years ago

@scottcl88 Thanks for making this module! Brings the mirror to life. You should add the moon/stars for night :)

scottcl88 commented 3 years ago

@tqb43 Created another issue as an enhancement, might add it in the future. There may be other modules that do that too, may want to search around. I know MoonPhases exist for example. https://github.com/NolanKingdon/MMM-MoonPhase

Thanks for the feedback!