Read the statement by Michael Teeuw here.
MMM-News and BBC
-
I’ve had MMM-News running on my mirror for a while, displaying headlines from the BBC.
Unfortunately in the last few weeks it’s stopped working, so I was wondering if anyone else has seen this and/or got it working again?
My config.js section for the module is this:
{ module: "MMM-News", position: "bottom_center", config: { apiKey : "<redacted>", type: "vertical", touchable: false, items: 100, drawInterval: 1000*15, query: [ { sources: "bbc-news" } ], templateFile: "template.html" } },
Looking on NewsAPI it’s still I think the correct setting, and it shows there that things are still being downloaded via my API key.
Anyone have any ideas, as this module for me looks nicer than the default newsfeed one as I want the images and short text rather than the single text line that the default module shows.
I know MMM-News hasn’t been updated for a while on GH, but is it now defunct?
-
Just to come back and close on this - I’ve now tested from Germany with and without a VPN (VPN end point is in the UK), using exactly the same URL and conditions (open in a browser under the VPN, disconnect the VPN and refresh the browser tab).
So I confirm that it is NewsAPI screwing around with the feed to UK IP addresses, so unfortunately nothing that can be done nor anything wrong with MagicMirror or its modules.
Probably best to mark this as solved, albeit basically crippled for UK users.
With VPN (UK IP end point):
{"status":"ok","totalResults":0,"articles":[{"title":"I was dragged into China consulate, protester Bob Chan says","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-10-19T17:22:20.9801343Z","url":"http://www.bbc.co.uk/news/world-asia-china-63318285"},{"title":"James Webb telescope spies 'Pillars of Creation'","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-10-19T17:22:16.2918895Z","url":"http://www.bbc.co.uk/news/science-environment-63319814"},{"title":"Watch Ukrainian troops under close gunfire","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-10-19T16:22:14.7766328Z","url":"http://www.bbc.co.uk/news/world-europe-63318579"},{"title":"Suella Braverman resigns as home secretary","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-10-19T15:52:31.1666375Z","url":"http://www.bbc.co.uk/news/live/uk-politics-63309400"},{"title":"Putin decree is doubling down as pressure grows","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-10-19T15:07:17.5111432Z","url":"http://www.bbc.co.uk/news/world-europe-63319100"},{"title":"Anna May Wong: Actress becomes first Asian American on US currency","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-10-19T14:07:23.619259Z","url":"http://www.bbc.co.uk/news/entertainment-arts-63316940"},{"title":"The 800-day US visa wait causing India despair","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-10-19T12:37:20.603458Z","url":"http://www.bbc.co.uk/news/world-asia-india-63301257"},{"title":"Five hours' sleep is tipping point for bad health","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-10-19T10:22:24.3232143Z","url":"http://www.bbc.co.uk/news/health-63284305"},{"title":"Liz Truss: What the world is saying about UK turmoil","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-10-19T10:22:21.1348437Z","url":"http://www.bbc.co.uk/news/world-63293009"},{"title":"Florida flesh-eating illness cases spike after Hurricane Ian","author":"BBC News","source":{"Id":"bbc-news","Name":"BBC News"},"publishedAt":"2022-10-18T22:07:21.4822377Z","url":"http://www.bbc.co.uk/news/world-us-canada-63309246"}]}
Without VPN (German IP end point):
{"status":"ok","totalResults":10,"articles":[{"source":{"id":"bbc-news","name":"BBC News"},"author":"BBC News","title":"Joe Biden's unusual fight to bring down gas prices","description":"The US president has gone to unusual lengths to try to rein in the price of fuel.","url":"http://www.bbc.co.uk/news/business-63233077","urlToImage":"https://ichef.bbci.co.uk/news/1024/branded_news/8A9C/production/_127248453_c5781efaa0145b7fe240fb16f434f71e45fab20b.jpg","publishedAt":"2022-10-19T19:07:22.1820718Z","content":"When he campaigned for president two years ago, Joe Biden had lofty economic ambitions - shifting the country away from fossil fuels, shoring up its safety net and advancing fairness and equality.\r\nN… [+7708 chars]"},{"source":{"id":"bbc-news","name":"BBC News"},"author":"BBC News","title":"I was dragged into China consulate, protester Bob Chan says","description":"A Hong Kong pro-democracy protester gives his account of violent scenes at Manchester's Chinese consulate.","url":"http://www.bbc.co.uk/news/world-asia-china-63318285","urlToImage":"https://ichef.bbci.co.uk/news/1024/branded_news/0E96/production/_127243730_ab007ba2-be91-4e18-9589-93e48eab6dea.jpg","publishedAt":"2022-10-19T17:22:20.9801343Z","content":"A protester says he was not trying to enter Manchester's Chinese consulate during a pro-democracy demonstration that saw violent scenes on Sunday.\r\nBob Chan told a news conference he was dragged onto… [+4155 chars]"},{"source":{"id":"bbc-news","name":"BBC News"},"author":"BBC News","title":"James Webb telescope spies 'Pillars of Creation'","description":"One of the most famous scenes in the cosmos is viewed by the new, Nasa-led super space observatory.","url":"http://www.bbc.co.uk/news/science-environment-63319814","urlToImage":"https://ichef.bbci.co.uk/news/1024/branded_news/3666/production/_127262931_weic2216a.jpg","publishedAt":"2022-10-19T17:22:16.2918895Z","content":"It's a classic - one of the most beautiful sights in the cosmos and now the new super space telescope James Webb has visited it anew.\r\nThe so-called \"Pillars of Creation\" are cool, dense clouds of hy… [+1637 chars]"},{"source":{"id":"bbc-news","name":"BBC News"},"author":"BBC News","title":"Watch Ukrainian troops under close gunfire","description":"War in eastern Ukraine involves not only artillery strikes, but close combat, as the BBC's Jonathan Beale finds.","url":"http://www.bbc.co.uk/news/world-europe-63318579","urlToImage":"https://ichef.bbci.co.uk/news/1024/branded_news/13E80/production/_127263518_p0d81n2f.jpg","publishedAt":"2022-10-19T16:22:14.7766328Z","content":"Fighting on the front line near the city of Lyman in eastern Ukraine involves not only artillery strikes, but also close quarters combat, as the BBC's Jonathan Beale finds out.\r\nCamera: Lee Durant\r\nP… [+20 chars]"},{"source":{"id":"bbc-news","name":"BBC News"},"author":"BBC News","title":"Suella Braverman resigns as home secretary","description":"The home secretary was appointed by Prime Minister Liz Truss in September and her departure will add turmoil around No 10.","url":"http://www.bbc.co.uk/news/live/uk-politics-63309400","urlToImage":"https://m.files.bbci.co.uk/modules/bbc-morph-news-waf-page-meta/5.3.0/bbc_news_logo.png","publishedAt":"2022-10-19T15:52:31.1666375Z","content":"If you're just joining us or are in need of a catch up, here four key things we have learned so far:\r\nPensions triple lock to stay\r\nIn a surprise revelation at Prime Minister's Questions earlier, Liz… [+1452 chars]"},{"source":{"id":"bbc-news","name":"BBC News"},"author":"BBC News","title":"Putin decree is doubling down as pressure grows","description":"Vladimir Putin is tightening security across Russia, with the introduction of different security levels.","url":"http://www.bbc.co.uk/news/world-europe-63319100","urlToImage":"https://ichef.bbci.co.uk/news/1024/branded_news/E048/production/_127261475_mediaitem127261471.jpg","publishedAt":"2022-10-19T15:07:17.5111432Z","content":"Vladimir Putin is under growing pressure.\r\nHis \"special military operation\" has not gone according to plan. As a result of the Ukrainian counter-offensive, Russia has been losing territory it had occ… [+3001 chars]"},{"source":{"id":"bbc-news","name":"BBC News"},"author":"BBC News","title":"Anna May Wong: Actress becomes first Asian American on US currency","description":"She will appear as part of an effort to feature notable women on American quarters.","url":"http://www.bbc.co.uk/news/entertainment-arts-63316940","urlToImage":"https://ichef.bbci.co.uk/news/1024/branded_news/10686/production/_127260276_gettyimages-154047962.jpg","publishedAt":"2022-10-19T14:07:23.619259Z","content":"Actress Anna May Wong is set to become the first Asian American to be featured on US currency.\r\nShe will appear as part of an effort to feature notable women on American quarters.\r\nWong, who is consi… [+1960 chars]"},{"source":{"id":"bbc-news","name":"BBC News"},"author":"BBC News","title":"The 800-day US visa wait causing India despair","description":"The US is struggling to clear a large backlog of visas, affecting thousands of Indians.","url":"http://www.bbc.co.uk/news/world-asia-india-63301257","urlToImage":"https://ichef.bbci.co.uk/news/1024/branded_news/16020/production/_127244109_p0d7r05y.jpg","publishedAt":"2022-10-19T12:37:20.603458Z","content":"The US is struggling to clear a large backlog of visa applications after it halted almost all processing operations during Covid-19. \r\nThis has severely disrupted Indian businesses and hit hundreds o… [+397 chars]"},{"source":{"id":"bbc-news","name":"BBC News"},"author":"BBC News","title":"Five hours' sleep is tipping point for bad health","description":"Getting less than this may increase the risk of a multitude of chronic conditions, say researchers.","url":"http://www.bbc.co.uk/news/health-63284305","urlToImage":"https://ichef.bbci.co.uk/news/1024/branded_news/1F7E/production/_127226080_gettyimages-1333374427.jpg","publishedAt":"2022-10-19T10:22:24.3232143Z","content":"At least five hours sleep a night may cut the over-50s' chances of multiple chronic health problems, researchers say. \r\nIll health can disrupt sleep - but poor sleep may also be a forewarning or a ri… [+2713 chars]"},{"source":{"id":"bbc-news","name":"BBC News"},"author":"BBC News","title":"Liz Truss: What the world is saying about UK turmoil","description":"BBC reporters around the globe explain how the political and economic upheaval is being viewed.","url":"http://www.bbc.co.uk/news/world-63293009","urlToImage":"https://ichef.bbci.co.uk/news/1024/branded_news/8647/production/_127257343_truss_getty976.jpg","publishedAt":"2022-10-19T10:22:21.1348437Z","content":"The world has been watching the political and economic upheaval in the UK over the past few weeks. \r\nThe havoc caused by Prime Minister Liz Truss's tax-cutting plan, followed by its withdrawal this w… [+4815 chars]"}]}
-
@DarrenHill I would guess they changed the format… nothing stays the same anymore…
-
@DarrenHill
As one of original authors of that module (I have delegated all the authority to another developer) I’ll look inside in a few days. -
@DarrenHill Hi. I just tested with your config and it works fine for me.
I look after MMM-News which can be found here
-
@DarrenHill what is your address: in mm config.js?
have u changed it recently?
does this module report errors in the console?
might be a CORS error… -
Thanks gents. Nice to know support is still there.
It was working a while back (several weeks) then it started showing images with #null and no other text, and now it doesn’t show anything in the area assigned to it.
In mm-error.log after a reboot, all I see is this:
[06.09.2022 20:13.58.974] [ERROR] Whoops! There was an uncaught exception... [06.09.2022 20:13.58.990] [ERROR] Error: listen EADDRINUSE: address already in use 0.0.0.0:8080 at Server.setupListenHandle [as _listen2] (node:net:1330:16) at listenInCluster (node:net:1378:12) at doListen (node:net:1516:7) at process.processTicksAndRejections (node:internal/process/task_queues:84:21) { code: 'EADDRINUSE', errno: -98, syscall: 'listen', address: '0.0.0.0', port: 8080 } [06.09.2022 20:13.58.992] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [06.09.2022 20:13.58.993] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues [29786:0906/201403.366075:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization [29882:0906/201403.754866:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported. [29803:0906/201403.845480:ERROR:command_buffer_proxy_impl.cc(126)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
(I renamed the log file and started a fresh log file with a reboot, as the old one is large and full of stuff).
The mirror has a static IP address which hasn’t changed, and I haven’t knowingly changed anything in the config, at least since the problem arose.
Can you remind me how to access the console?
-
@DarrenHill alt-spacebar, n
MagicMirror is the app created by my install
mm is the one created by following the manual instructions.
pm2 stop all
will stop everythingpm2 info 0 (or name) will dump out the info about what is to be run…
for MagicMirror it is /home/pi/MagicMirror/I stallers/mm.shto delete an entry
pm2 delete 0( or 1 or a name)
then pm2 save to update the pm2 startup cachepm2 --help, like most Linux commands will tell you all the things it can do
-
@sdetweil Thanks - I just found the wiki page about auto starting and saw I had somehow got it running twice.
That’s now fixed, but after a reboot the module issue still remains.
I’ll go check logs and console now.
-
@sdetweil OK I’ve found a News module error in the MagicMirror-out.log:
[06.09.2022 20:26.46.502] [LOG] [NEWS] Error : https://newsapi.org/v2/top-headlines?sources=bbc-news&pageSize=100&apiKey=<redacted> TypeError: Cannot read properties of undefined (reading 'toString') at slugify (/home/pi/MagicMirror/modules/MMM-News/node_helper.js:24:17) at cb (/home/pi/MagicMirror/modules/MMM-News/node_helper.js:89:33) at getArticles (/home/pi/MagicMirror/modules/MMM-News/node_helper.js:135:22) at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
I’ve removed my API key string, but the rest is copy/paste.
I tried a git pull on the module the other day before my first post here, and it’s up to date.
-
@DarrenHill that error means the content back from the API is not as expected. either nothing there or the format changed.