MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    1. Home
    2. asdf303
    A
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 7
    • Best 0
    • Controversial 0
    • Groups 0

    asdf303

    @asdf303

    0
    Reputation
    1
    Profile views
    7
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    asdf303 Unfollow Follow

    Latest posts made by asdf303

    • RE: MM in Container config lost after Container Stop/Start

      @sdetweil @karsten13 thanks a lot for your advice!
      finally, there was only one package missing

      npm install request
      

      did the job for me.

      🙏🏼

      posted in Troubleshooting
      A
      asdf303
    • RE: MM in Container config lost after Container Stop/Start

      @karsten13 indeed, the installation has been running for ~5 years now.

      I know this is none of your business, but do you might have a recommendation for a up-to-date module where i can run the same features? (naming a start and destination bus stop in google maps and getting the next connections displayed?)

      i scrolled through all of the 3rd party modules and there are many many of them, but none of them seems to be customizable to my home town. I live within VGN area in Germany, but there is no plugin really supporting this and i am definetly lacking the skills to create such a plugin by myself.

      posted in Troubleshooting
      A
      asdf303
    • RE: MM in Container config lost after Container Stop/Start

      update: if the module: ‘MMM-LocalTransport’, module is disabled, it works.
      Strange thing:

      • the module works on my raspi electron installation.
      • it does not in the container.
        I will keep you updated.
      posted in Troubleshooting
      A
      asdf303
    • RE: MM in Container config lost after Container Stop/Start

      @karsten13 thank you, i will try next time, will take 2…3 days, maybe

      posted in Troubleshooting
      A
      asdf303
    • RE: MM in Container config lost after Container Stop/Start

      @karsten13 Thank you for asking.
      Please find all my stuff below

      As mentioned above, it loads correctly and runs the configuration correctly on the first start.
      Everything is fine.
      But if the container is started/stopped in Portainer, it seems to not be able to find a correct config.js, as you can see in the log.

      The only way to get it running is, i stop the container, remove the stack in Portainer, then navigate to /data/compose in the host system, manually delete all the data there (i use Winscp). Then i re-install everything (including e.g. the mmm-localtransport addon) acc. to the book, modify the config.js to what you can see below.

      let config = {
      	address: "0.0.0.0", 	// Address to listen on, can be:
      	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: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "192.168.178.1/24"], 	// Set [] to allow all IP addresses
      	ipWhitelist: [], 	// Set [] to allow all IP addresses
      
      	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: "de",
      	locale: "en-US",
      	logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
      	timeFormat: 24,
      	units: "metric",
      	// 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
      
      	modules: [
      		{
      			module: "alert",
      		},
      		{
      			module: "updatenotification",
      			position: "top_bar"
      		},
      		{
      			module: "clock",
      			position: "top_left",
      				config: {
      					displaySeconds: false,
      					displayType: "digital",
      					clockBold: false,
      					// The config property is optional.
      					// See 'Configuration options' for more information.
      					}
      		},
      {
      			module: "calendar",
      			header: "Was passiert heute?",
      			position: "top_left",
      			config: {
      				fade: false,
      				timeFormat: 'absolute',
      				dateFormat: '24',
      				getRelative: 24,
      				fetchInterval: 3600000,
      				calendars: [
                                      	{
      					// der Abfallkalender
                                                    	symbol: "trash",
                                             		url: "webcal://XXX"
                                              },
      					{
      					//private calendar
      						symbol: "home",
            					 	url: "XXX",
              					auth: {
      							user: "XXX",
      							pass: "XXX",
      							method: "basic"
      						}
      					}
      				]
      			}
      		},
      
      /*		{
      			module: "compliments",
      			position: "lower_third"
      		},*/
      	
      		{
      			module: "weather", //aktuelles Wetter
      			position: "top_right",
      			//header: "aktuelles Wetter",
      			config: {
      				fade: false,
      				type: "current",
      				weatherProvider: "openweathermap",
      				location: "XXX",
      				locationID: "XXX",  //ID from http://www.openweathermap.org/help/city_list.txt
      				apiKey: "XXX",
      				roundTemp: true,
      				maxNumberOfDays: 2,
      			}
      
      		},{
      			module: "weather", //Vorhersage
      			position: "top_right",
      			header: "Vorhersage",
      			config: {
      				fade: false,
      				type: "forecast",
      				weatherProvider: "openweathermap",
      				location: "XXX",
      				locationID: "XXX",  //ID from http://www.openweathermap.org/help/city_list.txt
      				apiKey: "xxx",
      				roundTemp: true,
      				maxNumberOfDays: 4,
      			}
      
      		},
      		{
      			module: "newsfeed",
      			position: "bottom_bar",
      			config: {
      				feeds: [
      					{
      						title: "Tagesschau",
      						url: "https://www.tagesschau.de/xml/rss2"
      					}
      				],
      				showSourceTitle: false,
      				showPublishDate: false,
      				wrapTitle: false,
      			}
      		},,{
      		module: 'MMM-LocalTransport',
      		header: 'Bus nach XXX',
      		position: 'bottom_right',
      		config: {
      			api_key: 'xxxx',
      			origin: 'xxxx',
      			destination: 'xxxx',
      			maximumEntries: 3,
      			displayArrival: false,
      			displayWalkType: 'none',
      			updateInterval: 60,
      			displayStationLength: -1,
      		}
      	},
      	]
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      
      

      Here is the docker-compose.yml, copied from your project, unchanged:

      version: '3'
      
      services:
        magicmirror:
          container_name: mm
          image: karsten13/magicmirror:latest
          ports:
            - "8080:8080"
          volumes:
            - ../mounts/config:/opt/magic_mirror/config
            - ../mounts/modules:/opt/magic_mirror/modules
            - ../mounts/css:/opt/magic_mirror/css
          restart: unless-stopped
          command: 
            - npm
            - run
            - server
      

      and finally, the log after RE-starting the container.

      > magicmirror@2.22.0 server
      
      > node ./serveronly
      
      [17.02.2023 13:35.40.960] [LOG]   Starting MagicMirror: v2.22.0
      
      [17.02.2023 13:35.40.962] [LOG]   Loading config ...
      
      [17.02.2023 13:35.40.964] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: Cannot read properties of undefined (reading 'module')
      
      [17.02.2023 13:35.40.965] [ERROR] Whoops! There was an uncaught exception...
      
      [17.02.2023 13:35.40.967] [ERROR] TypeError: Cannot read properties of undefined (reading 'module')
      
          at /opt/magic_mirror/js/app.js:220:34
      
          at loadConfig (/opt/magic_mirror/js/app.js:81:4)
      
          at App.start (/opt/magic_mirror/js/app.js:212:3)
      
          at Object.<anonymous> (/opt/magic_mirror/serveronly/index.js:4:5)
      
          at Module._compile (node:internal/modules/cjs/loader:1226:14)
      
          at Module._extensions..js (node:internal/modules/cjs/loader:1280:10)
      
          at Module.load (node:internal/modules/cjs/loader:1089:32)
      
          at Module._load (node:internal/modules/cjs/loader:930:12)
      
          at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
      
          at node:internal/main/run_main_module:23:47
      
      [17.02.2023 13:35.40.967] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      
      [17.02.2023 13:35.40.967] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      
      copy default modules to host ...
      
      copy css files to host ...
      
      chown modules and config folder ...
      
      timezone is Europe/Berlin
      
      start magicmirror
      
      posted in Troubleshooting
      A
      asdf303
    • RE: MM in Container config lost after Container Stop/Start

      @sdetweil thank you for your comment.
      Actually, my link above is wrong. My fault. Sorry.
      I am already using the image

      karsten13/magicmirror:latest.

      So, any further ideas?

      posted in Troubleshooting
      A
      asdf303
    • MM in Container config lost after Container Stop/Start

      Hi all,
      I sucessfully setup a container from
      https://github.com/bastilimbach/docker-MagicMirror
      in server mode only.
      i put in my config, everything runs well.

      But: If i restart the container in portainer (click stop, click start), it starts, complains about config not to be found and restarts.
      If i take a look into my host data at /data/compose/mounts/config, everything is still there but log complains about not finding a config

      I have been running a MM installation on a raspberry pi for years, so it seems to be somehow container related. I am new to virtualization things, so please forgive my ignorance.

      Anyone any Ideas?
      Thank you in advance

      log snippet:

      [14.02.2023 15:26.10.982] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: Cannot read properties of undefined (reading 'module')
      
      [14.02.2023 15:26.10.983] [ERROR] Whoops! There was an uncaught exception...
      
      [14.02.2023 15:26.10.986] [ERROR] TypeError: Cannot read properties of undefined (reading 'module')
      
          at /opt/magic_mirror/js/app.js:220:34
      
          at loadConfig (/opt/magic_mirror/js/app.js:81:4)
      
          at App.start (/opt/magic_mirror/js/app.js:212:3)
      
          at Object.<anonymous> (/opt/magic_mirror/serveronly/index.js:4:5)
      
          at Module._compile (node:internal/modules/cjs/loader:1226:14)
      
          at Module._extensions..js (node:internal/modules/cjs/loader:1280:10)
      
          at Module.load (node:internal/modules/cjs/loader:1089:32)
      
          at Module._load (node:internal/modules/cjs/loader:930:12)
      
          at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
      
          at node:internal/main/run_main_module:23:47
      
      [14.02.2023 15:26.10.986] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      
      [14.02.2023 15:26.10.986] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      
      posted in Troubleshooting
      A
      asdf303