Closed sidevesh closed 2 years ago
fetchInterval is 1000 in config only for testing for now, since currently I don't see any requests being made at all.
Your config is incomplete. Please see the 2 examples provided at the bottom of the Readme.
Even with the example config copied as is, with only the apiKey replaced, I see the same behavior.
new config:
{
module: "MMM-NewsAPI",
header: "news",
position: "top_right",
config: {
apiKey: "---------------",
type: "horizontal",
choice: "headlines",
pageSize: 10,
sortBy: "relevance",
drawInterval: 1000*30,
templateFile: "template.html",
fetchInterval: 1000*60*60,
query: {
country: "us",
category: "",
q: "covid",
qInTitle: "",
sources: "",
domains: "nytimes.com",
excludeDomains: "",
language: ""
}
}
},
Did you run npm install in the MMM-NewsAPI folder after you ran the git clone?
I have just used the following config and I am getting news feed.
{
module: "MMM-NewsAPI",
header: "NEWS",
position: "bottom_bar",
config: {
apiKey: "------------------------",
type: "horizontal",
choice: "headlines",
pageSize: 5,
sortBy: "publishedAt",
drawInterval: 1000*30,
templateFile: "template.html",
fetchInterval: 1000*60*5,
debug: true,
query: {
country: "in",
category: "",
q: "",
qInTitle: "",
sources: "",
domains: "",
excludeDomains: "",
language: ""
}
}
},
Also. This module is best suited for bottom_bar.
I did run npm install
, would have gotten missing module error otherwise,
even with the config you just shared, its the same behavior,
I don't see anything in container logs from MMM-NewsAPI either,
even the socket connection shows no mention of MMM-NewsAPI,
to me it looks like sendSocketNotification
doesn't send any message.
Can you check in the Developer WIndow under Console if there are any errors? You can do ctrl + shift + i. You say there are no errors in the terminal or the pm2 logs (if you are running pm2)
I restarted the server and it started working! Thanks for the help +1
My config:
I can see
selected choice: headlines
in console with debug true but nothing after that and no errors in the container logs too (I am running MM in server only mode in docker) Don't see any requests being made in the newsapi's logs.