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

    Posts

    Recent Best Controversial
    • RE: MMM-Page-Selector: A page switcher that can set positions of modules

      Sorry for taking a bit to get back to you.
      You shouldn’t need to put the pages: 3 in the Page Indicator config as that should be handled automatically.
      In order to get at the root of the problem, I would need to have the configs for you other modules since all pages are implicitly declared to exist inside the pages object of your modules.
      For example:

      {
          module: "MMM-a-module",
          position: "bottom_center", 
          pages: {"pageOne": "top_center", "pageTwo": "bottom_left"},
          config: {}
      },
      

      is defining two pages with the names pageOne and pageTwo and then saying that this module will appear at the top_center and bottom_left positions on those two pages respectively.
      I am assuming that something went wrong with the pages objects which is causing some problems.
      If you post those I will probably be able to figure out the problem.

      posted in System
      V
      Veldrovive
    • RE: How to run as "https"?

      As a slightly more easy to deal with version, you can just add

      var server = require("http").Server(app);
      if(config.useHttps){
          var options = {
              key: fs.readFileSync(path.join(config.httpCertPath, "key.pem")),
              cert: fs.readFileSync(path.join(config.httpCertPath, "cert.pem"))
          }
          server = require("https").Server(options, app);
      }
      
      
      var io = require("socket.io")(server);
      

      in the same server.js file right under the var Server = function(config, callback) { line.
      In your config.js, you can modify it to be

      var config = {
          useHttps: true,
          httpCertPath: "ABSOLUTE_PATH",
      }
      

      and then you can switch back and forth if you need.

      posted in Troubleshooting
      V
      Veldrovive
    • RE: How to run as "https"?

      As far as I know, it is pretty simple.
      In your js/server.js file, you are going to want to convert the http server it is using to an https one.
      First thing you are going to want to do is to create a self-signed certificate which is explained much better than I can on stack overflow.

      You can store those in any folder you want, but I just put them under js/https/* in order to have them close by.

      Then, in the server.js file, comment out var server = require("http").Server(app); near the top of the file. Underneath the imports, add a line importing your key and cert like so:

      var options = {
        key: fs.readFileSync(path.join(__dirname, "/https/key.pem")),
        cert: fs.readFileSync(path.join(__dirname, "/https/cert.pem"))
      };
      

      Underneath that, insert the line var server = require("https").Server(options, app); to substitute an https server for the http one. Finally, copy the line var io = require("socket.io")(server); below that and start your mirror.

      posted in Troubleshooting
      V
      Veldrovive
    • RE: MMM-Bob-Ross: For putting a happy little painting up on your mirror

      Looking back on my config convention, it’s really confusing. autoPlay does not mean that the video plays right when the mirror boots up, it means that when the view is switched to video by use of the notification it plays without any more need for interaction. The play feature is mostly meant to be used with voice modules and I specifically developed it to work with my own in which all you would need to do to get it to work would be to add the module and put the following into your config.js

      {
          module: MMM-Voice-Commands,
          config: {
              commands: {
                  "play video": "ROSS_PLAY_VIDEO",
                  "stop video": "ROSS_SHOW_IMAGE"
              }
          }
      }
      

      Now when you say play video, it will switch to the video view and when you say stop video, it will switch back to the painting.
      However, using MMM-Voice-Commands is not necessary, any module that can be configured to emit a notification to ROSS_PLAY_VIDEO and start the video.

      There isn’t much I can do about the low definition pictures. That is just the quality the website I am using has them in. That’s why I put the module in the lower left hand corner and made it small; it still looks like a nice nature scene, but the low resolution is unobtrusive.

      posted in Entertainment
      V
      Veldrovive
    • RE: How to keep a history of values on Mirror

      The only way I could see not having to modify other modules would be to only use modules that already emit notifications when events happen. Then all you would need to do is create a simple module that receives, saves, and recalls those notifications and looks for changes. You could use something like json-store to make the whole process even easier. If you wanted to get more information, you could do a very simple modification to modules to just spit out more notifications with more data.

      posted in General Discussion
      V
      Veldrovive
    • MMM-Bob-Ross: For putting a happy little painting up on your mirror

      Demo
      Bottom Left Corner

      Description

      Bob Ross is the quintessential wholesome TV guy, and now he can be on your mirror too. His paintings of nature scenes are sure to put you in a good mood and his voice could calm a charging bull so about what you need after a stressful day.

      Usage

      modules: [
          ...
          {
            module: "MMM-Bob-Ross",
            position: "bottom_left",
            config: {
              imgHeight: "30vh", //Defines the height of the painting.
              videoHeight: "30vh", //Defines the height of the video.
              updateInterval: 1*60*60*1000, //How often does the painting change?
              autoPlay: true //Should the video start as soon as it switches?
            }
          }
          ...
        ]
      

      More specifics available on the GitHub page.

      Interaction

      Any other module can control the behavior of MMM-Bob-Ross through the notification system. For specifics of the notifications and payloads, refer to the GitHub page.

      posted in Entertainment
      V
      Veldrovive
    • RE: Skyscanner Flight Prices

      I do not know of any modules that do this, but it would not be difficult to create given an api.

      Skyscanner does have such an api, but the lowest tier it seems to be geared towards small companies and not individuals. The next option to attempt would be to do some small scale friendly web scraping, but it seems that they specifically banned that in their robot.txt and tos (h).

      At a glance, another option could be the Travel Payouts API as they appear more friendly to personal use. However, it would require a few more google searches to see if it really is a good fit.

      posted in Requests
      V
      Veldrovive
    • RE: MMM-Page-Selector: A page switcher that can set positions of modules

      @mrmidi said in MMM-Page-Selector: A page switcher that can set positions of modules:

      https://github.com/manifestinteractive/MMM-Leap-Motion

      I’m glad that you’re finding this module useful. I usually only get to work on these types of projects in bursts so it’s good that I happened to get an update out to shift the pages configuration to something a little more… not horrible.

      I think I have a leap controller around somewhere so I’m going to have to dig it out and try your module.

      My next update is going to be a system to specify custom notification names so PAGE_SELECT isn’t mandatory and incrementing and decrementing pages is easier. Using the new system, it should be easy to interface with your module just through the config.

      posted in System
      V
      Veldrovive
    • MMM-Page-Selector: A page switcher that can set positions of modules

      I just finished up the final touches on MMM-Page-Selector and I feel like it turned out quite well. I couldn’t find a module that would do pages/profiles the way I wanted them done so I created my own.

      Description

      Well, it’s pretty simple. You define the page names and positions and then Page-Selector manages the visibility and positions of your modules to give you a seamless transition between fully configurable pages.

      demo

      On top of just switching visibility of modules, the position can also be swapped in an aesthetically pleasing way.

      Basic Usage

      Setting up pages is easy, all you need to do is add

      pages: {"page_name_one": "position", "page_name_two": "another_position"}
      

      below the position string in its config for any modules you want to appear on separate pages.
      For more information, look at the GitHub page

      Interaction

      This was developed alongside MMM-Voice-Commands so it works well with that. I also added support for MMM-page-indicator, but it is also really easy to add support to any other module. To switch pages, simply send a notification to “PAGE_SELECT” with a payload that contains either the name of the page as a string or the index of the page.

      There have been no major issues I have seen with compatibility while I have been developing, but that doesn’t mean they don’t exist. If you find any, feel free to create an issue on github or reply below.

      posted in System
      V
      Veldrovive
    • RE: Is it possible to have custom information for each module in the config file?

      After trying out the method of importing the config, it works well and seems to be stable. If anyone has any reason why not to require the config.js in a node_helper file, I would appreciate an explanation.

      posted in Development
      V
      Veldrovive
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 5 / 6