richardfous / MMM-NameDay

Nameday module for MagicMirror2 platform
MIT License
5 stars 4 forks source link

Just loading.... #3

Closed zsocasog closed 3 years ago

zsocasog commented 3 years ago

The module won't start, I think the url has changed of the provider... I modified the MMM-NameDay.js with the following and now the module is working:

in row 56 const baseUrl = "https://api.abalin.net/"; ---> const baseUrl = "https://nameday.abalin.net/"; in row 96 dataRequest.open("GET", url, true); ---> dataRequest.open("POST", url, true);

I have tested only the "today" method, but now it is working.

AlienPT commented 3 years ago

I have the same issue - I changed the lines 56 and 96 and it was working. On next day it was not updated and after MM refresh and also complete reboot it still just "Loading..." Any ideas?

lacee82 commented 3 years ago

The same issue here. The first post solved the previous "Loading..." issue, then it's back again. Hope some experts can advise here. :)

AlienPT commented 3 years ago

Any news on this? It's a great and simple module but it's not working...

radimkarnis commented 3 years ago

Seems like the API has been changed again. Is this module actively maintained?

AlienPT commented 3 years ago

Modules without maintenance should be deleted... Otherwise there are more questions as answers... And all of us just need to wait... and wait... and nothing... I really hate approach like this...

AlienPT commented 3 years ago

Sorry, but still the same... "Loading..." I reinstalled after you updated your repo but it's the same. Any ideas what can be wrong? I don't have any special setup just "Country" set to "sk". Thank you

richardfous commented 3 years ago

So it looks like there is a problem with the API. The fix that zsocasog provided should work once the API issues have been resolved. I have already implemented the fix into to master branch. Someone has already opened an issue with the API provider and you can follow the progress here https://github.com/xnekv03/nameday-api/issues/5.

AlienPT commented 3 years ago

Thank you very much for the info.

lacee82 commented 3 years ago

Any update on the API issue? Or shall I look for an alternative? If yes, any proposal from anybody?

richardfous commented 3 years ago

No, still waiting for the API developer to fix the issue. I have tried some workarounds, but nothing worked. If you are able to find some proxy website, that would take care of the CORS problem, feel free to post it here and i can implement it in the code. But i was not able to find such website. As far as i know, there is no similar module, that is able to show name days.

lacee82 commented 3 years ago

Thanks! Is there maybe an offline version somehow? I mean the names listed in a TXT or something and the app just looks up the name of the date today... Basically no need to be this online, namedays are not dinamic inputs...πŸ˜„

AlienPT commented 3 years ago

That is really very good idea make it offline. Richard, would it be possible? It's really good module and there is no other options right now :)

richardfous commented 3 years ago

Sure, i can do that. However, it is going take some time to gather name days for all countries. Give me few days and i am going to implement something.

AlienPT commented 3 years ago

Excellent :) I can test SK for you :)

lacee82 commented 3 years ago

Great news! πŸ˜„ I can test HU for you! 😊

richardfous commented 3 years ago

So, i have added support for offline loading of namedays. There is a new folder called resources, where you can find JSON file that contains all namedays from the API. The offline mode only works if the API is not accessible. I have done a few tests myself and it looks like it is working now.

AlienPT commented 3 years ago

Hi Richard, I can confirm that your module is working again :) Just one thing - it's correct for TODAY but it shows the same name also for TOMORROW - is it only something on my end or it's working only for TODAY for now? Anyway thank you very much for you work on this :)

richardfous commented 3 years ago

The offline mode was only available with TODAY mode when i released the update. And now you can also use the TOMORROW and YESTERDAY modes.

AlienPT commented 3 years ago

And you are absolutely amazing!!! All is working now as expected :) Thank you very much - my MM is now complete :)

lacee82 commented 3 years ago

Great job! Thanks a lot, it works as expected! πŸ€πŸΎπŸ˜„