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: Turning TV on/off via PIR sensor - current problem: TV displays "No Signal" screen

      @mcmalone said in Turning TV on/off via PIR sensor - current problem: TV displays "No Signal" screen:

      @mcmalone I don’t know exactly why but the following solution worked for me.

      Posting my solution for others in the future and also so that maybe someone in the future can explain to me why this works (and maybe a more efficient solution).

      I changed the monitor_on.sh and monitor_off.sh files to read, respectively:

      DISPLAY=:0 xscreensaver-command -deactivate
      

      and

      DISPLAY=:0 xscreensaver-command -activate
      

      Before I made these changes, I also configured xscreensaver by running xscreensaver-demo in the terminal, then on my monitor connected to the Pi, a preferences box pops up. I selected “black screen” from the options so that when the screensaver activates through the above files, it will be a black screen (no backlight).

      With this procedure you are turning on the screensaver (which is set to black) instead of turning the screen off.
      It may serve as a solution wiht regard to the picture, but keep in mind that 1) a black screen is brighter than a screen turned off (except you have an oled screen) 2) you are wasting power.
      My screen consumes ~ 20W running, my pi consumes ~ 2W.
      I’d rather have the screen turned off in absence of any person.

      Still, I had the same problem for some time.
      Last time I tried the MMM-NewPIR module it worked for me. That one has a configuration option for the different modes (display_power vs tvservice).
      You may have a look into that module.

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • RE: MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast

      @j-e-f-f That looks REALLY tasty! Thank you for the great work!

      posted in Utilities
      lavolp3L
      lavolp3
    • MMM-Picnic

      This is a module that allows you to view your Picnic status using your picnic login data. It uses the npm module picnic-api by MRDVH.

      Picnic is a groceries delivery service established in Netherlands and Germany.

      Download the module here

      Screenshot:

      screenshot

      Version 1.0.0, not tested too much, so let me know any issues you have.
      Best to post them on github, Im not here that often currently.

      Enjoy!

      posted in Utilities
      lavolp3L
      lavolp3
    • RE: MMM-rain-forecast

      @jermaine171993 I’m working on it but have to say that the climacell data is very disappointing for Germany, where I live.
      I will publish it so you can test out Texas :-)

      posted in Utilities
      lavolp3L
      lavolp3
    • RE: Adding Outline Around Modules

      @adavidsohn96 you need to adjust css/custom.css and include something like this

      .module {
        border: 1px solid white;
        border-radius: 5px;   
      }
      

      Every module gets a .module class as reference for css.
      ALso have a look at the module MMM-fast-css (something like this). It provides you with style presets.

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • RE: Integrating an npm module that uses import

      @sdetweil @strawberry-3-141
      I can’t get it working.
      node 14.15 installed.

      When I require the “picnic-api” npm module the usual way I get the error message inside the "picnic-api module.

      import axios from "axios";
      ^^^^^^
      
      SyntaxError: Cannot use import statement outside a module
      

      When I do the import like described in the readme the error originates in my node_helper.js

              import PicnicClient, { CountryCodes, ImageSizes, HttpMethods } from "picnic-api";
              ^^^^^^
      
      SyntaxError: Cannot use import statement outside a module
      

      I’m lost. At least the environment of the picnic-api module should be a “pure node” environment, why does the import not work at least in that module?

      Changing the index.js inside picnic-api to an .mjs does not help.

      Any more ideas?

      posted in Development
      lavolp3L
      lavolp3
    • RE: Integrating an npm module that uses import

      @sdetweil that’s not sufficient. There are two more modules imported by the picnic-api module. I could require them all in node_helper but that looks too of much a workaround for me. There should be another way.

      posted in Development
      lavolp3L
      lavolp3
    • RE: Integrating an npm module that uses import

      @strawberry-3-141 said in Integrating an npm module that uses import:

      @lavolp3 which version of nodejs are you running? import is a feature of es6 modules. You can try to enable it like this https://stackoverflow.com/a/45854500

      Thanks for the tip. Upgraded to node.js 14.15 but did not work yet.
      Seeing "type": "module in my package.json also did not help.
      I will have to have a closer look at the link

      posted in Development
      lavolp3L
      lavolp3
    • Integrating an npm module that uses import

      HI all,

      I am trying to write a module around the npm module picnic-api that uses the import function instead of require

      import axios from "axios";
      

      This does not work within the Magicmirror environment, I get an error message when I start the mirror.

      [13.02.2021 07:21.43.938] [ERROR] /home/pi/MagicMirror/modules/MMM-Picnic/node_modules/picnic-api/index.js:1
      import axios from "axios";
      ^^^^^^
      
      SyntaxError: Cannot use import statement outside a module
      

      Does anyone have a solution for me?
      Is there a way to use it or do I need to rewrite the npm module?

      posted in Development
      lavolp3L
      lavolp3
    • RE: MMM-rain-forecast

      @Wenike @jermaine171993 I’m working on somthing similar based on the climacell API (providing worldwide data). Will be ready in a few days.
      Currently working on https://github.com/lavolp3/MMM-Buienalarm/tree/climacell

      Will move to a new rep soon.

      posted in Utilities
      lavolp3L
      lavolp3
    • 1 / 1