MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-Bergfex doesent load respectively should be a valid spdx license expression

    Scheduled Pinned Locked Moved Troubleshooting
    30 Posts 6 Posters 19.7k Views 6 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      astrakid
      last edited by

      @gianienderlin said in MMM-Bergfex doesent load respectively should be a valid spdx license expression:

      custom files. please let me k

      as far as i could see there is one main change in node_helper.js:
      instead of
      var sys = require(‘sys’);

      he uses
      var util = require(‘util’);

      regards,
      andre

      1 Reply Last reply Reply Quote 0
      • M Offline
        marphi1602 @gianienderlin
        last edited by

        @gianienderlin worked for me! The only thing what I´ve changed was the const in node_helper.js.
        Due to the fact that I am more interested in seeing the results of the Austrian ski resorts I put // Constants
        const URL = “http://www.bergfex.at/oesterreich/schneewerte/”;

        Thank you!

        1 Reply Last reply Reply Quote 0
        • G Offline
          gianienderlin
          last edited by

          yes this is possible: -) but thought there was more…

          1 Reply Last reply Reply Quote 0
          • M Offline
            marphi1602
            last edited by

            anybody knows how I have to set ‘Kitzbühel - Kirchberg’ to the config? I think I am struggling with the “ü” same also for special characters like “-”… In case I am putting Kitzbühel into the config it says loading…

            1 Reply Last reply Reply Quote 0
            • A Offline
              astrakid
              last edited by astrakid

              @marphi1602 said in MMM-Bergfex doesent load respectively should be a valid spdx license expression:

              Kitzbühel - Kirchberg

              it works for me without an issue. my config part:

                              {
                                      module: 'MMM-bergfex',
                                      position: 'top_right',
                                      classes: 'small dimmed',
                                      config: {
                                          updateInterval: 30*60*1000,
                                          animationSpeed: 0,
                                          header: 'Schneebericht',
                                              skiareas: [
                                                              'Fieberbrunn - Saalbach Hinterglemm Leogang',
                                                              'Kitzbühel - Kirchberg',
                                                     ],
                                              shortenArea: 20,
                                              cssclassrow: 'normal',
                                              cssclassheader: 'bright'
              
                                      }
                              },
              

              edit: which ‘locale’ are you using? i have “C” configured except “LANGUAGE=” and “LC_ALL=”.
              edit2: maybe you can try this (this is what is visible in the logfile): ‘Kitzbhel - Kirchberg’

              M 1 Reply Last reply Reply Quote 0
              • M Offline
                marphi1602 @astrakid
                last edited by marphi1602

                @astrakid thanks! I checked the config once again and I’ve seen some odd ascii characters hence it hasn’t worked properly. Now it’s working!

                1 Reply Last reply Reply Quote 0
                • M Offline
                  marphi1602
                  last edited by

                  Is there any chance to highlight this ski resort with the highest amount of fresh snow?

                  A 1 Reply Last reply Reply Quote 0
                  • H Offline
                    hermlam @gianienderlin
                    last edited by

                    @gianienderlin @astrakid Even after copying these files, the problem stays: the only thing I see is the header and ‘_loading…’

                    M 1 Reply Last reply Reply Quote 0
                    • M Offline
                      marphi1602 @hermlam
                      last edited by

                      @hermlam pls publish the bergfex part of your config. Are you looking for the snow results of Austria or Switzerland? I had to change the const to the Austrian snow result url, pls see the posts above. For the first step I would suggest to take only one ski resort in your Cfg.

                      1 Reply Last reply Reply Quote 0
                      • A Offline
                        astrakid @marphi1602
                        last edited by

                        @marphi1602 highlightingwould need changes to the sourcecode.

                        1 Reply Last reply Reply Quote 0
                        • binderthB Offline
                          binderth
                          last edited by

                          I do have the same problem:
                          0_1511515614513_953ac801-4286-4bfa-af2e-6554110a4c8e-image.png

                          To avoid some enconding Problems, I picked some oneword-places for start:

                          		{
                          			module: 'MMM-bergfex',
                          			position: 'top_right', 
                          			classes: 'small dimmed', 
                          			config: {
                          			    updateInterval: 30*60*1000,
                          			    animationSpeed: 0,
                          			    header: 'Schneebericht',
                          				skiareas: [
                          						// 'Zell am Ziller - Zilleral Arena',
                          						// 'Gerlos - Zillertal Arena',
                          						'Ischgl',
                          						'Jungholz',
                          				],
                          				shortenArea: 20,
                          				cssclassrow: 'normal',
                          				cssclassheader: 'bright'				
                          			}
                          		},
                          

                          like described in this thread (https://forum.magicmirror.builders/post/30795), I changed to var util = require(‘util’); in node_helper.js

                          In my logs I get this:

                          TypeError: Cannot read property 'parent' of undefined
                              at Function.exports.update (/home/pi/MagicMirror/modules/MMM-bergfex/node_modules/cheerio/lib/parse.js:69:25)
                              at module.exports (/home/pi/MagicMirror/modules/MMM-bergfex/node_modules/cheerio/lib/parse.js:19:11)
                              at Function.exports.load (/home/pi/MagicMirror/modules/MMM-bergfex/node_modules/cheerio/lib/static.js:27:14)
                              at Request._callback (/home/pi/MagicMirror/modules/MMM-bergfex/node_helper.js:43:19)
                              at self.callback (/home/pi/MagicMirror/modules/MMM-bergfex/node_modules/request/request.js:186:22)
                              at emitOne (events.js:96:13)
                              at Request.emit (events.js:191:7)
                              at Request.onRequestError (/home/pi/MagicMirror/modules/MMM-bergfex/node_modules/request/request.js:878:8)
                              at emitOne (events.js:96:13)
                              at ClientRequest.emit (events.js:191:7)
                          
                          M 1 Reply Last reply Reply Quote 0
                          • M Offline
                            marphi1602 @binderth
                            last edited by

                            @binderth are you sure that your pi is connected with the internet? I have seen the same error a couple of weeks ago and I noticed that my pi wasn’t connected with the www anymore. What’s happening in case you ping www.google.com from your pi? Are you using pm2? What’s in your pm2 log mm

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              ReinerZ
                              last edited by

                              This post is deleted!
                              1 Reply Last reply Reply Quote 0
                              • R Offline
                                ReinerZ
                                last edited by

                                This post is deleted!
                                1 Reply Last reply Reply Quote 0
                                • R Offline
                                  ReinerZ @astrakid
                                  last edited by

                                  This post is deleted!
                                  1 Reply Last reply Reply Quote 0
                                  • binderthB Offline
                                    binderth
                                    last edited by

                                    strange. I thought i had replied to this already…

                                    1. my Pi is connected (I’m getting info for every other module quite right!)
                                    2. I’m using pm2
                                    3. I just upgraded to 2.2 (in case that matters now - same Output though)
                                    4. my pm2 log mm reads:
                                    pi@MagicMirror2:~/MagicMirror $ pm2 log mm
                                    [TAILING] Tailing last 15 lines for [mm] process (change the value with --lines option)
                                    /home/pi/.pm2/logs/mm-error-0.log last 15 lines:
                                    0|mm       | there was a Wunderlist problem { error:
                                    0|mm       |    { type: 'server_error',
                                    0|mm       |      translation_key: 'api_error_unknown',
                                    0|mm       |      message: 'An unknown server error occurred' } } 500
                                    0|mm       | (node:931) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added. Use emitter.setMaxListeners() to increase limit
                                    0|mm       | SyntaxError: Unexpected end of JSON input
                                    0|mm       |     at JSON.parse ()
                                    0|mm       |     at Class.loadLogs (/home/pi/MagicMirror/modules/MMM-syslog/node_helper.js:60:21)
                                    0|mm       |     at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-syslog/node_helper.js:45:9)
                                    0|mm       |     at Socket. (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:113:11)
                                    0|mm       |     at emitTwo (events.js:106:13)
                                    0|mm       |     at Socket.emit (events.js:194:7)
                                    0|mm       |     at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:514:12
                                    0|mm       |     at _combinedTickCallback (internal/process/next_tick.js:73:7)
                                    0|mm       |     at process._tickCallback (internal/process/next_tick.js:104:9)
                                    
                                    /home/pi/.pm2/logs/mm-out-0.log last 15 lines:
                                    0|mm       | 1 snow reports from bergfex.at retrieved.
                                    0|mm       | searching for Zell am Ziller - Zillertal Arena
                                    0|mm       | searching for Gerlos - Zillertal Arena
                                    0|mm       | searching for Hintertuxer Gletscher / Hintertux
                                    0|mm       | Whoops! There was an uncaught exception...
                                    0|mm       | MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
                                    0|mm       | If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
                                    0|mm       | Starting access to FRITZ!Box...
                                    0|mm       | retrieveAndUpdate()
                                    0|mm       | Use existing news fetcher for url: http://rss.sueddeutsche.de/rss/Topthemen
                                    0|mm       | 1 snow reports from bergfex.at retrieved.
                                    0|mm       | searching for Zell am Ziller - Zillertal Arena
                                    0|mm       | searching for Gerlos - Zillertal Arena
                                    0|mm       | searching for Hintertuxer Gletscher / Hintertux
                                    0|mm       | Access to FRITZ!Box finished.
                                    

                                    (wunderlist and syslog working just fine - despite those Errors?)

                                    but still:
                                    0_1515770419968_17342978-e71c-459d-99ba-632ecab7a26c-image.png

                                    M 1 Reply Last reply Reply Quote 0
                                    • M Offline
                                      marphi1602 @binderth
                                      last edited by

                                      @binderth what’s happening in case you would disable the whole wunderlist module and restart mm again?

                                      binderthB 1 Reply Last reply Reply Quote 0
                                      • binderthB Offline
                                        binderth @marphi1602
                                        last edited by

                                        @marphi1602
                                        tried this one! :) - just reinstalled the whole 2.2.2 Version and now I don’t get any Errors:

                                        pi@MagicMirror2:~ $ pm2 logs
                                        [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
                                        /home/pi/.pm2/pm2.log last 15 lines:
                                        PM2        | 2018-01-12 18:39:38: Current arch         : arm
                                        PM2        | 2018-01-12 18:39:38: PM2 home             : /home/pi/.pm2
                                        PM2        | 2018-01-12 18:39:38: PM2 PID file         : /home/pi/.pm2/pm2.pid
                                        PM2        | 2018-01-12 18:39:38: RPC socket file      : /home/pi/.pm2/rpc.sock
                                        PM2        | 2018-01-12 18:39:38: BUS socket file      : /home/pi/.pm2/pub.sock
                                        PM2        | 2018-01-12 18:39:38: Application log path : /home/pi/.pm2/logs
                                        PM2        | 2018-01-12 18:39:38: Process dump file    : /home/pi/.pm2/dump.pm2
                                        PM2        | 2018-01-12 18:39:38: Concurrent actions   : 2
                                        PM2        | 2018-01-12 18:39:38: SIGTERM timeout      : 1600
                                        PM2        | 2018-01-12 18:39:38: ===============================================================================
                                        PM2        | 2018-01-12 18:39:38: Starting execution sequence in -fork mode- for app name:mm id:0
                                        PM2        | 2018-01-12 18:39:38: [Watch] Start watching MagicMirror
                                        PM2        | 2018-01-12 18:39:38: Starting execution sequence in -fork mode- for app name:MagicMirror id:1
                                        PM2        | 2018-01-12 18:39:39: App name:mm id:0 online
                                        PM2        | 2018-01-12 18:39:39: App name:MagicMirror id:1 online
                                        
                                        /home/pi/.pm2/logs/MagicMirror-error-1.log last 15 lines:
                                        1|MagicMir | (node:965) DeprecationWarning: sys is deprecated. Use util instead.
                                        
                                        /home/pi/.pm2/logs/mm-error-0.log last 15 lines:
                                        0|mm       |     at Object.exports._errnoException (util.js:1026:11)
                                        0|mm       |     at exports._exceptionWithHostPort (util.js:1049:20)
                                        0|mm       |     at Server._listen2 (net.js:1253:14)
                                        0|mm       |     at listen (net.js:1289:10)
                                        0|mm       |     at net.js:1399:9
                                        0|mm       |     at _combinedTickCallback (internal/process/next_tick.js:77:11)
                                        0|mm       |     at process._tickCallback (internal/process/next_tick.js:98:9)
                                        0|mm       |     at Module.runMain (module.js:592:11)
                                        0|mm       |     at run (bootstrap_node.js:402:7)
                                        0|mm       |     at startup (bootstrap_node.js:157:9)
                                        0|mm       |   code: 'EADDRINUSE',
                                        0|mm       |   errno: 'EADDRINUSE',
                                        0|mm       |   syscall: 'listen',
                                        0|mm       |   address: '0.0.0.0',
                                        0|mm       |   port: 8080 }
                                        
                                        /home/pi/.pm2/logs/mm-out-0.log last 15 lines:
                                        0|mm       | Connecting socket for: MMM-FRITZ-Box-Callmonitor
                                        0|mm       | Starting module: MMM-FRITZ-Box-Callmonitor
                                        0|mm       | Connecting socket for: MMM-DWD-WarnWeather
                                        0|mm       | MMM-DWD-WarnWeather helper started...
                                        0|mm       | Connecting socket for: MMM-mqtt
                                        0|mm       | MMM-mqtt started ...
                                        0|mm       | Connecting socket for: MMM-bergfex
                                        0|mm       | Starting node helper: MMM-bergfex
                                        0|mm       | Connecting socket for: newsfeed
                                        0|mm       | Starting module: newsfeed
                                        0|mm       | Sockets connected & modules started ...
                                        0|mm       | Whoops! There was an uncaught exception...
                                        0|mm       | MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
                                        0|mm       | If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
                                        0|mm       | Launching application.
                                        
                                        /home/pi/.pm2/logs/MagicMirror-out-1.log last 15 lines:
                                        1|MagicMir | Create new news fetcher for url: http://rss.sueddeutsche.de/rss/Topthemen - Interval: 300000
                                        1|MagicMir | 1 snow reports from bergfex.at retrieved.
                                        1|MagicMir | searching for Zell am Ziller - Zillertal Arena
                                        1|MagicMir | searching for Gerlos - Zillertal Arena
                                        1|MagicMir | searching for Hintertuxer Gletscher / Hintertux
                                        1|MagicMir | Access to FRITZ!Box finished.
                                        1|MagicMir | No log file found.
                                        1|MagicMir | Starting access to FRITZ!Box...
                                        1|MagicMir | retrieveAndUpdate()
                                        1|MagicMir | Use existing news fetcher for url: http://rss.sueddeutsche.de/rss/Topthemen
                                        1|MagicMir | 1 snow reports from bergfex.at retrieved.
                                        1|MagicMir | searching for Zell am Ziller - Zillertal Arena
                                        1|MagicMir | searching for Gerlos - Zillertal Arena
                                        1|MagicMir | searching for Hintertuxer Gletscher / Hintertux
                                        1|MagicMir | Access to FRITZ!Box finished.
                                        

                                        still - I get “1 snow reports from bergfex.at retrieved.” - but none show up…

                                        PS: I always get the EADDRINUSE error, if I do pm2 restart mm.

                                        M 1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          marphi1602 @binderth
                                          last edited by marphi1602

                                          @binderth mhhh are you sure that no other mm instance is parallel running or an additional app is also listening on the same port?

                                          Kill all other pm instances before - pm2 delete all

                                          Try the following and put only the bergfex module to your config and post your config.

                                          binderthB 1 Reply Last reply Reply Quote 0
                                          • binderthB Offline
                                            binderth @marphi1602
                                            last edited by

                                            @marphi1602
                                            yes, I’m sure no other is running.

                                            Got it figured out - after some debugging in node_helper.js I figured, it was strange, that I only found “1 sno report” - and after some annoying reloads (I’m not a developer, not to speak of JS), I found the only one issue for mmm-bergfex on github:
                                            https://github.com/nebulx29/MMM-bergfex/issues/1#issuecomment-355083367

                                            9days ago, Rainer added not only the deprecated “sys -> util” has to be changed, but also the “tbody var” - that did the trick for me! it worked!!

                                            tl:dr>

                                            1. add “private”: true, after “license”: “Apache 2.0”, inside package.json to avoid the license problem
                                            2. change inside node_helper.js
                                            var sys = require('sys'); to
                                            //var sys = require('sys');
                                            var util = require('util');
                                            
                                            1. change inside node_helper.js
                                            var tbody = $('.content').children().last(); to
                                            var tbody = $('.content>table').children().last();
                                            
                                            binderthB 1 Reply Last reply Reply Quote 0

                                            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
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy