tom-hirschberger / mmm-embedurl Goto Github PK
View Code? Open in Web Editor NEWA MagicMirror² module which embeds multiple other websites with iframe or webview
License: MIT License
A MagicMirror² module which embeds multiple other websites with iframe or webview
License: MIT License
I am trying to display the following website. [](https://consultas.avanzagrupo.com/qr/malaga-13801
Here isart of my MM config: ipWhitelist shows the IP of my PI running MM 192.168.2.105
`let config = {
address: "localhost", // Address to listen on, can be:
// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
// - another specific IPv4/6 to listen on a specific interface
// - "0.0.0.0", "::" to listen on any interface
// Default, when address config is left out or empty, is "localhost"
port: 8080,
basePath: "/", // The URL path where MagicMirror² is hosted. If you are using a Reverse proxy
// you must set the sub path here. basePath must end with a /
ipWhitelist: ["192.168.2.105","127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
// or add a specific IPv4 of 192.168.1.5 :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
useHttps: false, // Support HTTPS or not, default "false" will use HTTP
httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true
httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true
language: "en",
locale: "en-US",
logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
timeFormat: 24,
units: "metric",
zoom: 1.0,
// serverOnly: true/false/"local" ,
// local for armv6l processors, default
// starts serveronly and then starts chrome browser
// false, default for all NON-armv6l devices
// true, force serveronly mode, because you want to.. no UI on this device
ignoreXOriginHeader: true,
ignoreContentSecurityPolicy: true,
electronOptions: {
webPreferences: {
webviewTag: true,
}
},
modules: [
{
module: "MMM-EmbedURL",
position: "top_center",
header: "Embed-URL",
config: {
updateInterval: 120,
attributes: [
"frameborder=0",
],
embed: [
"https://consultas.avanzagrupo.com/qr/malaga-13801",
"https://magicmirror.builders/",
//~ "https://www.youtube.com/embed/dIHr96KqfDI"
]
},
},
No errors when running -> npm run config:check in MM folder
I do get the following errors
<img width="365" alt="Screenshot 2022-11-16 at 16 15 43" src="https://use
r-images.githubusercontent.com/1330110/202235991-76104a9a-7bd4-4534-8d6b-e330bb8e2dc7.png">
Can you help resolve?
Thank you & Best wishes.
I'd like to override CSS of an embedded page locally, much like here
Basically, I'm using your module to display the "embedded" web view of my weatherstation. Loads correctly, but due to size and distance issues, I'm wanting to change their CSS to show things bigger. At the current time, I'm looking over at the display, and can only see the temp.
If you'd like to take a look, the embedded website is here
Thanks!
I am calling a URL that outputs the following HTML:
Outside: 16.6<br>Downstairs: 21.0<br>
Yes, that's all it outputs - super simple, no <html>
, <body>
, etc
However, the module seems to be adding an <html>
, <body>
, etc, as shown in this screenshot:
Possibly related is the problem that I am trying to fix - the final display on the MagicMirror is not formatted according the specified classes (medium, bright, etc)
My config is:
{
module: "MMM-EmbedURL",
position: "top_right",
classes: 'always',
header: "Live Temp",
config: {
updateInterval: 5,
classes: "medium bright temperature",
attributes: [
"frameborder=0",
],
embed: [
"http://192.168.2.7/cgi-bin/hvac.cgi?func=getliveavgtemp&location=outside,downstairs",
]
},
},
So
Sizing attributes for different classes in config.js not taking effect.
Is there a way to remove the scrollbar?
Hi
I have a problem with scrollbars present on boot, the only way of removing them is to hover mouse over the bar.
I used to use iframe, but in a recent Home Assistant update I'm unable to use iframe and have to use webview.
If you can give me some pointers I would really appreciate it.
As you can see in pic I live in a country with daily power outages.
{ module: 'MMM-EmbedURL', position: 'top_right',//'fullscreen_above', header: '', config: { embedElementType: 'webview', //iframe,webview,img updateInterval: '0', positions: 'tie', attributes: [ 'frameborder=0', 'allowfullscreen', 'scrollbar=no', ], embed: [ 'http://192.168.1.45:8123/dashboard-123/0' ] }, },
I'm using the embed-url plugin multiple times in my magic mirror config which works like a charm. Thanks for providing this plugin.
The only thing that is not working for me are the "refreshes of the plugins"
I recognized that only the first occurrence of the embed-url plugin is refreshed with "updateInterval" setting. All the other embeds are not updated at all.
E.g.:
{ module: "MMM-EmbedURL", position: "bottom_left", header: "test1", config: { updateInterval: 120, attributes: [ "frameborder=0", "allowfullscreen" ], classes: "test", embed: [ "https://myUrl.com", ] } }, { module: "MMM-EmbedURL", position: "bottom_left", header: "test2", config: { updateInterval: 120, attributes: [ "frameborder=0", "allowfullscreen" ], classes: "test", embed: [ "https://myUrl2.com", ] } },
In this sample only the first "iframe" (https://myUrl.com) is refreshed after 120 seconds. The second iframe https://myUrl2.com is never refreshed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.