Read the statement by Michael Teeuw here.
Cannot get MMM-EmbedURL to show any sites
-
Rapsberry Pi 4, MagicMirror v2.29.0
I have a week-old install working for all modules except MMM-EmbedURL. I am trying to get two, local ip cams to display a feed over http. These feeds work fine in the Chromium desktop browser. Here’s an example of a URL:
http://10.0.0.51:50081/ui3.htm?t=live&cam=Doorbell&maximize=1
I have tried other URLs, including the examples, but nothing shows up, not even an error. This is the last module to load for me, and no errors are present for any module. There are not any other broadcasts or messages related to this module afterwards. The header used does appear, confirming the module is loaded.
[LOG] Connecting socket for: MMM-EmbedURL Sockets connected & modules started ...
In case there are any known issues with other modules, here’s a list of what’s installed and working, across 4 different pages with MMM-pages:
WallberryTheme WB-clock WB-weather MMM-CalendarExt3Journal alert updatenotification clock MMM-homeassistant-sensors MMM-CalDAV Pinfo calendar MMM-Pir MMM-MoonPhase MMM-NHL MMM-MyStandings MMM-EasyPix. MMM-BGSS_1 (copy/tweak of MMM-BackgroundSlideshow) MMM-GroveGestures MMM-NotificationTrigger MMM-EmbedURL
Here’s the top of my config.js, as well as the relevant module configuration:
let config = { electronOptions: { webPreferences: { webSecurity: false, webviewTag: true, }, fullscreen: true, alwaysOnTop: true, },
and
{ module: "MMM-EmbedURL", position: "upper_third", header: "Embed-URL", config: { updateInterval: 120, embedElementType: "webview", attributes: [ "frameborder=0", ], embed: [ "http://10.0.0.51:50081/ui3.htm?t=live&cam=Doorbell&maximize=1", "https://www.youtube.com/embed/dIHr96KqfDI", ] }, },
I’d appreciate any help on this, and let me know if there’s something else I can add or provide to resolve.
-
@unaccomplished can you look at the messages where you start MagicMirror
if you are using pm2, then
pm2 logs --lines=50may show them
typically I recommend NOT using pm2 when adding and changing modules as it makes access to the logs harder…
I see
[2024-12-03 16:48:09.041] [ERROR] (node:2137989) electron: Failed to load URL: https://www.cnn.com/?timestamp=1733266088 with error: ERR_BLOCKED_BY_RESPONSE (Use `electron --trace-warnings ...` to show where the warning was created) [2024-12-03 16:48:09.482] [ERROR] (node:2137989) electron: Failed to load URL: https://magicmirror.builders/?timestamp=1733266088 with error: ERR_BLOCKED_BY_RESPONSE
-
I put one of my MM web pages in the embed list and it also doesn’t show… altho the embed content is in the MM elements page view
and the page works correctly when viewed in a browser (the page is hosted by MM)never tried the module before
-
@unaccomplished
Hi,just tried your config in my setup and everything worked as expected.
The question is…where are the differences in your and mine setup.
As a first try you can replace
embedElementType: "webview,"
withembedElementType: "iframe,"
.If the embeded pages does not block embedding
iframe
should work and you do not weaken any security settings of the electron browser.Additionally you can replace
"frameborder=0",
with"frameborder=1",
. You should see two boxes at least then. Even if the sites could not be embedded.@sdetweil Are you sure you set the security settings of electron? Without them electron will not support
webview
and will not display anything. -
@wishmaster270 said in Cannot get MMM-EmbedURL to show any sites:
Are you sure you set the security settings of electron?
no… I viewed that as optional if doing webview…(electron javascript content) but I am viewing an html page. (altho hosted by MM)
If do use the build in electron browser to view the mirror you can use Webview instead
my config
{ module: "MMM-EmbedURL", position: "top_left", header: "Embed-URL", config: { updateInterval: 120, attributes: [ "frameborder=0", ], embed: [ "http://localhost:8090/modules/MMM-Config/review/", "https://cnn.com" ] }, },