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

    Posts

    Recent Best Controversial
    • RE: MMM-AVStock v2.0.0 (npm update required!)

      Small update on new API.

      I am working on including IEX Cloud API. Have been successful for quotes.
      However the API has a limit for their free tier (as they all have) and requesting historic prices comsumes a LOT of usage quota.
      For the charts to show we need this historical data however.
      I am considering using both sources for the different purposes (i.e. IEX for quotes and AV for historic data).
      So users would need 2 API keys for the complete module or one if they don’t want to see the chart.
      If anyone has a better idea and knowledge about the API, let me know!

      Have a great weekend everyone!

      posted in Productivity
      lavolp3L
      lavolp3
    • RE: Dropbox-Uploader: how to synchronize a folder with cron job?

      @MajorC why dont you regularly download the whole folder and select files from that to show as background.
      I assume with the Download Option of the script you might be able to kind of synchronise your folder.

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • RE: Finding the best commute time using MMM-MyCommute (and a graph)

      @sdetweil I tried with Firefox.
      Might try with Chrome later today.

      posted in Transport
      lavolp3L
      lavolp3
    • RE: Finding the best commute time using MMM-MyCommute (and a graph)

      @sdetweil 16kb png didn’t work for me

      Error

      Something went wrong while parsing server response

      posted in Transport
      lavolp3L
      lavolp3
    • RE: Finding the best commute time using MMM-MyCommute (and a graph)

      @sdetweil well then it’s the image that is not working . Maybe size? type? (png)

      posted in Transport
      lavolp3L
      lavolp3
    • Finding the best commute time using MMM-MyCommute (and a graph)

      From the “exciting projects in the MagicMirror universe” series I present to you something I’m working on and like very much.

      The great module MMM-MyCommute (thank you @j-e-f-f !!) shows you commuting times, especially helpful for me driving min. 40min by car on a very crowded highway to my new job.
      But there’s only the current value, and it is gone after a few minutes. What a waste!

      So, let’s use historic data and find out the best commute time for my way to work and back home.

      This is what I’ve done:

      • collect data for every destination (including timestamp and driving time) in a json file
      • create a scatter chart (using highcharts) and show driving times
        – sorted by start time
        – and filtered to the current weekday.

      Doing this for some time should give me some big-data-scatter-plot to find the best commute time.
      I’ll be happy about the data and the cool plot, practicability might be limited, but hey … something was created!

      Find my work here
      https://github.com/lavolp3/MMM-MyCommute/tree/dev

      And see it here (imgur because upload doesn’t work again):
      imgur because upload doesnt work again

      Looking forward to your suggestions, improvement ideas.
      And if anyone can help me setting up a mysql table to store the data, I’d highly appreciate it!

      Cheers

      posted in Transport
      lavolp3L
      lavolp3
    • RE: Microsoft Teams

      @Vauxdvihl
      Should be possible to a certain degree using Microsoft Graph API
      https://docs.microsoft.com/de-de/graph/api/resources/teams-api-overview?view=graph-rest-1.0
      What are you aiming at?

      posted in Requests
      lavolp3L
      lavolp3
    • RE: Comment désactiver le message "low voltage"

      @did said in Comment désactiver le message "low voltage":

      I have no problem since it has been working for 2 years.

      You have no problem until you have a problem!
      (Lol)

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • RE: Comment désactiver le message "low voltage"

      @did Try this advice from the quite entertaining thread in the raspberry pi forum:
      https://www.raspberrypi.org/forums/posting.php?mode=quote&f=28&p=1737571&sid=0a0941ce9c8f521fd3d4d5770bfe241d

      Mon Oct 05, 2020 7:50 pm
      Okay found the battery plugin using the GUI. For anyone else that wants to disable this here are the > steps that worked for me

      1. Navigate to Preferences > Add/Remove Software
      2. Search for Battery
      3. Disable the “battery monitor plugin for lxpanel”

      And that should disable the notification. Thanks for the help everyone!

      But seriously, consider rather giving the pi enough power.
      You wouldn’t want to destroy your sd card.

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • Troubleshooting MagicMirror modules

      I have started a gist with a guide on how to troubleshoot modules, directed to users that have problems after installation of a module and don’t know what to do / where to look.
      I’d like to use it as a reference for troubleshooting threads.

      This is still a work in progress and not fully complete.
      Any contribution is HIGHLY appreciated.

      Find the source here
      https://gist.github.com/lavolp3/db7de8c0664ba95e8b9247ba685095fe

      This documentation describes the workflow to debug Magic Mirror modules. It is to the most part valid for any Magic Mirror module out there but especially directed to my modules and their debugging function.

      1 - HELP!

      Well, help is on the way. Let’s get started!
      There are two main issues that you’ll face:

      1.1 - The mirror won’t show

      The two main reasons are:

      • config.js is probably not interpretable anymore. Check out debugging config.js
      • the DOM (document object model, which is the sum of objects in the HTML document created by the code) could not be created due to syntax errors. Check out debugging main.js

      1.2 - My module won’t show / won’t show complete / shows unexpected behaviour

      There probably is a syntax error in your module. Check out debugging main.js

      1.3 - My module won’t update

      You may have a problem at the server side, probably in the node_helper. Check out debugging node_helper

      1.4 - My module shows up but looks weired

      There are many possible reasons for that but it’s worthwile to have a look at css. Check out debugging css

      2 - Bug hunt

      This describes the debugging workflow. You can do this workflow from start to finish to check for all obvious issues or check specific parts coming from part 1 above.

      2.1 - Activate debug function

      This is valid for my modules oand some others, but not nearly all. THe config options for my modules generally include a debug function. Set it to true to receive much more debugging output.

      debug: true
      

      2.2 - Debugging node_helper

      The server side of the mirror works in the background, usually you can’t directly see the errors the modules create here.

      2.2.1 - pm2 logs

      If you have pm2 installed it is possible to check for errors in a running system using the command

      pm2 logs
      

      You can add the flag --lines xx to include more lines.

      pm2 will throw out a tail of the last logs in three different categories: pm2 system logs, error logs, and info logs. You’re especally interested in the error logs (usually red), so have a look there for anything related to your module.

      2.2.2 - npm dev mode

      A more general way is to use the included npm dev mode.

      pm2 stop all
      npm start dev
      

      It is important to stop all instances of the mirror before starting here, otherwise the dev mode won’t work because the port (usually 8080) is blocked by the other instance.
      Above command will throw out all messages from the server side that are sent to the console and that you usually wouldn’t see.
      Here you can have a look if your module creates an error.
      If you want to post an issue to the forum or to github, it’s best to attach an output of this.
      You can stop the dev mode with ctrl+c.
      Then start pm2 again using the command pm2 restart mm or however the alias of your MM instance ins named.

      2.3 - Debugging main.js

      2.3.1 - Using the browser to debug front-end

      To debug the front-end side (anything that is in your main.js) you can use your browser on the laptop or computer. It is advised to use Chrome or Firefox.

      Open your browser and type into the address field

      http://magicmirror:8080
      

      Here you obviously need to use another host name (instead of magicmirror) if you have changed it. You will know whether you have. The general host name is magicmirror. You may have also changed the port in config.js. Use the one you chose.

      If you have a running system (via pm2, or one of the node commands node serveronly, npm start dev etc), your browser will build up the mirror frontend. Now press F12 (or ctrl+i) and you will see the so-called developer’s tools.
      Here you can choose between the console output, the DOM elements, debugging functions and possibly styling functions.
      For now you are looking for the ‘console’ part. Here you will find an output of messages, together with the .js file they are originating from. Found anything in red color? That will probably need to be fixed. Copy it and paste it together with your issue on github or on the forum.

      2.4 - Debugging config.js

      The config.js file is a challenge for new users. It is javascript code and gets included into the MM framework in runtime, meaning it needs to be free of any syntax errors.
      That is quite a challenge, especially if you’re using the console or simple text editors to edit config.js.
      Fortunately there is an easy-to-understand implemented config check (a so-called js linter).
      Run this in the Magic Mirror folder

      npm run config:check
      

      It will create an output showing all syntax errors.
      Move into the respective line in the config.js and find the error. If you use nano as editor for your console, don’t forget the -c flag which includes line numbers

      nano -c config/config.js
      

      Here is an example for a common output of the check:

      > magicmirror@2.10.1 config:check /home/pi/MagicMirror
      > node tests/configs/check_config.js
      
      Checking file...  /home/pi/MagicMirror/config/config.js
      Line 47 col 5 Expected ']' to match '[' from line 29 and instead saw '{'.
      Line 48 col 9 Expected '}' to match '{' from line 12 and instead saw 'disabled'.
      Line 48 col 17 Missing semicolon.
      

      Quite a big output for a missing comma.
      Try to read and work on the errors one by one. All errors may result from one source, like it does here.
      The only I did was missing a comma in line 46.

          {
              //disabled: true,
              module: "MMM-NavigationBar",
              position: "bottom_bar",
              config: {
              }
          }               <-- HERE the comma is missing!!!
          {
      

      So why the output?
      The linter reads config.js as a file containing javascript code. It starts with var config = { setting up the config as an object. Then, after declaration of some general config variables there is an array called modules:

      modules: [
          {
              module: "alert",
          },
          {
              module: "updatenotification",
              position: "top_bar"
          },
      ...
      

      The array consists of the module entries, each being an object (note the { and }, around every entry). Array items MUST be separated by comma, so every module entry needs to be closed with a },.
      When this comma is missing, the linter thinks the array is finished, expecting the ] that closes an array (in this case the modules-array).
      That is the reason for the first error message above:

      Line 47 col 5 Expected ']' to match '[' from line 29 and instead saw '{'.
      

      All further error messages are logical derivatives of this, and will vanish as soon as you add the comma.

      > magicmirror@2.10.1 config:check /home/pi/MagicMirror
      > node tests/configs/check_config.js
      
      Checking file...  /home/pi/MagicMirror/config/config.js
      Your configuration file doesn't contain syntax errors :)
      

      So again, check and clear out the errors one by one. If you don’t know what to do, post the error message and the respective line on the forum.

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • RE: axios request returns no data, while http request does

      No unfortunately not.
      Above addition did not help.

      I’m getting the feeling that the axios requests somehow closes before the data field is being returned. Haven’t tried much since it is not highest priority for me. But would appreciate any idea/suggestion.

      posted in General Discussion
      lavolp3L
      lavolp3
    • RE: MMM-Bring errors, not working

      @secdude ok thanks for clarifying.
      Still this promise rejection should be handled.
      I would send an issue on github.
      Unhandled promise rejections are not nice and rather easy to avoid.

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • RE: MMM-Strava

      @jawinemiller said in MMM-Strava:

      raspberrypi-IP-address:8080

      I think it’s in the description. Open raspberrypi-IP-address:8080/MMM-Strava/auth/ on another device and try authenticating your device.
      You need to authenticate the device to get access to the API.

      posted in Health
      lavolp3L
      lavolp3
    • RE: MMM-Strava

      @lavolp3 you can also include your IP subnet into the whitelist.
      I think there is even a description and some examples in the config itself.

      posted in Health
      lavolp3L
      lavolp3
    • RE: MMM-Strava

      @jawinemiller said in MMM-Strava:

      This device is not allowed to access your mirror.
      Please check your config.js or config.js.sample to change this.
      Anybody have any thoughts?

      You can set in your config:

      address: "0.0.0.0",
      ipWhitelist: [],
      

      or at least include your computer IP into the ipWhitelist.
      Only then you can access the mirror from another device.
      When you keep the whitelist empty every device (also external ones!!) will be allowed to access the mirror via browser.

      posted in Health
      lavolp3L
      lavolp3
    • RE: MMM-AVStock

      @thymon if it’s still an issue can you post an issue on github?
      I forget this when reading it only here.

      posted in Productivity
      lavolp3L
      lavolp3
    • RE: MMM-AVStock

      @thymon
      Try:

      1. setting width: 400 or any other value in the config.
      2. using other regions

      By default the module should expand to 100% width of it’s region. For some reason it expands to more than you would like.

      posted in Productivity
      lavolp3L
      lavolp3
    • RE: Deutsche Anleitung MagicMirror auf RaspberryPi 3

      @radioman said in Deutsche Anleitung MagicMirror auf RaspberryPi 3:

      Ich hab das mal versucht aber es verschiebt mir alle Kalender

      Das liegt daran dass .calendar die Referenz für alle calendar Module ist.
      Jedes Modul bekommt zusätzlich eine id die man zb im Browser mittels dev tools finden kann (weiß leidet keine andere Möglichkeit)
      Wem man diese id (z.b. #module_13_calendar) in css anspricht verschiebt sich nur der eine Kalender.

      posted in General Discussion
      lavolp3L
      lavolp3
    • RE: MMM-WeatherChart

      @Vauxdvihl that is most probably due to the region.
      If you want the image to cover the whole screen give the module the position: “fullscreen_above” or position: “fullscreen_behind”. Or position: “top_bar” to not overlap with other modules.
      Just an example.
      Otherwise you would need to give the region more space to show the rest of the image.

      posted in Utilities
      lavolp3L
      lavolp3
    • RE: MMM-WeatherChart

      @Vauxdvihl have you tried setting the option

      negativeImage: false, // whether or not the default white image should be inverted
      

      ?

      posted in Utilities
      lavolp3L
      lavolp3
    • 1 / 1