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

    Posts

    Recent Best Controversial
    • RE: MMM-ResRobot - Public transport information for Sweden

      Hi,
      you need to specify a station id in “from” as well. “from” is used to find the station’s departures, “to” is used to differentiate between destinations going from the “from” station.

      Change “from” to ‘from: “740000950,740000950”’ to make it work as you want.

      posted in Transport
      AlvingerA
      Alvinger
    • RE: MMM-ResRobot - Public transport information for Sweden

      New version out with one minor change: transportation type icons are now displayed (to the left of the linenumber). All rail-bound types are displayed as trains (fa-train), all buses are displayed as bus (fa-bus) and all waterborne transportation is displayed as ship (fa-ship).

      posted in Transport
      AlvingerA
      Alvinger
    • RE: MMM-ResRobot - Public transport information for Sweden

      @Notumlord and @Klzow, I think I have found the issue. When the ResRobot API call failed for some reason the next update was never scheduled resulting in a “freeze”. I have pushed an update to github which schedules an update when the API call fails. (In my case the ResRobot site returned a “site unavailable” error every now and then which froze the module) Sorry for the bug!

      posted in Transport
      AlvingerA
      Alvinger
    • RE: MMM-ResRobot - Public transport information for Sweden

      Hi,
      I copied your config and eslint complained about the quote characters. Make sure that you use the standard " character, not “ or ”.
      Using your config with my apiKey works as it should.
      /j

      posted in Transport
      AlvingerA
      Alvinger
    • RE: MMM-ResRobot - Public transport information for Sweden

      Hi,
      Could you please post your config? It seems that MMM-ResRobot is never executed.

      posted in Transport
      AlvingerA
      Alvinger
    • RE: MMM-ResRobot - Public transport information for Sweden

      @Klzow, I’ve noticed the same but thought it had to do with the fact that I’m running of a first-generation pi with 256MB. Will look into it to see if I can find out why.

      posted in Transport
      AlvingerA
      Alvinger
    • RE: SSH startup

      Also make sure that you enable X forwarding in the ssh call, e.g. ssh -X user@host.

      posted in Troubleshooting
      AlvingerA
      Alvinger
    • RE: Adding Modules... Please Please advise

      I think the error is that the line

      		module: 'alert',
      

      has a trailing comma, it should read

      		module: 'alert'
      
      posted in General Discussion
      AlvingerA
      Alvinger
    • Different looks based on browser / user-agent

      I do realize that this is probably off-topic for the bulk of the users.

      I intend to run multiple mirrors off of one server instance. I will have one “complete” Magic Mirror installation (including physical mirror) but want to show the content on several other screens, not all of them mirrors!

      There is a very simple way of doing this and that is selecting showed content based on browser / user-agent strings. In my case I will use the Midori browser (and maybe Chromecast) for mirrors. All my other devices will use Chrome. So anything with Chrome in the user-agent will be shown a custom theme while the rest will show the “standard” theme.

      To accomplish this the user-agent needs to be saved so that the CSS can select theme based on it. I did a quick hack of index.html in the MagicMirror folder. I added the following right after the -tag:

      <script>
        var b = document.body;
        b.setAttribute("data-useragent"), navigator.userAgent);
        b.setAttribute("data-platform"), navigator.platform);
      </script>
      

      I can then use custom.css to define a different look based on the above. In my case I wanted to have something other than a black background, i.e. a different background image. To get this I added the following in custom.css:

      body[data-useragent*="Chrome"] {
        background-image: url("background.jpg");
      }
      

      This works great (I had to put the background.jpg in the css folder but I am sure there is another way).

      Now I just need to figure out how to set values in config.js to customize the modules shown. Any suggestions?

      posted in General Discussion
      AlvingerA
      Alvinger
    • RE: MMM-ModuleScheduler - Module Schedules and Notifications

      @ianperrin @Jopyth: sorry, wasn’t aware that MMM-Remote-Control had that ability. I would recommend MMM-Remote-Control instead of MMM-tvservice to the general user as it covers all functionality needed.

      MMM-tvservice is more for the linux enthusiast who wants a program to do one thing and one thing only. I am not running MagicMirror through PM2 but rather directly via systemd so I cannot use all functionality of MMM-Remote-Control without editing the source. Also, as I am running through systemd I do not need to prefix the commands with sudo as the service already runs as root.

      posted in System
      AlvingerA
      Alvinger
    • RE: MMM-tvservice

      @paphko: the config is not the MMM-tvservice config, it is the MMM-ModuleScheduler config. I am using that module to send the notifications. Send your suggestions to @ianperrin who is the author of MMM-ModuleScheduler.
      However, as the MMM-ModuleScheduler needs to be generic in order to cover a vast number of use cases I think that this added complexity is not an issue.

      posted in System
      AlvingerA
      Alvinger
    • RE: MMM-ModuleScheduler - Module Schedules and Notifications

      @ianperrin @cowboysdude
      Check out my new module MMM-tvservice in the System section of the forum. I took the idea from @ianperrin when he suggested a module to act on notifications.

      posted in System
      AlvingerA
      Alvinger
    • MMM-tvservice

      MMM-tvservice is a module that turns HDMI On or Off using the tvservice program.

      I got the idea from @ianperrin when he implemented notification functionality in MMM-ModuleScheduler. I highly recommend this module for scheduling On and Off times for MMM-tvservice.

      Check out the README ad https://github.com/Alvinger/MMM-tvservice.

      posted in System
      AlvingerA
      Alvinger
    • RE: MMM-ResRobot - Public transport information for Sweden

      @MrH, ResRobot (Samtrafiken) had a service window between between 22.00 and 24.00 on October 10th. That was probably why you didn’t get a response then.

      I will have a look this evening using your station ids.

      posted in Transport
      AlvingerA
      Alvinger
    • RE: MMM-ResRobot - Public transport information for Sweden

      According to Trafiklab site Skånetrafiken is included in ResRobot so it should work.
      Can you post your config?

      posted in Transport
      AlvingerA
      Alvinger
    • RE: MMM-ModuleScheduler - Module Schedules and Notifications

      @ianperrin
      It works! It was probably the code update that fixed even though I also simplified the cron expression.

      All my other schedules (which hides, not dims, modules) worked before even with arrays having double quotes and leading zeroes. And they still work.

      Great work @ianperrin, and thank you for a must-have module!

      posted in System
      AlvingerA
      Alvinger
    • RE: MMM-ModuleScheduler - Module Schedules and Notifications

      I can’t get the dimLevel to work on the clock. I have the following config:

      {
       module: "clock",
       position: "top_left",
       classes: "scheduler",
       config: {
        module_schedule: [
         {from: "00 06 * * *", to: "30 09 * * *", dimLevel: "50"},
         {from: "00 16 * * *", to: "30 22 * * *", dimLevel: "50"}
        ]
       }
      },
      

      When the time reaches “to” the clock just disappears rather than being dimmed.

      What am I doing wrong? (I am running the latest version of the module)

      posted in System
      AlvingerA
      Alvinger
    • RE: MMM-ResRobot - Public transport information for Sweden

      It might be. I can’t control what replies ResRobot gives for a specific search. According to its documentation it should only return the result matching the from and to parameters. I’ll do some additionsl checking but you could try the search without a “to” valur to see if there is a difference.

      posted in Transport
      AlvingerA
      Alvinger
    • RE: MMM-ResRobot - Public transport information for Sweden

      @Notumlord
      When I use your from: and to: I only get departures from Svingeln. I do get a lot of replies but cannot determine if they are all going in the same direction. As far as I can tell they are all departures from Svingeln, not arrivals.

      There is a comment in the documentation of the ResRobot API which states that in some situations duplicate data is returned (has to do with real time information). My guess is that it whas just something with the data.

      If you want to troubleshoot you can uncomment the print of “body” in node_helper.js, this will print the json-reply from ResRobot.

      posted in Transport
      AlvingerA
      Alvinger
    • RE: MMM-ResRobot - Public transport information for Sweden

      Hi,
      Can you post your config?

      posted in Transport
      AlvingerA
      Alvinger
    • 1 / 1