Read the statement by Michael Teeuw here.
Modules not showing up on KWEB or Midori
-
Hello,
i have a small problem with the modules. When i try to load MagicMirror² in a Browser on my Pi Zero from console, some modules won’t load. Instead of the module it shows a text like :“module_3_MMM-Fuel” or " module_4_MMM-soccer".
If i load it from desktop or another computer everything works fine.
this is the way i load the Browser (sudo xinit script.sh):
Midori:
#!/bin/sh xset -dpms # disable DPMS (Energy Star) features. xset s off # disable screen saver xset s noblank # don't blank the video device unclutter & matchbox-window-manager & midori -e Fullscreen -a http://localhost:8080
KWeb:
#!/bin/sh xset -dpms # disable DPMS (Energy Star) features. xset s off # disable screen saver xset s noblank # don't blank the video device unclutter & matchbox-window-manager & kweb -KJERLH http://localhost:8080
Can anybody help me please?
Thank you.
-
@nixidee both mentioned modules are created by me. A guess in the dark would be that the browsers probably don’t support the new ECMA SCRIPT 6 features that I’m using there, can you post a screenshot of the browser console?
-
Do you mean this?
That is this line:
setInterval(() => {
Or what did you need exactly?
What (Kiosk)Browser do you use?
-
@nixidee yes that’s what I was talking about.
The following lines should get you going, but the ecmascript is finalized and standard since june last year, you should probably think about switching the browser if their updates are that far behind
MMM-soccer
var self = this; setInterval(function(){ self.getData(); }, this.config.api_key ? 300000 : 1800000);
MMM-Fuel
var self = this; return setInterval(function(){ self.sortByPrice = !self.sortByPrice; self.updateDom(300); }, this.config.rotateInterval);
-
Thanks for your work. Which Browser do you recomment? Both are lightweight kiosk Browsers and the pi zero needs a lightweight browser as far as I know.
I gues, I have to clone it again and npm install it again?
-
@nixidee you can either do some research yourself which pi Zero browser can handle es6/ecmascript2015 features, I’m using the Same browser electron is based on (chromium) or you have to do the changes manually
-
@strawberry-3.141
Well i tried Chromium but i didn’t get it to work on the Pi Zero. With the code you provided it works well. Thank you for your time.