MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. Serge
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    Offline
    • Profile
    • Following 1
    • Followers 1
    • Topics 10
    • Posts 64
    • Groups 0

    Posts

    Recent Best Controversial
    • config.js in JSON format

      Is it possible to change config.js file into JSON format for easy and smooth interchange between apps (for reading values from it and writing values to it)?.

      posted in Feature Requests
      SergeS
      Serge
    • Add standard module

      Hello everyone!
      I need to integrate few 3rd party modules to the MM core to appear them like a default modules.
      I want to add the following:

      • email-mirror https://github.com/ronny3050/email-mirror
      • MMM-PIR-Sensor https://github.com/paviro/MMM-PIR-Sensor
      • MMM-Remote-Control https://github.com/Jopyth/MMM-Remote-Control

      to the MM installer as a default modules.

      I see, that

      • dependencies for default modules are stored within MagicMirror/node_modules while dependencies for 3rd party modules are stored within folder of each such module.
      • default modules are stored in MagicMirror/Modules/default while 3rd party modules are stored within Modules/[Module_name].

      I have forked the MM git, but can’t understand what to do next to make these 3 modules default for installation (I do not need to use installers/postinstall/postinstall.sh for this purposes as i need to appear these 3 modules as a default ones).

      Is it easy to complete this task? I would be thankful for any ideas and thought.

      posted in Troubleshooting
      SergeS
      Serge
    • MM ClientOnly + Docker as a server on the same machine

      Hallo,
      I need to run MagicMirror as a server and client at the same raspberry.
      For this purposes I have:

      1. installed MM server docker container (as per https://github.com/bastilimbach/docker-MagicMirror) . It works fine and accessible through browser at 172.17.0.1 and at localhost.
      2. installed MM and through automatic installation
      bash -c "$(curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)"
      
      1. run MM client according to the manual:
      npm start && node clientonly --address 172.17.0.1 --port 8080
      

      Here is the log

      pi@raspberrypi:~/MagicMirror $ npm start && node clientonly --address 172.17.0.1 --port 8080
      
      > magicmirror@2.7.1 start /home/pi/MagicMirror
      > sh run-start.sh
      
      Starting MagicMirror: v2.7.1
      Loading config ...
      Loading module helpers ...
      No helper found for module: alert.
      Initializing new module helper ...
      Module helper loaded: updatenotification
      No helper found for module: clock.
      Initializing new module helper ...
      Module helper loaded: calendar
      No helper found for module: compliments.
      No helper found for module: currentweather.
      No helper found for module: weatherforecast.
      Initializing new module helper ...
      Module helper loaded: newsfeed
      All module helpers loaded.
      Starting server on port 8080 ... 
      You're using a full whitelist configuration to allow for all IPs
      Server started ...
      Connecting socket for: updatenotification
      Connecting socket for: calendar
      Starting node helper for: calendar
      Connecting socket for: newsfeed
      Starting module: newsfeed
      Sockets connected & modules started ...
      Whoops! There was an uncaught exception...
      { Error: listen EADDRINUSE 0.0.0.0:8080
          at Server.setupListenHandle [as _listen2] (net.js:1330:14)
          at listenInCluster (net.js:1378:12)
          at doListen (net.js:1492:7)
          at process._tickCallback (internal/process/next_tick.js:63:19)
          at Function.Module.runMain (internal/modules/cjs/loader.js:755:11)
          at startup (internal/bootstrap/node.js:241:19)
          at bootstrapNodeJSCore (internal/bootstrap/node.js:579:3)
        errno: 'EADDRINUSE',
        code: 'EADDRINUSE',
        syscall: 'listen',
        address: '0.0.0.0',
        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
      Launching application.
      ^CShutting down server...
      
      pi@raspberrypi:~/MagicMirror $
      

      config.js is configured as the following:

      var config = {
      	address: "0.0.0.0", // 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: [], // 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"],
      

      Could anyone tell me what should i look at?
      I need to run both (1) MM server in a docker container and (2) MM client at the same Raspberry.

      posted in Troubleshooting
      SergeS
      Serge
    • RE: LED display shines through

      @maiky09 it is not VA. Check all monitors suitable for you in terms of size/price and check at other website which type of matrix these LCD have. As was said above, the best option is VA (Vertical Alignment)

      posted in Hardware
      SergeS
      Serge
    • RE: MM Server Mode in Docker on Raspberry

      @sdetweil
      thanx. I have put into container RUN command direct links

      --volume /home/pi/magic_mirror/config
      

      instead of relative ones

      --volume ~/magic_mirror/config
      

      So the RUN command looked like:

      docker run  -d \
      --publish 80:8080 \
      --restart always \
      --volume /home/pi/magic_mirror/config:/opt/magic_mirror/config \
      --volume /home/pi/magic_mirror/modules:/opt/magic_mirror/modules \
      --name magic_mirror \
      bastilimbach/docker-magicmirror:raspberry
      

      I also changed config, as I understood I should wrote port 80 there, so m,y config.js is the following:

      var config = {
          	address: "0.0.0.0", // 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: 80,
          	ipWhitelist: [], // 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"],
          if (typeof module !== "undefined") { module.exports = config; }
          
          	language: "en",
          	timeFormat: 24,
          	units: "metric",
          
          	modules: [
          		{
          			module: "alert",
          		},
          		{
          			module: "updatenotification",
          			position: "top_bar"
          		},
          		{
          			module: "clock",
          			position: "top_left"
          		},
          		// OTHER MODULES CONFIGURATIONS DELETED HERE FOR SIMPLICITY
          	]
          
          };
          
          /*************** DO NOT EDIT THE LINE BELOW ***************/
          if (typeof module !== "undefined") {module.exports = config;}
      

      I have did once more all the steps

      Here is log from terminal

      pi@raspberrypi:/ $ docker run  -d \
      > --publish 80:8080 \
      > --restart always \
      > --volume /home/pi/magic_mirror/config:/opt/magic_mirror/config \
      > --volume /home/pi/magic_mirror/modules:/opt/magic_mirror/modules \
      > --name magic_mirror \
      > bastilimbach/docker-magicmirror:raspberry
      37638fe6e1d0dee6b3ff9973c8ec7e2c7d6b0fa71b4c095e94738b197387074e
      pi@raspberrypi:/ $ docker ps
      CONTAINER ID        IMAGE                                       COMMAND                  CREATED             STATUS              PORTS                  NAMES
      37638fe6e1d0        bastilimbach/docker-magicmirror:raspberry   "/opt/docker-entrypo…"   11 seconds ago      Up 7 seconds        0.0.0.0:80->8080/tcp   magic_mirror
      pi@raspberrypi:/ $ cd /home/pi/magic_mirror/config
      pi@raspberrypi:~/magic_mirror/config $ sudo nano config.js
      pi@raspberrypi:~/magic_mirror/config $ cd /
      pi@raspberrypi:/ $ ifconfig
      docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
              inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
              inet6 fe80::5b8a:414d:261e:c2f3  prefixlen 64  scopeid 0x20<link>
              ether 02:42:cf:fa:cf:16  txqueuelen 0  (Ethernet)
              RX packets 12  bytes 1601 (1.5 KiB)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 170  bytes 28294 (27.6 KiB)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
              ether b8:27:eb:fd:40:7d  txqueuelen 1000  (Ethernet)
              RX packets 0  bytes 0 (0.0 B)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 0  bytes 0 (0.0 B)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
              inet 127.0.0.1  netmask 255.0.0.0
              inet6 ::1  prefixlen 128  scopeid 0x10<host>
              loop  txqueuelen 1000  (Local Loopback)
              RX packets 0  bytes 0 (0.0 B)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 0  bytes 0 (0.0 B)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      veth2d3c6a7: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
              inet 169.254.32.50  netmask 255.255.0.0  broadcast 169.254.255.255
              inet6 fe80::ef51:3415:a096:b052  prefixlen 64  scopeid 0x20<link>
              ether 9a:4f:36:79:b3:72  txqueuelen 0  (Ethernet)
              RX packets 4  bytes 651 (651.0 B)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 127  bytes 19147 (18.6 KiB)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
              inet 192.168.43.78  netmask 255.255.255.0  broadcast 192.168.43.255
              inet6 fe80::fff4:43e5:edc6:cc9e  prefixlen 64  scopeid 0x20<link>
              ether b8:27:eb:a8:15:28  txqueuelen 1000  (Ethernet)
              RX packets 13597  bytes 14840294 (14.1 MiB)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 11414  bytes 1524830 (1.4 MiB)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      pi@raspberrypi:/ $ docker ps
      CONTAINER ID        IMAGE                                       COMMAND                  CREATED              STATUS              PORTS                  NAMES
      37638fe6e1d0        bastilimbach/docker-magicmirror:raspberry   "/opt/docker-entrypo…"   About a minute ago   Up About a minute   0.0.0.0:80->8080/tcp   magic_mirror
      pi@raspberrypi:/ $ 
      
      

      When I trying to reach through
      localhost:80, 127.0.0.1:80 the browser returns

      This site can’t be reached The connection was reset.Try:
      Checking the connection
      Checking the proxy and the firewall
      ERR_CONNECTION_RESET
      

      When I am trying to reach through the address
      localhost:8080, 127.0.0.1:8080

      This site can’t be reached 127.0.0.1 refused to connect.
      Try: Checking the connection, Checking the proxy and the firewall
      ERR_CONNECTION_REFUSED
      

      So the errors are different (connection is reset and refused, respectively).
      What else should I check , @sdetweil could you please advice me?

      posted in Troubleshooting
      SergeS
      Serge
    • RE: LED display shines through

      @Sean said in LED display shines through:

      VA

      sorry for misunderstanding.
      I kept in mind and thought about VA but typed PLS.
      Of course the diff in IPS and VA is visible especially in dark color, due to the higher contrast in the last one.
      You are right.
      Late response speed is not an issues for MM projects I think.

      posted in Hardware
      SergeS
      Serge
    • RE: LED display shines through

      @maiky09 I have found that displays made with PLS technology emit better “dark” color as compared to displays made based on the IPS (and TFT) technology. Think about it.

      posted in Hardware
      SergeS
      Serge
    • MM Server Mode in Docker on Raspberry

      Good day, Ladies and Gentlemen,

      Following instructions at https://github.com/MichMich/MagicMirror and https://github.com/bastilimbach/docker-MagicMirror.

      The following steps has been done:

      1. Downloaded and flashed to SD card latest clean Raspbian Stretch with desktop (kernel version 4.14) from raspberry.org.
      2. Connected Raspberry to WiFi network.
      3. Installed Docker by executing
      curl -sSL https://get.docker.com | sh
      
      1. Get Docker autostart
      sudo systemctl enable docker
      
      1. added member to docker’s group
      sudo usermod -aG docker pi
      
      1. Reboot system to changes take place
      sudo reboot
      
      1. Downloaded container with magicmirror for raspberry
      docker pull bastilimbach/docker-magicmirror:raspberry
      
      1. Executed container start according to instructions at MM docker page:
      docker run  -d \
      	--publish 80:8080 \
      	--restart always \
      	--volume ~/magic_mirror/config:/opt/magic_mirror/config \
      	--volume ~/magic_mirror/modules:/opt/magic_mirror/modules \
      	--name magic_mirror \
      	bastilimbach/docker-magicmirror:raspberry
      
      1. Created config.js file in “/home/pi/magic_mirror/config”
      sudo nano config.js
      
      1. Edited config.js in “/home/pi/magic_mirror/config” to the following lines:

            var config = {
            	address: "0.0.0.0", // 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: [], // 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"],
            if (typeof module !== "undefined") { module.exports = config; }
            
            	language: "en",
            	timeFormat: 24,
            	units: "metric",
            
            	modules: [
            		{
            			module: "alert",
            		},
            		{
            			module: "updatenotification",
            			position: "top_bar"
            		},
            		{
            			module: "clock",
            			position: "top_left"
            		},
            		// OTHER MODULES CONFIGURATIONS DELETED HERE FOR SIMPLICITY
            	]
            
            };
            
            /*************** DO NOT EDIT THE LINE BELOW ***************/
            if (typeof module !== "undefined") {module.exports = config;}
        
      2. Reboot the system

      sudo reboot
      
      1. Checked IP addresses
      ifconfig
      
      pi@raspberrypi:/ $ ifconfig
      docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
              inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
              inet6 fe80::36c7:71e6:4c9c:d8d9  prefixlen 64  scopeid 0x20<link>
              ether 02:42:50:41:f1:09  txqueuelen 0  (Ethernet)
              RX packets 13  bytes 1775 (1.7 KiB)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 174  bytes 40644 (39.6 KiB)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
              ether b8:27:eb:fd:40:7d  txqueuelen 1000  (Ethernet)
              RX packets 0  bytes 0 (0.0 B)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 0  bytes 0 (0.0 B)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
              inet 127.0.0.1  netmask 255.0.0.0
              inet6 ::1  prefixlen 128  scopeid 0x10<host>
              loop  txqueuelen 1000  (Local Loopback)
              RX packets 0  bytes 0 (0.0 B)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 0  bytes 0 (0.0 B)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      veth0275d60: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
              inet 169.254.222.123  netmask 255.255.0.0  broadcast 169.254.255.255
              inet6 fe80::6069:90ff:fec9:a75a  prefixlen 64  scopeid 0x20<link>
              ether 62:69:90:c9:a7:5a  txqueuelen 0  (Ethernet)
              RX packets 13  bytes 1957 (1.9 KiB)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 350  bytes 82319 (80.3 KiB)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
              inet 192.168.43.78  netmask 255.255.255.0  broadcast 192.168.43.255
              inet6 fe80::fff4:43e5:edc6:cc9e  prefixlen 64  scopeid 0x20<link>
              ether b8:27:eb:a8:15:28  txqueuelen 1000  (Ethernet)
              RX packets 4833  bytes 3587709 (3.4 MiB)
              RX errors 0  dropped 0  overruns 0  frame 0
              TX packets 4613  bytes 610563 (596.2 KiB)
              TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      
      1. Tried to connect by a local Chromium to the MM server by entering the following addresses into browser’s address line:
      127.0.0.1:8080
      localhost:8080
      127.0.0.1:80
      localhost:80
      

      Got in browser:

      This site can’t be reached The connection was reset. ERR_CONNECTION_RESET
      
      1. Tried to connect from phone which is connected to the same WiFi network via browser by enetring to the Browser’s address line:
      192.168.43.78:8080
      192.168.43.78:80
      

      Result is the same,

      This site can’t be reached The connection was reset. ERR_CONNECTION_RESET
      

      For reference, list of files and folders in home/pi/magic_mirror

      pi@raspberrypi:~/magic_mirror $ ls -R
      .:
      config  modules
      
      ./config:
      config.js  config.js.sample
      
      ./modules:
      default  node_modules  README.md
      
      ./modules/default:
      alert  calendar  clock  compliments  currentweather  defaultmodules.js  helloworld  newsfeed  updatenotification  weather  weatherforecast
      
      ./modules/default/alert:
      alert.js  classie.js  modernizr.custom.js  notificationFx.js  ns-default.css  README.md  translations
      
      ./modules/default/alert/translations:
      bg.json  da.json  de.json  en.json  es.json  fr.json  hu.json  nl.json  ru.json
      
      ./modules/default/calendar:
      calendar.css  calendarfetcher.js  calendar.js  debug.js  node_helper.js  README.md  vendor
      
      ./modules/default/calendar/vendor:
      ical.js
      
      ./modules/default/calendar/vendor/ical.js:
      example.js  ical.js  index.js  LICENSE  node-ical.js  NOTICE  package.json  readme.md  test
      
      ./modules/default/calendar/vendor/ical.js/test:
      test10.ics  test11.ics  test1.ics  test2.ics  test3.ics  test4.ics  test5.ics  test6.ics  test7.ics  test8.ics  test9.ics  test.js
      
      ./modules/default/clock:
      clock.js  clock_screenshot.png  clock_styles.css  faces  README.md
      
      ./modules/default/clock/faces:
      face-001.svg  face-002.svg  face-003.svg  face-004.svg  face-005.svg  face-006.svg  face-007.svg  face-008.svg  face-009.svg  face-010.svg  face-011.svg  face-012.svg
      
      ./modules/default/compliments:
      compliments.js  compliments_screenshot.png  README.md
      
      ./modules/default/currentweather:
      currentweather.css  currentweather.js  README.md  weather_screenshot.png
      
      ./modules/default/helloworld:
      helloworld.js  helloworld.njk  README.md
      
      ./modules/default/newsfeed:
      fetcher.js  newsfeed.js  newsfeed_screenshot.png  node_helper.js  README.md  translations
      
      ./modules/default/newsfeed/translations:
      de.json  en.json  es.json  fr.json
      
      ./modules/default/updatenotification:
      node_helper.js  README.md  updatenotification.js
      
      ./modules/default/weather:
      current.njk  current.png  forecast.njk  forecast.png  providers  README.md  weather.css  weather.js  weatherobject.js  weatherprovider.js
      
      ./modules/default/weather/providers:
      darksky.js  openweathermap.js  README.md
      
      ./modules/default/weatherforecast:
      forecast_screenshot.png  README.md  weatherforecast.css  weatherforecast.js
      
      ./modules/node_modules:
      node_helper
      
      ./modules/node_modules/node_helper:
      index.js
      

      Could anyone advise what I am doing wrong here?

      posted in Troubleshooting
      SergeS
      Serge
    • RE: Best glass transparency for MagicMirror

      It seems that in my country (I am from Ukraine) is not very easy to get the two-way glass mirror.

      One company made for me two-way mirror from regular 4mm thickness glass by titanium coating-in-vacuum technique. It has size 560x780mm. I have asked for transparency rate 30%.
      When I took it to home and compared to regular mirror - my “two way mirror” looks darker as compared to the regular mirror.
      For me, it is not comfortable to use such dark reflection in the bathroom.
      I am attaching the pic to this post - you can see the reflection of window in both mirrors - regular and two-way mirror.

      I have looked through the examples of already completed mirrors and some of the are also looks darker, some are pretty light.

      Could you please write down there - whether your mirror is darker then the regular one?

      I want to clarify this stuff for me because I have nothing to compare with.
      alt text

      posted in Hardware
      SergeS
      Serge
    • 1 / 1