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

    Posts

    Recent Best Controversial
    • RE: compliments reduce font size and move down a little bit

      Hello @sdetweil
      I have a similar question: I want the compliments module to have the same appearance as the title of the newsfeed module.

      found in newsfeed-code:

      			if (!this.config.showFullArticle) {
      				const title = document.createElement("div");
      				title.className = "newsfeed-title bright medium light" + (!this.config.wrapTitle ? " no-wrap" : "");
      				title.innerHTML = this.newsItems[this.activeItem].title;
      				wrapper.appendChild(title);
      			}
      

      so i want the compliments style to be “bright medium light”

      the compliments code shows

      	getDom: function () {
      		var wrapper = document.createElement("div");
      		wrapper.className = this.config.classes ? this.config.classes : "thin xlarge bright pre-line";
      

      Im not sure how to modify the custom.css.
      Something like:

      .compliments .class {
      bright medium light;
      }
      

      Can you help me? :)

      posted in Custom CSS
      K
      keineAhnung123
    • RE: [Remote-Control] Shutdown, Configure and Update your MagicMirror

      Hello,
      Im trying to get a custom menu ready to send customized notifications via input fields.
      Sadly im not into JS.
      Can someone tell me how to get the value of an input field i added?

      my custom_menu.json:

      {
         "id": "custom",
         "type": "menu",
         "icon": "id-card-o",
         "text": "%%TRANSLATE:CUSTOM_MENU%%",
         "items": [{
               "id": "custom-item-1",
               "type": "item",
               "icon": "dot-circle-o",
               "text": "Next page",
               "action": "NOTIFICATION",
               "content": {
                  "notification": "INCREMENT_PAGE",
                  "payload": null
               }
            },
            {
               "id": "custom-item-2",
               "type": "item",
               "icon": "dot-circle-o",
               "text": "Last page",
               "action": "NOTIFICATION",
               "content": {
                  "notification": "DECREMENT_PAGE",
                  "payload": null
               }
            },
            {
               "id": "level2",
               "type": "menu",
               "menu": "custom",
               "icon": "bars",
               "text": "Send notifications",
               "items": [
               {
                   "id": "custom-item-3",
                   "type": "input",
                   "icon": "dot-circle-o",
                   "text": "Notification",
                   "action": null,
                   "content": null
               },
               {
                   "id": "custom-item-4",
                   "type": "input",
                   "icon": "dot-circle-o",
                   "text": "Payload",
                   "action": null,
                   "content": null
               },
               {
                   "id": "custom-item-5",
                   "type": "button",
                   "icon": "dot-circle-o",
                   "text": "Send",
                   "action": "NOTIFICATION",
                   "content": {
                        "notification": null,
                        "payload": null
                   }
               }
               ]
            }
         ]
      }
      

      The button (last entry) should now send an notification with the values from the input fields above.
      something like this:

               {
                   "id": "custom-item-5",
                   "type": "button",
                   "icon": "dot-circle-o",
                   "text": "Send",
                   "action": "NOTIFICATION",
                   "content": {
                        "notification": "custom-item-3".value,
                        "payload": "custom-item-4".value
                   }
               }
      

      So how can i get the value from my input items?
      Thanks :)

      And another question. Is there a security problem when im neither using an ApiKey nor the secureEndpoints? Im using it in my private secured wifi with only me inside.

      posted in System
      K
      keineAhnung123
    • RE: MMM-Navigate, Navigation inside MagicMirror with Rotary Encoder

      @AxLed Now it works with gpio=16=ip,pu
      Do the changes in boot.txt affect the Raspberry Pi in any way i have to know?

      Thanks a lot so far :)

      posted in System
      K
      keineAhnung123
    • RE: MMM-Navigate, Navigation inside MagicMirror with Rotary Encoder

      Hello @AxLed

      first

      • Idea A: didnt solve the problem. Still no click
      • Idea B: I tried capacitors and software debouncing. Still no click

      I will use this python script to get the click working:

      import RPi.GPIO as GPIO
      GPIO.setmode(GPIO.BCM)
      BUTTON_PIN = 16
      GPIO.setup(BUTTON_PIN, GPIO.IN, pull_up_down = GPIO.PUD_UP)
      

      and start it within node_helper.js:

      var child_process = require('child_process');
      
      module.exports = NodeHelper.create({
      	// Subclass start method.
        start: function() {
      		var self = this;
      		this.loaded = false;
      		this.createRoutes();
      		child_process.execFile('python', ['/home/pi/MagicMirror/modules/MMM-Navigate/ky-040-initialisieren.py']);
      	},
      

      Now it works.

      Btw: In intializeRotary-function (node_helper.js) there ist a CLK and DT.read and also a CLK and DT.watch instruction. For the SW there is only a SW.watch but not a read instruction. Is that right? Just wanted to mention. Im not an expert in programming.

      third
      Yes, the error is gone :)

      posted in System
      K
      keineAhnung123
    • RE: MMM-Navigate, Navigation inside MagicMirror with Rotary Encoder

      @AxLed
      I will try that later. Thanks
      And yes, i want to start MMM-Navigate hidden. Is that possible?

      posted in System
      K
      keineAhnung123
    • RE: MMM-Navigate, Navigation inside MagicMirror with Rotary Encoder

      Hello @AxLed , thanks for your reply

      first

      • rotation works fine but the button press does not
      • i use your standard configuration so it seems to be BCM 19
      • PI 3 B+, stretch, MM 2.14.0

      I tried MMM-Buttons too. Same problem there. I first have to run a sample script with python and after that the button works in MM too. It uses the onoff library too.

      I found a strange behaviour:
      I start MM -> button click doesnt work
      I start python test script and after that MM -> button click works
      When i restart the Raspberry PI and start MM (without the python test script) -> button click works
      When i shutdown the Raspberry PI and cut off the connection to an electricity source and restart the PI after that -> button click doesnt work

      Thats strange isnt it?

      second

      I changed the hiding time from 10000 to 2000 cause i prefer a shorter time.
      Is there a way to start the module hidden?
      I tried following:

          // Define start sequence.
      
          start: function() {
      
              Log.info("Starting module: " + this.name);
      
              this.sendConfig();//pass config to node_helper.js
      
              this.hide();
      
          },
      

      and this

          //Helper, to use module without Rotary Encoder and without GPIO Pins, like developing in Pixel VM
      
          notificationReceived: function(notification, payload) {
      
              if(notification === "CW" || notification === "CCW" || notification === "PRESSED"){
      
                  this.naviaction({inputtype: ""+ notification +""});
      
              }
      
              if(notification === "SHELLCOMMAND"){
      
                   this.sendSocketNotification(notification, payload);
      
              } 
      
              if(notification === "MODULE_DOM_CREATED"){
      
                   this.hide();
      
              }
      
          },
      

      but both didnt take effect :(

      third

      I found an reproducable error:
      When i start MM and first rotate counterclockwise there is an error in the MM console:

      [09.01.2021 09:11.07.337] [LOG]   MMM-Navigate, listen on GPIO PINs (BCM): 26,20,19
      
      [09.01.2021 09:11.18.306] [ERROR] Whoops! There was an uncaught exception...
      [09.01.2021 09:11.18.321] [ERROR] ReferenceError: lastdir is not defined
          at tick (/home/pi/MagicMirror/modules/MMM-Navigate/node_helper.js:92:39)
          at /home/pi/MagicMirror/modules/MMM-Navigate/node_helper.js:66:4
          at /home/pi/MagicMirror/modules/MMM-Navigate/node_modules/onoff/onoff.js:135:9
          at Array.forEach (<anonymous>)
          at pollerEventHandler (/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/onoff/onoff.js:134:32)
      

      It doesnt effect the functionality but just wanted to mention it… ;)

      posted in System
      K
      keineAhnung123
    • RE: MMM-Navigate, Navigation inside MagicMirror with Rotary Encoder

      Hello @AxLed ,

      Two things:

      First

      I have the same issue like @Eisblume :

      The click doesnt work.
      When i then start a sample code to test the rotary encoder (from like here), the click works in the sample code.
      If i start the Magic Mirror after that again, then the click works there too.

      Maybe there is a missing initialization of the rotary encoder in your code?

      Second

      Is there a possibility to get more config possibilities?
      Like starting the module hidden or shortening the time of the hiding process?

      Thanks in advance :)

      posted in System
      K
      keineAhnung123
    • RE: Can't install MMM-Navigate

      @sdetweil
      Thank you, that worked.
      Is there a reason why 10.23 and not the newest 14.15.3 or 15.0?

      posted in Troubleshooting
      K
      keineAhnung123
    • RE: Can't install MMM-Navigate

      @sdetweil

      sudo apt remove nodejs
      sudo apt install nodejs
      

      still Version 9.11.2 :(

      posted in Troubleshooting
      K
      keineAhnung123
    • RE: Can't install MMM-Navigate

      @sdetweil

      pi@raspberrypi:~ $ node -v
      v9.11.2
      pi@raspberrypi:~ $ npm -v
      6.14.10
      

      node seems to be outdated?
      I will try to update it

      posted in Troubleshooting
      K
      keineAhnung123
    • 1
    • 2
    • 3
    • 2 / 3