Closed Robiv8 closed 5 years ago
News, By a stupid coincidence, I discovered something. I went to work and took my Raspi to test by the way. Raspi started, desktop stays black! Aaaah! OK No internet. I put F11 so that I come to the desktop, then Turn on the W-LAN because otherwise no Internet possible. Terminal opened and MM restarted. "pm2 restart mm" MM comes. I think I'll push the 2 buttons if the two sides are still changing, and YES it still does. Wy not ;-) Press the 3 button and behold! Podcast starts to run. I'm amazed. But why? What the hell is going on. I think, and do some tests. The following, if I start the computer without Internet, then shrink MM to get to the wi-fi switch ,. Turn on W-Lan and restart MM, the button works and podcast starts. But if I restart MM now it does not work anymore. So i must Start without Internet connection then restart MM and its Going. Very Strange!
Now I'm not sure why that is? MMM-buttons MMM-page selector, MMM-Podcast2 or on the MagicMirror itself
The log without Internet MMM-Podcast2 Error : Error: EAI_AGAIN in https://www.tagesschau.de/export/video-podcastwebxl/tagesschau-in-100-sekunden-https/
Here some errors for analyzing:
MMM-Podcast2.js:72 Uncaught ReferenceError: streamurl is not defined
at Class.notificationReceived (MMM-Podcast2.js:72)
at sendNotification (main.js:95)
at Object.sendNotification (main.js:498)
at Class.sendNotification (module.js:368)
at Class.sendAction (MMM-Buttons.js:88)
at Class.buttonUp (MMM-Buttons.js:77)
at Class.socketNotificationReceived (MMM-Buttons.js:120)
at module.js:246
at r.<anonymous> (socketclient.js:25)
at r.emit (index.js:83)
@Robiv8
see english text below
Es sieht so aus, als ob dein Raspberry zuerst die Internetverbindung verliert oder garnicht erst hat, danach kommt der Fehler in MMM-Podcast2. Ich könnte den Fehler mit der fehlenden Verbindung im Javascript abfangen, dann würde der Stream der Tagesschau aber auch nicht funktionieren. Ich vermute Internet/Netzwerkprobleme bei deinem Raspberry.
currentweather.js:338 GET https://api.openweathermap.org/data/2.5/weather?id=2825297&units=metric&lang=de&APPID=mypersonalid net::ERR_INTERNET_DISCONNECTED updateWeather @ currentweather.js:338 (anonymous) @ currentweather.js:499 setTimeout (async) scheduleUpdate @ currentweather.js:498 start @ currentweather.js:112 startModules @ loader.js:55 (anonymous) @ loader.js:40 stylesheet.onload @ loader.js:203 currentweather.js:330 currentweather: Could not load weather. weatherRequest.onreadystatechange @ currentweather.js:330 XMLHttpRequest.send (async) updateWeather @ currentweather.js:338 (anonymous) @ currentweather.js:499 setTimeout (async) scheduleUpdate @ currentweather.js:498 start @ currentweather.js:112 startModules @ loader.js:55 (anonymous) @ loader.js:40 stylesheet.onload @ loader.js:203 MMM-Podcast-xml2json.js:65 Uncaught TypeError: xmlStr.replace is not a function at cleanXML (MMM-Podcast-xml2json.js:65) at xml2json (MMM-Podcast-xml2json.js:11) at Class.socketNotificationReceived (MMM-Podcast2.js:88) at module.js:246 at r. (socketclient.js:25) at r.emit (index.js:83) at r.onevent (index.js:83) at r.MMSocket.self.socket.onevent (socketclient.js:19) at r.onpacket (index.js:83) at r. (index.js:83) cleanXML @ MMM-Podcast-xml2json.js:65 xml2json @ MMM-Podcast-xml2json.js:11 socketNotificationReceived @ MMM-Podcast2.js:88
It looks like your raspberry first loses the Internet connection (when trying to receive weather data) or does not even have one at all, after that there is an error in MMM Podcast2. I could catch the error with the missing connection in javascript, then the stream of Tagesschau would not work either. I suspect internet / network problems with your raspberry.
currentweather.js:338 GET https://api.openweathermap.org/data/2.5/weather?id=2825297&units=metric&lang=de&APPID=mypersonalid net::ERR_INTERNET_DISCONNECTED updateWeather @ currentweather.js:338 (anonymous) @ currentweather.js:499 setTimeout (async) scheduleUpdate @ currentweather.js:498 start @ currentweather.js:112 startModules @ loader.js:55 (anonymous) @ loader.js:40 stylesheet.onload @ loader.js:203 currentweather.js:330 currentweather: Could not load weather. weatherRequest.onreadystatechange @ currentweather.js:330 XMLHttpRequest.send (async) updateWeather @ currentweather.js:338 (anonymous) @ currentweather.js:499 setTimeout (async) scheduleUpdate @ currentweather.js:498 start @ currentweather.js:112 startModules @ loader.js:55 (anonymous) @ loader.js:40 stylesheet.onload @ loader.js:203 MMM-Podcast-xml2json.js:65 Uncaught TypeError: xmlStr.replace is not a function at cleanXML (MMM-Podcast-xml2json.js:65) at xml2json (MMM-Podcast-xml2json.js:11) at Class.socketNotificationReceived (MMM-Podcast2.js:88) at module.js:246 at r. (socketclient.js:25) at r.emit (index.js:83) at r.onevent (index.js:83) at r.MMSocket.self.socket.onevent (socketclient.js:19) at r.onpacket (index.js:83) at r. (index.js:83) cleanXML @ MMM-Podcast-xml2json.js:65 xml2json @ MMM-Podcast-xml2json.js:11 socketNotificationReceived @ MMM-Podcast2.js:88
AxLED
Hallo und Danke für die Info, An der Internetverbindung liegt es definitiv nicht! Habe verschiedene raspis mit verschiedenen Installationen probiert. Überall dasselbe. Die ganzen Daten wie zb. Wetter, Zugverbindungen, DWD usw. werden auch gleich geladen. Internet ist gleich da, da es auch per Lan angeschloßen ist ohne Wlan.
Habe rausbekommen das wenn ich in der MMM-Podcast-xml2json.js unter Zeile 12 ein var streamurl = ''; dranhänge es zwar ohne Fehler funktioniert jedoch immer erst wen man 3x den button drückt.
I experimented a lot and read a lot. This “streamurl is not defined” has made me curious. So i put a new entry in the MMM podcast2.js under line 12 with:
var streamurl = '';
then it will work after a reboot, but not right after the first press. You have to press again and next time it will come. So page is set up, then Press Button for Play, Press Button for Stop, Press Button for Play and then comes the video. Very Strange.
Server started ...
Connecting socket for: MMM-Remote-Control
Starting node helper for: MMM-Remote-Control
Connecting socket for: MMM-Buttons
Starting node helper for: MMM-Buttons
Connecting socket for: MMM-Page-Selector
Connecting socket for: updatenotification
Connecting socket for: MMM-Podcast2
Connecting socket for: newsfeed
Starting module: newsfeed
Sockets connected & modules started ...
Launching application.
Initialize button Hauptseite on PIN 17
Initialize button Podcast on PIN 24
Starting node helper for: MMM-Podcast2
Create new news fetcher for url: http://www.stuttgarter-nachrichten.de/stuttgart.rss.feed - Interval: 300000
Use existing news fetcher for url: http://www.stuttgarter-nachrichten.de/stuttgart.rss.feed
The site has now fully built up. Now i press the button:
MMM-Podcast2 PLAY: < -- Nothing! Also do not wait for a longer time
MMM-Podcast2 STOP:
MMM-Podcast2 PLAY: < -- now comes the Video
MMM-Podcast2 STOP:
@Robiv8 see english version below Ich habe mal nachgeforscht, es scheint an dem von dir verwendetet MMM-Page-Selector zu liegen. Ändere bitte mal deine config.js wie folgt
haupt: {
"clock": "top_left",
"currentweather": "top_right",
"newsfeed": "bottom_bar"
}
},
exclusions: [
"notification",
"podcast2",
"alert"
]
Hintergrund: MMM-Page-selector
braucht für die Modulanzeige unter "haupt" wohl eine Position um korrekt zu funktionieren. Da MMM-Podcast2
aber keine Position hat (und braucht) klappt es nicht. Wenn du MMM-Podcast2
in die exclusions
packst, wird das Modul mit dem Start von MM geladen, somit auch der zugehörige node_helper
, der die URL des .mp4 streams aus der rss Seite extrahiert. Daher war deine Fehlermeldung auch streamurl = undefined
, da der node_helper
nie geladen wurde und somit auch keine streamurl ausgelesen werden konnte.
Freue mich auf deine Rückmeldung
AxLED
english: I investigated your error, it seems to be the MMM-Page-Selector module you use. Please change your config.js as follows
haupt: {
"clock": "top_left",
"currentweather": "top_right",
"newsfeed": "bottom_bar"
}
},
exclusions: [
"notification",
"podcast2",
"alert"
]```
** Explanation: ** `MMM-Page-selector` probably needs a position for the modules listet under "haupt" to work correctly. But `MMM-Podcast2` has no position (and does not need it) and does not work. If you put `MMM-Podcast2` in the `exclusions`, the module is loaded with the start of MM, and so the corresponding `node_helper` is loaded, which extracts the URL of the .mp4 stream from the rss page. This was the reason your error message was `streamurl = undefined`, since the `node_helper` was never loaded and thus no streamurl could be read.
I'm looking forward to your feedback
axled
Werde ich gleich morgen Nachmittag testen, das wäre ja der große Knaller. Danke fürs recherchieren. Ich werde auf jedenfall Rückmelden.
Will I test the same tomorrow afternoon, that would be the big bang. Thanks for researching. I will definitely confirm.
OK That work! i will Test it more tonight but the first test was positiv Yeah Trank you very much
As i didnt hear something i guess it works on your mirror also. Issue closed AxLED
Only for Info! So I have this Issues submit to the Github Page-Selector Issues.
After numerous tests, I found that the command BUTTON_PRESS does not work when Page-Select is installed.
Here are my config.js `
`
And with this test config it works! `
`