Coder Social home page Coder Social logo

tom-hirschberger / mmm-embedurl Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 1.0 2.05 MB

A MagicMirror² module which embeds multiple other websites with iframe or webview

License: MIT License

JavaScript 93.82% CSS 6.18%
embed-content iframe magicmirror-module magicmirror2 webview

mmm-embedurl's People

Contributors

kristjanesperanto avatar tom-hirschberger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mmm-embedurl's Issues

Unable to display website:

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
Screenshot 2022-11-16 at 16 16 06
<img width="365" alt="Screenshot 2022-11-16 at 16 15 43" src="https://use
Screenshot 2022-11-16 at 16 15 13
r-images.githubusercontent.com/1330110/202235991-76104a9a-7bd4-4534-8d6b-e330bb8e2dc7.png">

Can you help resolve?

Thank you & Best wishes.

Override CSS of embedded page?

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!

Module add HTML document structure and not formatting embedded HTML properly

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:
image

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

Scrollbars displayed on boot

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.

Screenshot 2024-02-11 at 12 56 49

{ 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' ] }, },

updateInterval only working for first embedded element on page

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.