Read the statement by Michael Teeuw here.
Create a clone of MMM-Webview
-
HI All
I find the MMM-Webview module quite useful to display my Pages from my Home Assistant
Can anyone please help me clone to modules so I can use it more than one
I tried but failed -
@Johanba I think there are too many changes to the module to make copies…
see this
https://github.com/Tom-Hirschberger/MMM-EmbedURL
enable webview in the MagicMirror config.js per the docthen you can use multiple instances
-
Thanks for the information, Looks like it might be possible
Looking at the code and not really making sense to me (I am not a developer)
Say I want to show 3 x dashboards from my Home Assistant
On Page 2 - >http://192.168.1.90:8123/new-solar-dashboard-combined/deye<
On Page 3 - >http://192.168.1.90:8123/testing-3/0<
On Page 4 - >http://192.168.1.90:8123/battery-insights-2/0<How would the config.js handle these on different pages
I am using MMM-pages to have different pages -
@Johanba i think you can do 3 instances of embedurl and use classes: for page2…etc
altho EmbedUrl can do multiple embeds w one instance, you need a different implementation to get to use pages.
so use multiple module instances just like you were trying with webview
like this
need these options before the modules:[ listignoreXOriginHeader: true, ignoreContentSecurityPolicy: true, electronOptions: { webPreferences: { webviewTag: true, } }, modules: [{ module: "MMM-EmbedURL", position: "top_center", header: "Embed-URL1", classes:"page2", config: { updateInterval: 120, embedElementType: "webview", attributes: [ "frameborder=0", ], embed: [ "https://magicmirror.builders/", ] }, }, { module: "MMM-EmbedURL", position: "bottom_center", header: "Embed-URL", classes:"page3", config: { updateInterval: 120, attributes: [ "frameborder=0", ], embedElementType: "webview", embed: [ "https://youtube.com", ] }, }, -
@Johanba make sure you use the MMM-pages classes/alternative approach to page definition, for example
{ module: "MMM-pages", disabled:false, config: { modules: [ ["page1"], ["page2"], ["page3"], ], fixed: [ "fixed" ], hiddenPages: { "page4": ["page4"], }, animationTime: 0, rotationTime: 10000, } },then you use the classes property at each module
module: "foo", classes:"page2", (or whatever)this way you can call the pages anything you want
mom, dad, taxes, solar, schedules, …and a module instance can live on multiple pages
classes: "mom dad schedules", -
@sdetweil
Thank a mil for the info
I am going to try and update my config as such, and see how to get this goingi might reach out again if I am struggling
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login