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

    Posts

    Recent Best Controversial
    • RE: Snowbound on node.js

      Node_helper.js runs a pythonshell when getting a notification from the module.

      Ah! It’s not running in the same environment as it does from the command line.

      Is that fixable? Would running it as a child process help?

      posted in Troubleshooting
      G
      grantc66
    • Snowbound on node.js

      I’ve created a python script to interface with the mirror to do a follow a few simple instruction (play internet radio, adjust volume etc). This works well, but it is a bit irritating that every phone in the local area tries to respond as well as the mirror.

      So I integrated snowboy as a front end to activate Google’s listener. This works perfectly when running from a terminal but doesn’t respond when the python is called from the node helper.

      Can somebody explain why the same code doesn’t run when it’s initiated from the node helper?

      Sorry if it’s a bit of a basic question. I’ve tried googling but I can’t find anything that appears relevent.

      posted in Troubleshooting
      G
      grantc66
    • RE: Black screen after MM v2.4.0 update.

      Not sure if I’m having the same issue, stupidly updated electron as npm was claiming 1.7.13 had a critical vulnerability (after installing MMM-voice) Then got the backscreen issue. rolled back electron to 1.7.13 & the issue persists.

      Node v9.11.1
      npm 6.1.0

      Thought I’d uploaded the log file but not sure if others can see it. That snippet below is the first error after ALL_MODULES_STARTED

      13:01:19.440 main.js:40 Uncaught TypeError: Cannot read property ‘appendChild’ of undefined
      at main.js:40
      at Array.forEach ()
      at createDomObjects (main.js:24)
      at Object.modulesStarted (main.js:471)
      at startModules (loader.js:59)
      at loader.js:40
      at HTMLLinkElement.stylesheet.onload (loader.js:203)
      (anonymous) @ main.js:40
      createDomObjects @ main.js:24
      modulesStarted @ main.js:471
      startModules @ loader.js:59
      (anonymous) @ loader.js:40
      stylesheet.onload @ loader.js:203

      13:01:20.056 TypeError: Cannot read property ‘getElementsByClassName’ of null
      at moduleNeedsUpdate (main.js:176)
      at main.js:144
      at Promise ()
      at updateDomWithContent (main.js:137)
      at main.js:119
      at
      Promise rejected (async)
      (anonymous) @ main.js:121
      Promise resolved (async)
      (anonymous) @ main.js:118
      updateDom @ main.js:109
      updateDom @ main.js:514
      updateDom @ module.js:358

      Any pointers as to how to get it working again? It was working perfectly before MMM-voice & buggering around with electron.
      Tried a fresh install with the same result :(

      posted in Troubleshooting
      G
      grantc66
    • RE: MMM-Pir-Sensor - Hue lights control

      I found it to slow running it through the mm, maybe cause I’m running it from a pi0.
      So I run the PIR python script (it also does the led strips) as a background task outside of mm enabled at boot via crontab.
      It’s more responsive and seems to use less resources.

      posted in Troubleshooting
      G
      grantc66
    • RE: Switch off the display - how to ?

      Not sure if I understand the issue.

      You want to inhibit the screensaver?

      I have a script in the startup:

      #!/bin/sh
      xset -dpms # disable DPMS (Energy Star) features.
      xset s off # disable screen saver
      xset s noblank # don’t blank the video device
      unclutter & # loose the cursor

      This works for me on a Pi0 which doesn’t have a desktop, might be different if you have a console loaded at boot.
      Others have mentioned installing the screensaver app and using that to inhibit the display blanking.

      If you want to switch the display from a phone, try RasPiCheck (available from Google Play) & set up a couple of console commands:

      vcgencmd display_power 1 # for on
      vcgencmd display_power 0 # for off

      you’ll need SSH switched on in the Pi config & know the Pi ip-address.

      posted in Troubleshooting
      G
      grantc66
    • RE: MMM-forecast-io -- Localized up to the minute weather

      @rak Had the original working OK, tried to npm install chart.js in the MM root :(

      the npm install in the MMM-foecast.io directory fixed it. :)

      looks great, good work.

      thanks

      posted in Utilities
      G
      grantc66
    • RE: MMM-forecast-io -- Localized up to the minute weather

      @rak There seems to be a small error in the script creating the graph:

      // Init chart.js
      this.chart = new Chart(ctx, {
        type: 'line',
        data: data,
        options: options
      });
      

      Throws an uncaught reference error. Unfortunately I know absolutely nothing about js, can you let me know how to fix it.

      Ta

      posted in Utilities
      G
      grantc66
    • RE: MMM-Buttons calling MMM-Remote config help

      I was thinking that MMM-Remote-Control was sending the notification, hence the confusion.

      Cleaned the config up to look like this:

      {module: 'MMM-Buttons',
          config: {
              buttons: [
                  {
                      pin: 32,
                      name: "monitor_control",
                      longPress: {
                          notification: "REMOTE_ACTION",
                          payload: {"action": "HIDE", "module": "module_1_clock"}
      		},
                      shortPress: {
                          notification: "REMOTE_ACTION",
                          payload: {"action": "SHOW", "module": "module_1_clock"}
      		}		    
           		}
      	]
      }},``
      

      Can I add another payload from the same action i.e. hide clock & calendar?

      Not had any success with that so far, can somebody give me a pointer to the syntax.

      Ta.

      posted in Troubleshooting
      G
      grantc66
    • MMM-Buttons calling MMM-Remote config help

      Hi, bit new to linux only got a pi 3 months ago and its been a bit of a steep learning curve.

      I’m having a bit of trouble understanding how to configure config.js What I’m trying to do is get MMM-Buttons to send a message to MMM-Remote to hide a module.

      Everything runs ok (remote hides modules when access from my phone), but pressing the button does nothing. I’m guessing I’ve misunderstood how to configure the payload.

      Config for Buttons looks like this:

      {module: 'MMM-Buttons',
          config: {
              buttons: [
                  {
                      pin: 32,
                      name: "monitor_control",
                      longPress: {
                          notification: "REMOTE_ACTION",
                          payload: {action: "HIDE", "moduleData":[
          {"hidden":true,"name":"clock","identifier":"module_1_clock","position":"top_left"},],},},
                      shortPress: {
                          notification: "REMOTE_ACTION",
                          payload: {action: "SHOW","moduleData":[
          {"hidden":false,"name":"clock","identifier":"module_1_clock","position":"top_left"},],},}		    
           		}]
      },
      

      config for remote section (same file config.js)

      {
          module: 'MMM-Remote-Control',
      position: "bottom_bar"
          // uncomment the following line to show the URL of the remote control on the mirror
          // , position: 'bottom_left'
          // you can hide this module afterwards from the remote control itself
      },
      

      Any advice would be appreciated.

      Thanks.
      Grant
      :::

      Spoiler Text

      :::

      posted in Troubleshooting
      G
      grantc66
    • 1
    • 2
    • 2 / 2