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

    Posts

    Recent Best Controversial
    • RE: MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!

      @costascontis said in MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!:

      @michael5r just asking…why nest-status need to send notifications to other modules ?

      mmm-nest-status isn’t sending a notification directly to other modules, it’s sending a global notification.

      But seeing that all modules listen for these notifications, the notification will also reach modules that don’t need or use it (which is where the console log you showed comes from - it’s basically all modules saying “I received a socket notification”, but it doesn’t mean they actually do anything with it).

      That’s just how the magic mirror socket system works - every module that broadcasts data or status does this.

      posted in Utilities
      michael5rM
      michael5r
    • RE: MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!

      @costascontis said in MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!:

      @michael5r after hours of tests i found out that if i use default clock and calendar module then after a few minutes nest module stop updating.If i dont use clock/calendar and comment them at config.js then nest module is working fine for days.I am not a developer but i suspect that has something to do with notifications between these modules…

      I’ll see if I can recreate this with those modules - thanks for the doing the debugging!

      posted in Utilities
      michael5rM
      michael5r
    • RE: MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!

      @costascontis said in MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!:

      EDIT 2: I opened the console at the developers tools inside mm and i notished that from the moment MMM-NEST-STATUS module starts spams with notifications clock and calendar modules like that

      clock received a module notification: MMM_NEST_STATUS_UPDATE from sender: mmm-nest-status
      calendar received a module notification: MMM_NEST_STATUS_UPDATE from sender: mmm-nest-status
      

      until it stops and stop updating the nest status also.Is that normal?

      Yes, that’s totally normal. The mmm-nest-status module is broadcasting a notification to all modules saying that data is available - it’s how the socket notification system works.

      posted in Utilities
      michael5rM
      michael5r
    • RE: MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!

      @costascontis No, that’s fine - directly below you’ve enabled read/write, so that supersedes the standalone read setting.

      posted in Utilities
      michael5rM
      michael5r
    • RE: MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!

      @costascontis It shouldn’t matter - I don’t use the Away read setting in this module. The settings that matter are the ones directly tied to the thermostat and smoke detectors.

      posted in Utilities
      michael5rM
      michael5r
    • RE: MMM-Energy-Saver - an easy way to suspend/resume modules based on a PIR sensor.

      @sdetweil said in MMM-Energy-Saver - an easy way to suspend/resume modules based on a PIR sensor.:

      @michael5r also note that modules can be hidden on purpose. So wakeup should not show all modules.

      My MMM-SleepWake saves a list of modules already hidden on sleep.

      This also works across sleep/wake voice commands by MMM-voice/lucy

      Sure - and in that case, the mmm-energy-saver module probably isn’t a good fit. But it works great when you only need to do what I describe above :)

      posted in System
      michael5rM
      michael5r
    • RE: MMM-Energy-Saver - an easy way to suspend/resume modules based on a PIR sensor.

      @sdetweil It’s the same thing, though - when do you module.hide(), you trigger the suspend method for that particular module.

      posted in System
      michael5rM
      michael5r
    • RE: MMM-Energy-Saver - an easy way to suspend/resume modules based on a PIR sensor.

      @agp42 said in MMM-Energy-Saver - an easy way to suspend/resume modules based on a PIR sensor.:

      Hello,

      interesting module, I worked myself too a lot about this topic for my Mirror, but the main problem was that most of the module don’t define the suspend/resume functions, and consequently even when they are hidden they continue to run in background and request to update their datas…
      So my solution was to update most of the module I am using to add suspend/resume function to stop the update according to the module.hidden and the notification “USER_PRESENCE” (sent by the PIR sensor module).

      Did you find a smarter way ?
      What is your module really doing to save the energy ?

      Thank you for your clues !

      So … the mmm-energy-saver module really does 2 things:

      1. It allows you to create a simple daily schedule where all modules are hidden and where your monitor is turned off. For instance, on my own mirror, this is set to take place between midnight and 7 am. During this time, any notifications from your motion sensor is ignored.

      2. Outside of this schedule (deepsleep), it continually listens for the USER_PRESENCE notification from the mmm-pir-sensor module. When this notification is received it shows all modules (if they were previously hidden) and runs a timer in the background. If the timer runs out before any new USER_PRESENCE notifications are received, this module then hides all other modules on the mirror.

      But this doesn’t solve the issue that you also mention - even though a module is hidden, most modules continue to load data in the background - which is a huge waste.

      So I did the same thing as you - I updated all my own modules to extend the standard suspend and resume functionality that already exists in the magic mirror framework.

      You can see example code here:
      https://github.com/michael5r/mmm-nest-status/blob/fcbf291a26374e32901e993f9e109465819f59bf/mmm-nest-status.js#L613

      Basically, when the suspend command is received, I set a module state called sleeping which also stops the module from getting new data.

      When the resume command is received, the sleeping state is set to false and it immediately polls for fresh module data.

      Would be nice if more modules supported this behavior!

      posted in System
      michael5rM
      michael5r
    • RE: MMM-Hue-Lights - new module for your Philips Hue lights!

      @christian Sure - post it as an issue/feature request in the Github repo for this package and I’ll find some time to build it!

      posted in Utilities
      michael5rM
      michael5r
    • RE: MMM-Hue-Lights - new module for your Philips Hue lights!

      @christian Not currently - I’m just displaying them in the order that the API spits them out.

      posted in Utilities
      michael5rM
      michael5r
    • RE: MMM-Hue-Lights - new module for your Philips Hue lights!

      @christian said in MMM-Hue-Lights - new module for your Philips Hue lights!:

      Hi,

      I installed the module today with my Deconz gateway (not Hue).
      Everything works fine but I´m not able to use my defined groups.
      Lights are working great but the Hue bridge uses rooms and not groups, I think thats my problem.
      The Deconz gateway uses only lights and groups.

      The module MMM-Hue works great with the Deconz gateway but it´s basic. The new module looks much better.
      Is there a way to fix this problem?

      Regards,

      Christian

      Sure - open up the mmm-hue-lights.js file and go to line 670.

      You’ll see a comment saying for the groups, let's immediately filter out anything that doesn't have a type of 'Room' and a code block that looks like this:

      Object.keys(data.groups).forEach(function(key) {
          var itemType = data.groups[key].type.toLowerCase();
          if (itemType !== 'room') {
              delete data.groups[key];
           }
      });
      

      If you delete or uncomment that code block, it will no longer filter out anything that isn’t a room.

      posted in Utilities
      michael5rM
      michael5r
    • RE: MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!

      @costascontis said in MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!:

      isnt updateinterval in ms?cause if it is then 60000 ms = 1min…

      My bad - you’re right, it’s 1 minute :)

      posted in Utilities
      michael5rM
      michael5r
    • RE: MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!

      @costascontis You configuration looks fine - the updateInterval is set to 60000, so it’s only pulling data every 10 minutes.

      What exactly do you mean that it “stops updating”?

      posted in Utilities
      michael5rM
      michael5r
    • RE: One-line switch to enable / disable modules

      @sean said in One-line switch to enable / disable modules:

      @rudibarani @michael5r

      Here is my version. No need to list all modules.

      const pre_disabled = {
        "UNLISTED": true, // default value for unlisted other modules.
        "alert":false,
        "clock": false,
        "MMM-Remote-Control":false,
       }
      
      var DISABLED = new Proxy(pre_disabled, {
        get (receiver, name) {
          return name in receiver ? receiver[name] : receiver["UNLISTED"]
        }
      })
      

      Lovely :thumbs_up_light_skin_tone:

      posted in Feature Requests
      michael5rM
      michael5r
    • RE: Magic Mirror ServerOnly

      @himuura said in Magic Mirror ServerOnly:

      so michael if im using the AssistantMk2 module, i wont get charged right? how can i confirm that? And on the second part, i dont have the google home app, how can it read the system temperature of the mirror? any idea?

      If you set up your Google project according to the instructions in the AssistantMk2 module, you’re only enabling the Google Assistant API - but you can always check the metrics for the Cloud Speech API just to be sure. Go to your project dashboard on the console.cloud.google.com site, click APIs & Services in the navigation to the left, then the Cloud Speech API to see whether you’re actually using any data.

      (No matter what, Google is very nice about giving you tons of warnings before you hit any API limits, so you shouldn’t be worried about suddenly facing a huge bill.)

      What do you mean by system temperature? Are you talking about the actual CPU/GPU temperature of your raspberry pi - like the data displayed by the MMM-Tools module?

      posted in Troubleshooting
      michael5rM
      michael5r
    • RE: Magic Mirror ServerOnly

      It’s Google’s Cloud Speech API that costs money after the first 60 minutes - the Google Assistant API is free (well, the API limits are so high they’re pretty much non-existent).

      I’m using MMM-AssistantMk2 with the MMM-Hotword module and have yet to find any reason to use the cloud speech API - the google assistant API works just fine.

      In regards to your last question, if you’re using the google assistant API through MMM-AssistantMk2 you can get any sort of info that your google assistant has access to normally - eg. if you’re using the Google Home app and have added your thermostat in there, the assistant will be able to give you updates about the temperature.

      posted in Troubleshooting
      michael5rM
      michael5r
    • RE: Troubles updating to 2.6.0

      Your version of npm is way too old - install the latest version through the terminal:
      sudo npm install -g npm

      posted in Troubleshooting
      michael5rM
      michael5r
    • RE: Updated to MM v2.6.0 now all I get is only a black Electron screen...

      In case someone else has this problem, instead of rebooting just run the following in your terminal:

      kill -9 $(lsof -t -i :8080)
      

      That’ll kill the current process on port 8080.

      posted in Troubleshooting
      michael5rM
      michael5r
    • RE: MMM-Nest-Camera: Display Live Nest Cameras in Magic Mirror

      @eawalker1 You could try my nest-cameras module:
      https://github.com/michael5r/mmm-nest-cameras

      It autoplays the video.

      Bear in mind that if you want to view a Nest camera video stream, the camera will need to be publicly shared - it doesn’t matter which MM module you use, there’s no getting around this currently.

      posted in Utilities
      michael5rM
      michael5r
    • RE: Is there a way . . .

      @j-e-f-f Sure, that’s the magic of the overflow: hidden style. But what puzzles me is this:

      An example:
      If you run a webpage in fullscreen mode (either through Electron using Chromium or in a regular browser), and style the body like this:

      body {
          background-color: #333;
          width: 100vw;
          height: 100vh;
          padding: 0;
          margin: 0;
          overflow: hidden;
      }
      

      you will have a grey area that takes up the entire width & height of your screen.

      If, on the other hand, you styled the body tag like this:

      body {
          background-color: #333;
          width: calc(100vw-10px);
          height: calc(100vh-10px);
          padding: 0;
          margin: 0;
          overflow: hidden;
      }
      

      you will have a grey area that is 10px shorter and narrower than the available screen space.

      The only reason this wouldn’t be the case is if the html tag has a margin or padding (which would restrict the amount of space available to the body tag) or if you’ve specified a specific screen size directly in Electron (using electronOptions.width and electronOptions.height).

      It’s no different than the standard body styles defined in MagicMirror’s main.css file - in there, a margin of 60px is set and then the height & width are set with width: calc(100%-120px) and height: calc(100%-120px) respectively.

      posted in Troubleshooting
      michael5rM
      michael5r
    • 1
    • 2
    • 3
    • 4
    • 2 / 4