@np27np27 probably. I have realized I have a mistake when the event is finished and the next date should be set to be used…
If you manually refresh with F5 or restart does it get any better?
@np27np27 probably. I have realized I have a mistake when the event is finished and the next date should be set to be used…
If you manually refresh with F5 or restart does it get any better?
@np27np27 I guess you are correct, something is wrong since the second last update.
I have tried to reduce the number of API calls trying to have them issued only when games are on or about to start rather than each and every 2 mins… but sometimes things do not work as I expect.
You should be able to see a message at the bottom of the standings telling you when the next API request is expected to be executed, that should help d figure if the new data are requested at a meaningful time.

@np27np27 can you try to check out from master now and let me know if the problem is gone? :D
@karsten13 this could be one reason (I plan to switch to node-fetch), but I experience the same problem as reported by @np27np27 and I have detected the APIs are responding with errors.
Unfortunately, there is not much I can do about it :(
@np27np27 the API the module is fetching the data from does not seem to respond anymore (or at least, they do not in most of the cases).
I have tried with Postman to double-check if it is a problem with my code or of the API, but also with Postman I get the same error/problem.
I am trying to figure if I can replace the API with others, but I have not found anything I can really move without losing some of the information or the functionalities implemented now.
@cowboysdude technically it is based on Chromium (https://www.chromium.org/).
@bkeyport same for me, even tho I am aware like 99% of MM users are running it out of a raspberry pi with a Chromium browser.
That is the reason I say the main focus could be on Chromium-based browsers rather than others.
@bkeyport many do, and you are not alone.
But how many people are running MM in a safari browser?
I guess this is the relevant point here :)
@mmrize hey thanks! I figure that out myself already digging into the code!
cool module, I never really thought about using an event to customize the payload and have a function as a config value… I may play around with it a little more and come back if I have any question :)
is this supposed to work with: MMM-OpenWeatherForecast?
and how should this behave if there is more than one instance of the same plugin configured?
I see the module, and this post, are not really active, so if it is not supported (or maintained) anymore - just ignore me!
@mmrize agree to support native browser APIs, but I do also believe we cannot assume everyone is running an up-to-date system for their magic mirror.
One idea could be to provide a wrapper module to abstract the “behind the scene” tool to manipulate dates, but it may turn out to be quite of an effort and limiting the module developer.
@sdetweil yeah, I guess, I was not clear enough. And I think we are saying the same thing.
Installing “request” in the MM root folder solves the problem, and this is how I do run my magic mirror from the development branch at this very moment.
What I mean is that if the module is removed from the “MM/node_modules” folder (the last “parent” level for all modules), every single module will most likely need to install it on its own node_modules folder. This is where I meant it may blow up the size of the MM installation (modules included!)
I hope this clarifies my prev post :)
@sdetweil @sdetweil I am not convinced about both of your points of view. I mean technically yes.
But… looking into the modules themselves, they are solely made to work with the MagicMirror code base (99% of the cases)
What is the point to bloat the size of the installation with the same node module installed over and over again? when on, “global” can be used and relied upon? (well, yeah, I agree, “this situation” is one reason for it!). But why trade-off convenience over complexity?
I see it as a part of the Magic Mirror ecosystem, provide some common “code” to be used by everyone to both ease the development and the set-up of it.
As mentioned in the other thread, old legacy modules will probably stop working - forking them or re-doing them will fix them. This not only pushes forward the advancement of the whole MagicMirror tech stack, but it may strengthen the community and really push it to hold together and upgrade, modernize the code of the modules.
bottom line, nobody says it is going to be easy, but it is a big opportunity.
@swvalenti if your module uses “request” to issue HTTP calls then it is.
so, if you import it in your node_helper.js (or an alike node pice of code).
i.e.
const request = require('request');
or
import request from 'request'
on way to preserve it is to add “request” as a dependency to your module, but your end-users will need to install them on their own.
To add it to your module, from its folder you can do:
npm install request ; this will update your package.json file (and package-lock.json) - commit the change to your git repo (this is most likely a breaking change and would require a major version increase - if you version your code!)
Once this is done, your existing (and new) end-user will need to update their copy of your module and run npm install on their own to download request and enable them to use it.
@karsten13 said in Any plan to replace "request" and "moment"?:
In the current mm release 2.16.0 request is still a dev dependency but it is now totally removed on the develop branch (and so in the next release).
this would be a breaking change for many modules, what’s the plan to communicate it to the module developers (and potentially, to the users?)
@sdetweil ah, I had an old version that still included “request”. ID’ migrate my modules over to node-fetch!
About moment, I’d recommend taking a look at date-fns, many are moving over to it to replace moment - even tho the refactoring effort may not be trivial, the advantages seem to be more (including the smaller size of the final bundle)!
@mumblebaj there are many options. I am planning to replace all with node-fetch (https://github.com/node-fetch/node-fetch), and concerning moment, I think I’d go for date-fns: https://date-fns.org/
Is there any plan to migrate away from “request” and “moment”?
https://github.com/request/request/issues/3142
https://github.com/moment/moment#project-status
Thanks :)
wow! Version 2.2.1 is released today!
Fancy new stuff in it as the vertical scroll, so if your module cannot display all the list in the space it has allocated, it scrolls up and down for you to allow see all the details!
Before the game starts, and whenever possible, the location of the game ad the referee are shown right below the teams’ names, also, scorers, yellow cards, and red cards are shown in real-time and after the game is ended!
here is the link of my fork: https://github.com/0m4r/MMM-SoccerLiveScore
Let me know what you think! ;)
@np27np27 Please add “4100” to your leagues to add the Euro 2020 competition!