SpoturDeal / MMM-rain-forecast

Magic Mirror module
MIT License
9 stars 4 forks source link

No data #8

Closed crisvdn closed 8 months ago

crisvdn commented 8 months ago

Is someone still using this module? It keeps saying "Please wait" for data. Also tried out different refreshIntervals but seem to be waiting indefinitely.

SpoturDeal commented 8 months ago

There are a lot of people using this module. A few weeks ago, that buienradar had an issue with the connecting there were a lot rquests.

crisvdn commented 8 months ago

Alright. I've used the config described in the readme, how can I debug why it isn't working? (there's no logging that an actual request is being sent. Should there be? Or can I turn that on?)

SpoturDeal commented 8 months ago

Can you paste your config for the module?

crisvdn commented 8 months ago
{
                        module: "MMM-rain-forecast",
                        position: "top_left",   // see mirror setting for options
                        header: "Expected rainfall",
                        config: {
                                lat: 52,
                                lon: 5,
                                multiplyOriginal: 4,
                                pleaseWait: "Please wait",
                                noRainText: "Until %s no rain",
                                fillColour: '#0074d9',   // This is a blue color you can also use blue, cyan etc,
                                refreshInterval: 5  // Refresh interval in minutes
                        }
                },
}
SpoturDeal commented 8 months ago

That seems to look OK.

The module uses request that is deprecated. And in new version of nodejs it is no longer present

Go to the folder of the modiule and install request

npm install request

Will do the trick

crisvdn commented 8 months ago

I did this already, starting up the mirror without this module was not possible ;) (different issue for improvement). I added a comma after the config closing brace }

so this is the new config:


{
                        module: "MMM-rain-forecast",
                        position: "top_left",   // see mirror setting for options
                        header: "Expected rainfall",
                        config: {
                                lat: 52,
                                lon: 5,
                                multiplyOriginal: 4,
                                pleaseWait: "Please wait",
                                noRainText: "Until %s no rain",
                                fillColour: '#0074d9',   // This is a blue color you can also use blue, cyan etc,
                                refreshInterval: 5  // Refresh interval in minutes
                        },
                },
}

This seem to have resolved the issue, as im getting data now. Else I have no idea what the issue is/was. Is there any way to turn on debug logging?

SpoturDeal commented 8 months ago

If you are using pm2 you could see the logs with pm2 logs id_of_mirror

crisvdn commented 8 months ago

I seem to be getting data. "Unfortunately" it hasn't rained yet, so I keep seeing "until