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

    Posts

    Recent Best Controversial
    • RE: when to use init , start, loaded of node helper

      @sdetweil your explanations helped a lot. I debugged using a timer in the node_helper to fake detecting different types of button press and my module will send magic mirror notifications. (So, if I can detect the actual physical events I’m pretty sure my script will work.

      I think it’s the node package I’m trying to use that is the problem.

      I even got so far as to figure out that a dependency of the package I want to used wasn’t compiled for Node version 16. which i what I’ve got running on my Mirror pi. I figured out it is c++ and even figured out how to recompile it with node-gyp and make. so now I do not get any errors in the pm2 error log. but now instead of a black screen electron, I don’t get electron opening a window at all. I check the PM2 logs. There are no errors in the mm-error log. It is blank.
      However, the pm2 mm-out log is being added to over and over, so electron and MagicMirror are running. and the error keeps being repeated in the mm-out log.

      The error which i’ve googled and gotten no working result for is:

      ERROR Error: Cannot find module 'bindings'. 
      

      Yet there is a bindings folder in the node_helper folder.
      Is there a way to find out what path is being used to try to find “bindings”.

      Or maybe the package I’m trying to use just is too much of a mess to keep screwing with. It sure seems like it would be super useful. I wanted to add a few physcial intermittant buttons and be able to assign multiple uses to them. Funny thing is… it works great when I run the test script in the command line using node.

      https://github.com/bnielsen1965/rpi-gpio-buttons

      By the way, this learning nodejs and module development is not all that easy.

      posted in Development
      kayakbabeK
      kayakbabe
    • RE: IR control of presentations?

      @DrFalken said in IR control of presentations?:

      Hey everyone - i’m looking to run https://revealjs.com/demo/ on MM, in a web browser module. I have a basic MM setup but otherwise a newbie :)

      The idea would be to able to able navigate through the slides with an IR remote (either mimicking keystrokes, or issuing api calls to the revealjs server.

      Does this seem realistic to do? Any pointers on implementation would be very helpful!

      As others have explained, MagicMirror won’t do what you want.

      To solve your need,
      There are presentation wireless “mice” which look like tv remotes which can do what you want, if you are using a computer to display your website on a screen.
      OR
      you could turn each slide of your presentation into a graphic image and load them on a usb stick. Most “smart” tv’s have the ability to display images from a usb stick and will allow you to adjust the settings so you can change pages by clicking on your tv’s remote control.

      posted in General Discussion
      kayakbabeK
      kayakbabe
    • RE: when to use init , start, loaded of node helper

      @sdetweil if start is for one time things, where would I do work that must be repeated endlessly like a sensor or button that needs to be constantly checked.

      If I have to init a node package that my module uses, I do that in start? so setting up in module variables is done in start?

      posted in Development
      kayakbabeK
      kayakbabe
    • RE: Possible to show Month View in lower corner?

      @BKeyport Your idea of the positioning system improvement is very interesting. I would at the least like to be able to insert subdivisions of middle_center and the others that are full width.
      In my case, I would like to have middle_center_left, middle_center_middle, middle_center_right. Perhaps we can insert into the DOM to create them and then delay loading of any module that is assigned to the location. Perhaps there is a way to manually handle that already, but I’ve not bothered yet. perhaps adding flex to the css of of middle_center would be sufficient. I suppose that is a bridge I will cross when I arrive there.

      posted in General Discussion
      kayakbabeK
      kayakbabe
    • when to use init , start, loaded of node helper

      I’m learning to write my own module and poking around on this forum. I am not sure about when to put code in the init, start, or loaded functions of the node helper. I’m basically starting with the SampleModule by Sam. I’ve got my script working from the operating system running it with “node myscript.js” and it even uses a node package (was really proud of myself over that). And now I want to make it into a module for MagicMirror.

      I’m wondering what and when to put code in init, start or loaded sections of the node_helper example?

      I’ve look at the modules repository for examples and it seem like its all over the place.

      Kelly

      P.S. I’m very new to node.js and this is my first from scratch attempt to do anything with it at all. I feel like I’m halfway there. But not I"m stuck.

      posted in Development
      kayakbabeK
      kayakbabe
    • RE: Possible to show Month View in lower corner?

      @sdetweil I agree with Sam or the dev ends up rewriting so much that it really isn’t mergable at all. Perhaps renaming and just a comment mentioning the idea came from so-and-so is better solution.

      posted in General Discussion
      kayakbabeK
      kayakbabe
    • RE: Black Screen after installing fonts-noto-color-emoji

      @aunrea did you run?
      first switch to the MagicMirror folder like this

      cd /home/pi/MagicMirror/
      

      then run this command

      npm run config:check
      
      posted in Troubleshooting
      kayakbabeK
      kayakbabe
    • RE: MMM-MYscoreboard no scores just times of the game.

      @teegray1124 I’m only displaying Major league Baseball right now but I do see scores. This module relies on different apis and scrapes some websites and any one of those could change and wouldn’t be the fault of the module. I think I also remember there is a setting for how many days to show something… I could be wrong.

      But you’ve got to give a lot more info If anyone using that module could try to help you.

      What league are you actually trying to display? What is your config for it?

      posted in Sport
      kayakbabeK
      kayakbabe
    • RE: NPM run start cannot be used

      @史新瑞

      Did you run /home/pi/Magicmirror/npm run check:config
      to verify your config.js?

      posted in Troubleshooting
      kayakbabeK
      kayakbabe
    • RE: Screen rotation and resizing

      @doubleT

      for the screen size, look in the magicmirror doc for the electron options, you’ll want the full screen option probably. but you can set width and height too. You make these changes in your magicmirror config.js

      When messing with modules and stuff, I generally set my screen size width and height to about half of my monitor so I can edit config and things comfortable on the same screen.

      tips:
      Ctrl+m will minimize electron and thus magic mirror, if you need to get to the desktop and are running full screen.

      click on teh electron instance then ctrl+r will reload magic mirror. That way you don’t have to completely stop and reload when you are messing with css or config. At least 90% of the time ctrl+r wll be enough.

      posted in Troubleshooting
      kayakbabeK
      kayakbabe
    • RE: Black Screen after installing fonts-noto-color-emoji

      @aunrea
      What is happening is that npm can’t find config:check in /home/pi/

      You have to move into the Magicmirror folder before running
      npm run config:check

      posted in Troubleshooting
      kayakbabeK
      kayakbabe
    • be able to set an array of addresses like ipWhiteList

      I often move a mirror between my parents home to my home so I can work on it. Or take mine to my parents to show them something new I did to mine, to see if they want the change on their mirror.

      It would be nice if I could set our mirrors address in the config.
      Lazy of me I know since all I have to do is edit it. BUT… it would be nice.

      posted in Feature Requests
      kayakbabeK
      kayakbabe
    • learning Python fubared my javascript

      I haven’t coded in python since my first attempt at a magic mirror. In the past couple of months I’ve built 2, a working one for my Dad and now another for me. First I decided that I needed to rewrite the MMM-Flick module because it was crashing my mirror. So, I dove into that. I abandoned the Flick because it really isn’t very reliable and am replacing that with buttons that turn the mirror display on and off and a small adafruit gesture sensor for changing screens. Python was a must. I made a mess but a working mess at that.

      Last week, I decided I liked all of Erik Flowers weather icons and that the default weather just didn’t use enough of them. Thus I needed to change the default weather module so it uses the openweathermap weather.id instead of the weather.icon. I’ve been working intermittently for a week and being super frustrated. Today I got the brilliant idea (DUH!) to use a syntax checker on it. Python syntax check… BOOM! DUH! I was putting python in a javascript. DUH! It doesn’t work. DUH!

      Just had to share that. 'Cause I laughed so hard my soda squirted through my nose. So now I have a mess of code to clean up and a wet puddle on my desk.

      I’m getting a cleaning rag after I hug myself in sympathy pains and pat myself on the back for figuring it out. If I could only figure out how to get 7 evenings of my life back now…

      posted in General Discussion
      kayakbabeK
      kayakbabe
    • RE: Three module issues from a new user

      @luisestrada

      I’ll swing it back to this thread…

      I got access to the extra fontawesome 6 by just copying the contents over the font awesome 4 in the vendors folder. NOT the right way to do it because it will get wiped out if I ever update my mirror. Correct me if I"m wrong, but I think it should have been a subfolder in the mm css folder in order to preserve it.

      Also I copied the provider file for openweathermap.js (and gave it a new name) and changed the constants for the weathertype to the following.

      (note, i have access to the pro fontawesome so I can use the duotone icons in my mirror).

      	/*
      	 * Convert the OpenWeatherMap icons to a more usable name.
      	 */
      	convertWeatherType(weatherType) {
      		const weatherTypes = {
      			"01d": "fa-duotone fa-sun", 
      			"02d": "fa-duotone fa-sun-cloud",
      			"03d": "fa-duotone fa-cloud-sun",
      			"04d": "fa-duotone fa-clouds-sun",
      			"09d": "fa-duotone fa-cloud-sun-rain",
      			"10d": "fa-duotone fa-cloud-showers-heavy",
      			"11d": "fa-duotone fa-cloud-bolt",
      			"13d": "fa-duotone fa-snowflake fa-spin-pulse",
      			"50d": "fa-duotone fa-sun-haze",
      			"01n": "fa-duotone fa-moon-stars night", 
      			"02n": "fa-duotone fa-moon-cloud night", 
      			"03n": "fa-duotone fa-clouds-moon night", 
      			"04n": "fa-duotone fa-cloud-moon-rain night", 
      			"09n": "fa-duotone fa-cloud-showers night", 
      			"10n": "fa-duotone fa-cloud-moon-rain night", 
      			"11n": "fa-duotone fa-cloud-bolt night", 
      			"13n": "fa-duotone fa-snowflake fa-spin-pulse night", 
      			"50n": "fa-duotone fa-cloud-fog night" 
      		};
      

      I think these used to be configurable for the old weather modules in the config.js, but now they are constants defined in the provider file. Make sense because each profider sends differnt weathertype codes and it would be really confusing for people help one another. But then you have geeks like us who ust keep digging and we can usually figure it out maybe with nudges in the right direction.

      For Openweathermap (OWM) those constands/weathertypes are based on the “icon” info that OWM sends. I thought about changing that to use the codes that OWM provides since ErikFlowers weathericons now have so many more weathericons and he actually provides a definition for the OWM codes to his icons too.

      I did the kickstarter to help Fontawesome create 6, so have all the paid version 6 icons too without subscription fees. I love their weather duotone icons and they do work on the mm if the css is set correctly. They work in the calendar too. I’m sure they’d also work with the same fixes in the third party modules. I think a lot of folks just used the default modules as models of how to build their own so a lot of the hard coded stuff (that should have been config enabled instead) just carried through to their own modules.

      All of us need to remember that Mich did this for himself and knew what he wanted. I probably would have hard coded it myself in that situation. We are lucky we have free access to what he began and gave to the public for free. I’m so glad he did. This is a great learning project with a great looking usable end product.

      posted in Troubleshooting
      kayakbabeK
      kayakbabe
    • RE: safer weather template by adding a remote config variable

      @sdetweil I totally get the difficulty in supporting people. I have been picking njk apart by examples already in the njk templates that I’ve found.

      posted in Feature Requests
      kayakbabeK
      kayakbabe
    • RE: Three module issues from a new user

      it would have been nice if the fontawesome 4 prefixes weren’t hardcoded into the module sources/templates. Would have made changing the icons to something else in so much easier.

      posted in Troubleshooting
      kayakbabeK
      kayakbabe
    • RE: safer weather template by adding a remote config variable

      @sdetweil true, and it also allows for a remote file, an extra config file if you will. I think the weather should do the same for it’s templates.

      posted in Feature Requests
      kayakbabeK
      kayakbabe
    • RE: Making a dashboard for a company

      @MagicBeginner Quite a few of the third party modules actually access a python script to do some processing. The gestures and sensor modules are great examples of that. If you need to use python in combination with the mm.

      posted in General Discussion
      kayakbabeK
      kayakbabe
    • safer weather template by adding a remote config variable

      The compliments module is great. I love the remoteFile config variable so that I can add my own custom list of special date messages and other things. The beauty is that a custom file of compliments doesn’t get erased upon updating the mm and is easy to copy to another mirror instance. It is also easy to find to add or alter the compliments.

      The weather module uses external template files like current.njk and forcast.njk. It is possible to modify them to make the weather appear as we like. But they are at risk of being overwritten by an update to the mirror.

      I think that having a weather module config variable for a custom template would make updating less stressful and easier.

      To that end I have modified my local weather module instance as follows.

      In the weather module weather.js defaults section I added

      	defaults: {
      		remoteTemplate: "current.njk",
      

      and I altered the getTemplate function to the following:

      	// Select the template depending on the display type.
      	getTemplate: function () {
      		
      		if (this.config.remoteTemplate !="") {return this.config.remoteTemplate}
      		 else {
      		
      			switch (this.config.type.toLowerCase()) {
      				case "current":
      					return "current.njk";
      				case "hourly":
      					return "hourly.njk";
      				case "daily":
      				case "forecast":
      					return "forecast.njk";
      				//Make the invalid values use the "Loading..." from forecast
      				default:
      					return "forecast.njk";
      			}
      	   }
      	},
      

      Thus, if I do not create or set a remote template, the module will not fail, it will get the template it should.
      But I want to use a custom template becuase I want control to the css tags used in the html so I can more easily customise the weather. I also wanted a different layout. So made copies of current.njk and forecast.njk and put them in the mm config folder. I also renamed them to be very clear they were my custom template.
      Then,
      in the weather section of my config.js
      I added the relative path to my custom template file.

      config: {
        remoteTemplate: "../../../../config/kellyforecast.njk",
      

      I actually have a custom version of current and forecast templates. I can quickly tweak the templates and not get into the folder structure of the mm default modules.

      I would like to contribute this to the mm repository.

      posted in Feature Requests
      kayakbabeK
      kayakbabe
    • RE: Little magic mirror (but not a mirror)

      @SJK this is very cool! This method could be used for an eInk type display. It’s really making me think those old pi zeros could be very useful again.

      posted in Show your Mirror
      kayakbabeK
      kayakbabe
    • 1 / 1