@sdetweil right, feeling pretty stupid at the moment. I’ve added the code with global setting but it doesn’t appear to have changed anything. No errors are coming up. Do I need to add or change any code of the existing modules in my config? I was a bit confused as most modules need an npm install but this one doesn’t appear to need that according to the readme. Sorry to be a continuous pain. Your help is greatly appreciated.
Read the statement by Michael Teeuw here.
Posts
-
RE: MMM-Carousel config.js Help Please
-
RE: MMM-Carousel config.js Help Please
@sdetweil right you are!! “Your configuration file doesn’t contain syntax errors :)” is now what I’m seeing. Thank you for all your help.
-
RE: MMM-Carousel config.js Help Please
@sdetweil Thanks for the
npm run config:checkThat has helped me to clean up myconfig.jsto not have any errors. After fixing all the issues (mainly with the use of ( ’ ) as opposed to ( " ), which is confusing when most of the code already written uses the single quote instead of the double?) I then went to add the Carousel to the top of my code as below:/* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. * * For more information how you can configurate this file * See https://github.com/MichMich/MagicMirror#configuration * */ var 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, is "localhost" port: 8080, ipWhitelist: ["::fff:0.0.0.0/1", "::fff:128.0.0.0/2", "::fff:192.0.0.0/3", "::fff:224.0.0.0/4", "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"], language: "en", timeFormat: 24, units: "imperial", modules: [ { module: "MMM-Carousel", config: { transitionInterval: 10000, mode: "global" } } { module: "alert", }, { module: "clock", position: "top_left" }, { module: "calendar", header: "What are we doing?", position: "top_left", config: { calendars: [ { symbol: "calendar-check-o ", url: "webcal://it's-still-my-secret.ical" } ] } }, { module: "MMM-TFL", position: "bottom_right", // This can be any of the regions but works best on either side of the display config: { updateTime: 600000, modes: ["tube", "overground", "national-rail"], lines: ["c2c", "bakerloo", "central", "district", "hammersmith-city", "jubilee", "metropolitan", "northern", "piccadilly", "victoria", "waterloo-city"], } }, { units: "imperial", module: "currentweather", position: "top_right", config: { location: "*****", locationID: "********", //ID from http://www.openweathermap.org/help/city_list.txt appid: "********************************", roundTemp: "true", degreeLabel: "true", showPeriod: "fasle", onlyTemp: false, iconTable: { "01d": "wi-day-sunny", "02d": "wi-day-cloudy", "03d": "wi-cloudy", "04d": "wi-cloudy-windy", "09d": "wi-showers", "10d": "wi-rain", "11d": "wi-thunderstorm", "13d": "wi-snow", "50d": "wi-fog", "01n": "wi-night", "02n": "wi-night-cloudy", "03n": "wi-night-cloudy", "04n": "wi-night-cloudy", "09n": "wi-night-showers", "10n": "wi-night-rain", "11n": "wi-night-thunderstorm", "13n": "wi-night-snow", "50n": "wi-night-alt-cloudy-windy" } } }, { units: "imperial", module: "weatherforecast", position: "top_right", header: "Weather Forecast", config: { location: "London", locationID: "*******", //ID from http://www.openweathermap.org/help/city_list.txt appid: "********************************" } }, { module: "MMM-UKNationalRail", position: "bottom_left", header: "Departures", //Optional - delete this line to turn OFF the header completely config: { stationCode: "***", // CRS code for station app_id: "********", // TransportAPI App ID app_key: "*********************************", // TransportAPI App Key maxResults: 5, //Optional - Maximum results to display. showOrigin: false //Optional - Show the origin of the train in the table } }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;}With the code implemented at the top, I ran
npm run config:checkand it now comes back that it doesn’t like the{before "module: "alert", referring to it as an Unexpected token. When I’ve taken that out, it says the Unexpected token is nowmodule. I’m thinking I’m missing something that should be there as opposed to something that shouldn’t but I’m not sure what the token it’s expecting is? -
RE: MMM-Carousel config.js Help Please
@sdetweil thanks, that worked. Looks like I’ve got some clean up to do in my initial code before moving on. I’ll clean this up tonight and implement the new module tomorrow. Thanks again for your help.
-
RE: MMM-Carousel config.js Help Please
@sdetweil Thanks for your help. Unfortunately that doesn’t seem to be working for me. I can’t post what it’s telling me as the reply keeps getting flagged for spam? Essentially it’s telling me the proper usage of npm and asking if I meant
npm config. Maybe I’m doing something wrong? I’m doingcd MagicMirrorthennpm config:check. Sorry, it would be much easier if I could copy / paste but for whatever reason, it won’t let me. -
MMM-Carousel config.js Help Please
Hello. I’ve been trying to program one of my MM projects with a small screen. After a long process, and lots of help on this forum, I’ve finally got my project working with the LCD I’m using. I’ve been researching about the MMM-Carousel module and I am a bit confused with the configuration. I’ve had a look around and don’t seem to have an answer for my question. I apologise in advance if I’m being really thick or missed the answer.
Having a look at the config for the Global setting, it’s my understanding that my
config.jsfile should look something like this:var config = { modules: [ { module: 'MMM-Carousel', config: { transitionInterval: 10000, ignoreModules: ['clock'], mode: 'global' } } ] }I guess I’m having trouble getting the code to work with the configuration of the other modules I’m using, still being in my
config.js. When I try to add the above to my existingconfig.jsI get an error and it tells my my config is wrong. I have tried adding just this to my config just undervar config = {and still got an error:{ module: 'MMM-Carousel', config: { transitionInterval: 10000, ignoreModules: ['clock'], mode: 'global' } }Can someone please help me with this? Below is my working
config.jswith the API Keys redacted. How do I integrate these with the MMM-Carousel config? I essentially want each module to show full screen for a certain duration before flipping to the next, making them much more readable on my 4 inch display. Any help is greatly appreciated./* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. * * For more information how you can configurate this file * See https://github.com/MichMich/MagicMirror#configuration * */ var 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, is "localhost" port: 8080, ipWhitelist: ["::fff:0.0.0.0/1", "::fff:128.0.0.0/2", "::fff:192.0.0.0/3", "::fff:224.0.0.0/4", "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"], language: "en", timeFormat: 24, units: "imperial", modules: [ { module: "alert", }, { module: "clock", position: "top_left" }, { module: "calendar", header: "What are we doing?", position: "top_left", config: { calendars: [ { symbol: "calendar-check-o ", url: "webcal://my.secret.link.to.shared.calendar" } ] } }, { module: 'MMM-TFL', position: 'bottom_right', // This can be any of the regions but works best on either side of the display config: { updateTime: 600000, modes: ['tube', 'overground', 'national-rail'], lines: ['c2c', 'bakerloo', 'central', 'district', 'hammersmith-city', 'jubilee', 'metropolitan', 'northern', 'piccadilly', 'victoria', 'waterloo-city'], } }, { units: "imperial", module: "currentweather", position: "top_right", config: { location: "*****", locationID: "*******", //ID from http://www.openweathermap.org/help/city_list.txt appid: "********************************", roundTemp: 'true', degreeLabel: 'true', showPeriod: 'fasle', onlyTemp: false, iconTable: { '01d': 'wi-day-sunny', '02d': 'wi-day-cloudy', '03d': 'wi-cloudy', '04d': 'wi-cloudy-windy', '09d': 'wi-showers', '10d': 'wi-rain', '11d': 'wi-thunderstorm', '13d': 'wi-snow', '50d': 'wi-fog', '01n': 'wi-night', '02n': 'wi-night-cloudy', '03n': 'wi-night-cloudy', '04n': 'wi-night-cloudy', '09n': 'wi-night-showers', '10n': 'wi-night-rain', '11n': 'wi-night-thunderstorm', '13n': 'wi-night-snow', '50n': 'wi-night-alt-cloudy-windy' } } }, { units: "imperial", module: "weatherforecast", position: "top_right", header: "Weather Forecast", config: { location: "******", locationID: "*******", //ID from http://www.openweathermap.org/help/city_list.txt appid: "********************************" } }, { module: 'MMM-UKNationalRail', position: 'bottom_left', header: 'Departures', //Optional - delete this line to turn OFF the header completely config: { stationCode: '***', // CRS code for station app_id: '*********', // TransportAPI App ID app_key: '********************', // TransportAPI App Key maxResults: 5, //Optional - Maximum results to display. showOrigin: false //Optional - Show the origin of the train in the table } }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;} -
RE: 4 inch RPi LCD displaying MM not working
@sdetweil I did as you suggested and installed the waveshare drivers after loading the desktop the first time, plus a little raspi-config action.
Thanks again for your help, much appreciated.
-
RE: 4 inch RPi LCD displaying MM not working
@sdetweil SOLVED!!!
Thank you everyone for your support. It seems that in the end, it was down to using Raspbian Lite. After downloading the full build and following the instructions on your github, were all sorted. Well… almost, I’ve got some sizing to play around with and still need to load my custom .css and .js but that shouldn’t be an issue at all. Thanks again for all your help, especially @sdetweil
-
RE: 4 inch RPi LCD displaying MM not working
@sdetweil Right, so before I get ahead of myself and balls it up again. I have just installed Raspbian Buster Full 2020-02-13 image and going through the initial setup on my Pi Zero W. Should I do the Waveshare drivers for the 4 inch LCD first and then do the MM scripts on your github? Or should I run your scripts first, configure my MM, then do the Waveshare driver?
-
RE: 4 inch RPi LCD displaying MM not working
@sdetweil in the immortal words of Homer J. Simpson - Doh! I’ll have to give this a try later this evening. Is there any reason the GUI version will work and the lite won’t with the small LCD?
-
RE: 4 inch RPi LCD displaying MM not working
@sdetweil Thanks for the help. I tried to start over from fresh. I’ve installed buster lite and completed a fresh install of MM and followed the
bash -c "$(curl -sL… commands listed. I still am not having any luck getting MagicMirror working on the 4 inch display. Everything is fine right up until I do the Waveshare driver install and then do./LCD4-show. Once I do that, I can see the device reboot, the HDMI no longer works and on the small LCD, I see the command prompt boot topi@raspberrypi:~ $. From this point, I can no longer get MagicMirror to run, even if I try to run./LCD-hdmi, MM does not start working again with HDMI. Something with the install of the Waveshare drivers is killing MM. I am genuinely at a loss. -
RE: 4 inch RPi LCD displaying MM not working
@sdetweil I did, sorry, should’ve mentioned.
This is the code:
/bin/sh unclutter & xset -dpms # disable DPMS (Energy Star) features. xset s off # disable screen saver xset s noblank # don’t blank the video device matchbox-window-manager & #midori -e Fullscreen -a http://localhost:8080 chromium-browser --incognito --kiosk http://localhost:8080/ -
RE: 4 inch RPi LCD displaying MM not working
-
RE: 4 inch RPi LCD displaying MM not working
-
RE: 4 inch RPi LCD displaying MM not working
Having been in quarantine, I’ve had a chance to sit down and try to sus out the issue. Everything seems to work 100% fine right up until I install
LCD-show. After installingLCD-showand doing a reboot, MM never auto starts. I tried to run./mmstart.shand the results are below.Linux raspberrypi 4.19.58+ #1245 Fri Jul 12 17:20:08 BST 2019 armv6l The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sat Apr 11 19:25:01 2020 SSH is enabled and the default password for the 'pi' user has not been changed. This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password. pi@raspberrypi:~ $ ls chromium_start.sh mmstart.sh package-lock.json LCD-show node-v10.16.0-linux-armv6l MagicMirror node-v10.16.0-linux-armv6l.tar.xz pi@raspberrypi:~ $ ./mmstart.sh Starting MagicMirror: v2.8.0 Loading config ... Loading module helpers ... No helper found for module: alert. No helper found for module: clock. Initializing new module helper ... Module helper loaded: calendar No helper found for module: MMM-TFL. No helper found for module: currentweather. No helper found for module: weatherforecast. Initializing new module helper ... Module helper loaded: MMM-UKNationalRail All module helpers loaded. Starting server on port 8080 ... Server started ... Connecting socket for: calendar Starting node helper for: calendar Connecting socket for: MMM-UKNationalRail MMM-UKNationalRail helper started ... Sockets connected & modules started ... Ready to go! Please point your browser to: http://localhost:8080 Whoops! There was an uncaught exception... { Error: listen EADDRINUSE: address already in use 127.0.0.1:8080 at Server.setupListenHandle [as _listen2] (net.js:1279:14) at listenInCluster (net.js:1327:12) at GetAddrInfoReqWrap.doListen [as callback] (net.js:1460:7) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:61:10) code: 'EADDRINUSE', errno: 'EADDRINUSE', syscall: 'listen', address: '127.0.0.1', port: 8080 } MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues X.Org X Server 1.20.4 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.15.0-48-generic armv8l Raspbian Current Operating System: Linux raspberrypi 4.19.58+ #1245 Fri Jul 12 17:20:08 BST 2019 armv6l Kernel command line: coherent_pool=1M 8250.nr_uarts=1 bcm2708_fb.fbwidth=480 bcm2708_fb.fbheight=320 bcm2708_fb.fbswap=1 smsc95xx.macaddr=B8:27:EB:B2:0B:D5 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo Build Date: 05 June 2019 12:49:54PM xorg-server 2:1.20.4-1+rpt1 (https://www.debian.org/support) Current version of pixman: 0.36.0 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.0.log", Time: Sat Apr 11 19:27:57 2020 (==) Using system config directory "/usr/share/X11/xorg.conf.d" (EE) Fatal server error: (EE) no screens found(EE) (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. (EE) (EE) Server terminated with error (1). Closing log file. xinit: giving up xinit: unable to connect to X server: Connection refused xinit: server error pi@raspberrypi:~ $I’ve attached copy of the
Xorg.0.log. It appears the main issue is there is no screen selection or default monitor. Any help is greatly appreciated.GNU nano 3.2 Xorg.0.log [ 1272.263] X.Org X Server 1.20.4 X Protocol Version 11, Revision 0 [ 1272.264] Build Operating System: Linux 4.15.0-48-generic armv8l Raspbian [ 1272.264] Current Operating System: Linux raspberrypi 4.19.58+ #1245 Fri $[ 1272.264] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 bcm2708_f$[ 1272.265] Build Date: 05 June 2019 12:49:54PM [ 1272.265] xorg-server 2:1.20.4-1+rpt1 (https://www.debian.org/support) [ 1272.265] Current version of pixman: 0.36.0 [ 1272.265] Before reporting problems, check http://wiki.x.org ��������to make sure that you have the latest version. [ 1272.265] Markers: (--) probed, (**) from config file, (==) default setti$��������(++) from command line, (!!) notice, (II) informational, ��������(WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 1272.267] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Apr 11 19:45:42$[ 1272.269] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [ 1272.279] (==) No Layout section. Using the first Screen section. [ 1272.283] (==) No screen section available. Using defaults. [ 1272.284] (**) |-->Screen "Default Screen Section" (0) [ 1272.284] (**) | |-->Monitor "<default monitor>" [ 1272.288] (==) No device specified for screen "Default Screen Section". ��������Using the first device section listed. [ 1272.288] (**) | |-->Device "Allwinner A10/A13 FBDEV" [ 1272.288] (==) No monitor specified for screen "Default Screen Section". ��������Using a default monitor configuration. [ 1272.289] (==) Automatically adding devices [ 1272.289] (==) Automatically enabling devices [ 1272.289] (==) Automatically adding GPU devices [ 1272.289] (==) Max clients allowed: 256, resource mask: 0x1fffff [ 1272.290] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exi$[ 1272.290] Entry deleted from font path. [ 1272.290] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exis$[ 1272.290] Entry deleted from font path. [ 1272.290] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.[ 1272.291] Entry deleted from font path. [ 1272.291] (WW) The directory "/usr/share/fonts/X11/Type1" does not exist. ������������������������������[ Read 76 lines ] ^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^X Exit��������^R Read File ^\ Replace ^U Uncut Text ^T To Spell -
RE: 4 inch RPi LCD displaying MM not working
@aecandroid @lavolp3 So Just as an update, I tried to run
./LCD-hdmiand thensudo reboot. Plugged into the HDMI, the Pi reboots, LCD in the GPIO goes white, Pi boots topi@raspberry:and does not start MM. The only change is the install of LCD-show; change driver to LCD4-show; back to LCD-hdmi; and MagicMirror no longer works? I even tried doingnpm startin/MagicMirrorand got nothing. I also triedsh mm.shand got nothing. I don’t get what happens in the LCD-show install but it kills MagicMirror. I have a backup image of when its working on HDMI, so that’s my reset point at the moment. Not sure what to do, may just need to go for an HDMI display in the end. Anyway, thanks again for your help and suggestions. -
RE: 4 inch RPi LCD displaying MM not working
@lavolp3 Below is my /boot/config.txt I used the drivers for LCD-show from the waveshare link above.I’ve done a fresh install on a new SD got everything up an running on Magic Mirror using HDMI as normal on the Raspberry PI Zero W. Then I do the LCD-show install and ./LCD4-show command. The device reboots and the LCD goes from white backlight to showing the boot cmd line. From there, it almost appears to get stuck. instead of seeing the pi@raspberry: the last line displayed is [ ok ] Started OpenBSD Secure Shell Server.
Thanks again for your help. Let me know if you need to see any other code.
# For more options and information see # http://www.raspberrypi.org/documentation/configuration/config-txt.md # Some settings may impact device functionality. See link above for details # uncomment if you get no picture on HDMI for a default "safe" mode #hdmi_safe=1 # uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan #disable_overscan=1 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 # uncomment to force a console size. By default it will be display's size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) #hdmi_group=1 #hdmi_mode=1 # uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes #hdmi_drive=2 # uncomment to increase signal to HDMI, if you have interference, blanking, or # no display #config_hdmi_boost=4 # uncomment for composite PAL #sdtv_mode=2 #uncomment to overclock the arm. 700 MHz is the default. #arm_freq=800 # Uncomment some or all of these to enable the optional hardware interfaces dtparam=i2c_arm=on #dtparam=i2s=on dtparam=spi=on enable_uart=1 # Uncomment this to enable the lirc-rpi module #dtoverlay=lirc-rpi # Additional overlays and parameters are documented /boot/overlays/README # Enable audio (loads snd_bcm2835) dtparam=audio=on dtoverlay=waveshare35a #dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=0,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900 hdmi_force_hotplug=1 #max_usb_current=1 hdmi_group=2 hdmi_mode=1 hdmi_mode=87 hdmi_cvt 480 320 60 6 0 0 0 hdmi_drive=2 display_rotate=0 -
RE: 4 inch RPi LCD displaying MM not working
@lavolp3 thanks for taking the time to reply. Unfortunately, this site hasn’t helped much. When I plug in via HDMI to my tele, everything works perfectly. However the small LCD screen does not use HDMI. Instead, it plugs into the GPIO. As for the resolution, this is what’s printed on the back of the screen so, all I can go by. I think I’m missing something in the /boot/config.txt that changes the video display from HDMI. Still no luck just yet.
-
4 inch RPi LCD displaying MM not working
I’ve looked everywhere I can and I am stuck. I have a Raspberry Pi Zero W that I’m using for Magic Mirror. Via HDMI, it works perfectly. All modules come up and it looks very clean. I was given a 4in LCD that plugs into the GPIO port. I thought, I could use that to build into a frame and have a small desktop MM. For the life of me, I can only get the cmd line to display on the LCD. Somewhere along the line, I did manage to get it to pull up the css page, but it was just black screen and it would flash every 20 seconds or so. The screen is a 4 inch RPi LCD (A) 320x480 XPT2046 Touch Controller
I have installed LCD-show and and installed LCD35-show. Any help anyone can lend would be greatly appreciated.
-
RE: Changing icons of the modules Current Weather and Weather Forecast
@yawns too right you are my friend!! The smallest oversight messes up the whole game. Thank you!!