• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

[MMM-AlexaOnOff] Simple Mirror Control from External Home Assistant (Alexa/Google Home/HASS.io)

Scheduled Pinned Locked Moved System
81 Posts 13 Posters 63.4k Views 16 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    shbatm Module Developer
    last edited by shbatm Dec 15, 2018, 9:26 AM Dec 6, 2018, 2:23 AM

    Description:

    Simple Mirror Control and module notifications from your existing (external) Home Assistant (Alexa/Google Home/HASS.io) with minimal setup using the Wemo protocol.

    Yes, this is yet-another-Alexa-module; however, I hadn’t found one that did not require setting up some special Alexa skill or configuring an AWS account, etc.

    This module uses the Belkin Wemo protocol (via fauxmojs) to receive on/off notifications from an Amazon Echo (or Google Home Hub, or anything that can discover and control a Wemo device). It creates “virtual” Wemo devices on your network that the home assistant can find, and then receives ON or OFF commands for those devices. The module simply takes these, and converts them to module notifications for other modules to work with.

    Main Features:

    • Simple setup. Install the module, then say, “Alexa, discover my devices”. The virtual devices will populate and you can start controlling them.
    • Doesn’t add redundant features.
      • I didn’t want to keep baking in the same functions that so many other modules already have, so this module just takes an ON or OFF command, and turns that into whatever notification you need it to be. Customize all the details in your config file.

    Examples:

    • Create a “Magic Mirror” virtual device, use a module like MMM-OnScreenMenu or MMM-RemoteControl to turn on and off the screen when you say “Alexa, turn on Magic Mirror”. – See detailed example here
    • Create a “device” for each profile in MMM-ProfileSwitcher. Setup the notification so when you say “Alexa, turn on Mary’s Mirror” it tells MMM-ProfileSwitcher to switch to that profile.

    Download:

    [card:shbatm/MMM-AlexaOnOff]


    Current Version 0.1.1 – CHANGELOG

    R 1 Reply Last reply Dec 6, 2018, 7:39 PM Reply Quote 1
    • R Offline
      richland007 @shbatm
      last edited by Dec 6, 2018, 7:39 PM

      @shbatm very very interesting… i get the part of turning on and off the whole mirror but my question is;
      Can it show and hide other magic mirror modules one has installed and if so how??
      Thank you for doing this
      Denis

      1 Reply Last reply Reply Quote 0
      • S Offline
        shbatm Module Developer
        last edited by Dec 7, 2018, 6:08 PM

        @richland007 Yes, it can, in conjunction with another module like MMM-Remote-Control or MMM-OnScreenMenu.

        Config section to do this with MMM-Remote-Control (see here for specifics on the module identifier needed):

        {
            module: 'MMM-AlexaOnOff',
            config: {
                devices: [{ 
                      name: "Clock Module",
                      on: { 
                        notification: "REMOTE_ACTION",
                        payload: { action: "SHOW", module: "module_1_clock" }
                      },
                      off: { 
                        notification: "REMOTE_ACTION",
                        payload: { action: "HIDE", module: "module_1_clock" }
                      },
                }]
            }
        }
        

        Config section to do this with MMM-OnScreenMenu:

        {
            module: 'MMM-AlexaOnOff',
            config: {
                devices: [{ 
                      name: "Clock Module",
                      on: { 
                        notification: "ONSCREENMENU_PROCESS_ACTION",
                        payload: { actionName:'moduleShow1', name: 'clock' }
                      },
                      off: { 
                        notification: "ONSCREENMENU_PROCESS_ACTION",
                        payload: { actionName:'moduleHide1', name: 'clock' }
                      },
                }]
            }
        }
        
        R 1 Reply Last reply Dec 8, 2018, 12:02 AM Reply Quote 1
        • R Offline
          richland007 @shbatm
          last edited by Dec 8, 2018, 12:02 AM

          @shbatm Oh great that is all i wanted thank you!

          I have been struggling to get MMM-MirrorMirrorOnTheWall and its skill for the past 5 months and i am unable to get it to work.

          Now i got myself a new module to work with thanks to you :)

          I do have MMM-RemoteControl working and i guess all it takes is to write some long config.js sections for all my modules … and they are a lot of them LOL

          So basically all my modules will look like switches right??

          Thank you
          Denis

          S 1 Reply Last reply Dec 9, 2018, 12:46 AM Reply Quote 0
          • M Offline
            MoreLinux
            last edited by MoreLinux Dec 8, 2018, 3:18 PM Dec 8, 2018, 3:16 PM

            @shbatm, this is a really great solution, that gets the job done. Now we have an easy way to get the Magic Mirror voice controlled.

            I have it now running with remote control, and all my modules as separate devices that can be switched on and off.

            1 Reply Last reply Reply Quote 0
            • C Offline
              chassain 0
              last edited by Dec 8, 2018, 6:29 PM

              Hello,

              I thinh it s necessary to have V2.5 magic mirror because echo don t recognize magic ?
              nice module. good job

              1 Reply Last reply Reply Quote 0
              • S Offline
                shbatm Module Developer @richland007
                last edited by Dec 9, 2018, 12:46 AM

                @richland007 Yes, that’s correct about all the modules showing up as switches. I haven’t tested a maximum number of modules yet, so if you hit a limit let me know. You may have to re-run Discover a couple times if it takes longer than 20s to find all of your devices.

                I feel your pain about MirrorMirrorOnTheWall, that’s why I made this one for myself.

                @MoreLinux Glad you got it working!

                @chassain-0 I’ll update the minimum version. I run V2.6-dev with no issues and didn’t test lower versions.

                1 Reply Last reply Reply Quote 0
                • R Offline
                  ReRoPa1904
                  last edited by Dec 10, 2018, 10:04 PM

                  Is there any way to execute two commands?
                  Example:
                  “Alexa, turn calendar on”

                  • “SHOW calendar & HIDE clock” in the same step OR “HIDE all & show calendar”

                  Tried to figure that out but didn’t find a solution yet. Since there is “HIDE ALL” button on the webcontrol I thought that at least the second option should be possible. Or am I wrong?

                  Thanks in advance :-)
                  Robert

                  S 1 Reply Last reply Dec 15, 2018, 7:20 AM Reply Quote 0
                  • S Offline
                    shbatm Module Developer @ReRoPa1904
                    last edited by shbatm Dec 15, 2018, 9:25 AM Dec 15, 2018, 7:20 AM

                    @reropa1904 said in [MMM-AlexaOnOff] Simple Mirror Control from External Home Assistant (Alexa/Google Home/HASS.io):

                    Is there any way to execute two commands?

                    Out of curiosity, which module are you using for the show/hide?

                    I should be able to add the ability to send multiple notifications pretty easily when I get a chance.

                    EDIT: Done, you can now have multiple notifications fire when a “device” is turned on or off (Note: I was not able to fully test on the Mirror but it works in the browser, let me know if you have issues).

                    Update your version and see the last example at the bottom of the updated README

                    To update:

                    cd ~/MagicMirror/modules/MMM-AlexaOnOff/
                    git fetch && git pull
                    
                    R 1 Reply Last reply Dec 15, 2018, 5:27 PM Reply Quote 0
                    • R Offline
                      ReRoPa1904 @shbatm
                      last edited by Dec 15, 2018, 5:27 PM

                      @shbatm That’s great. Thanks for your reaction on this. Will test tomorrow and let you know.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 8
                      • 9
                      • 1 / 9
                      1 / 9
                      • First post
                        5/81
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy