• 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 51.0k 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 Jan 4, 2019, 4:16 AM

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

    from my local echo it would not find anything.

    I just found this setting up some smart plugs last week – is your echo on a different account in your “Amazon Household” by any chance?

    “Mirror” utilizing MMM-Remote-Control, that on On will send the command MONITORON and on Off with send the command MONITOROFF So will this work…I have no clue but just by dissecting your code???

    Yes, that should work. Here’s mine verbatim:

            {
                module: 'MMM-AlexaOnOff',
                config: {
                    devices: [{
                        name: "Bookcase Screen",
                        on: {
                            notification: "REMOTE_ACTION",
                            payload: { action: 'MONITORON' }
                        },
                        off: {
                            notification: "REMOTE_ACTION",
                            payload: { action: 'MONITOROFF' }
                        },
                    },
                    //{ add your other devices here },
                    ]
                }
            },
    

    Do you think i will have any issues with 37 modules??

    I haven’t stress tested it like that yet. You can certainly try it… From the FauxMo notes, you may have to run Discover a few times to find them all. Just make sure you don’t have anything running on the block of 37 ports.

    You can also try doing them in groups (you can send multiple notifications for each device’s on and off command, see earlier in this thread). Or use Profile Switcher or MMM-Carousel w/ Navigation (shbatm fork) to use “slides” of modules.

    1 Reply Last reply Reply Quote 0
    • D Offline
      djsunrise19
      last edited by djsunrise19 Jan 4, 2019, 3:25 PM Jan 4, 2019, 3:05 PM

      Hi!

      Sounds like a perfect alexa module. Perhaps someone can help. Alexa can’t find my device. I followed the instructions - it’s not the first module I installed. I have to say, that I’m using ubuntu mate, because I have a mini-itx board with a Intel G4600, but that shouldn’t be the problem.

      I already deleted my devices and added them again - a few times. But there is no virtual Magic Mirror device.

      I corrected the netInterface variable to “enp3s0”, because I’m using LAN. In the newer ubuntu versions, there is no eth0.

      Here is my config:

              {
                  module: 'MMM-OnScreenMenu',
              },
              {
                  module: 'MMM-AlexaOnOff',
                  config: {
                      netInterface: "enp3s0",
                      devices: [{ 
                            name: "Magic Mirror",
                            on: { 
                              notification: "ONSCREENMENU_PROCESS_ACTION",
                              payload: { actionName:'monitorOn' }
                            },
                            off: { 
                              notification: "ONSCREENMENU_PROCESS_ACTION",
                              payload: { actionName:'monitorOff' }
                            },
                      }]                
                  }
              },
      

      Ideas?

      Best regards
      Maurice

      1 Reply Last reply Reply Quote 0
      • S Offline
        shbatm Module Developer @shbatm
        last edited by Jan 4, 2019, 3:43 PM

        @djsunrise19

        Please check the same things:

        1. Check your MagicMirror version, if it’s lower than v2.5.0 and you don’t want to upgrade, you can try changing line 21 in MMM-AlexaOnOff.js to match your version.
        2. You should see FauxMo service started. Listening on 192.168.x.x:21900 in your log file if the service started.
        3. You can try testing with the example:
            cd ~/MagicMirror/modules/MMM-AlexaOnOff/node_modules/fauxmojs/example
            node example.js
        

        You should see: started.. and then be able to discover ‘office light’ and ‘office fan’ on your Alexa.
        4. Make sure you try discovery from alexa.amazon.com, not just your Echo.

        D 1 Reply Last reply Jan 4, 2019, 5:59 PM Reply Quote 1
        • D Offline
          djsunrise19 @shbatm
          last edited by Jan 4, 2019, 5:59 PM

          @shbatm Thank you for responding!

          1. I have the newest version 2.6
          2. Yes, I can see that line while starting the mirror.
          3. I also can see this in my command line with the example.
          4. No devices found. With echo, Alexa app and web interface. Also no test “office light” or “office fan”.

          Weird?! Perhaps the netInterface problem?! Or should it work with “enp3s0”?

          S 1 Reply Last reply Jan 5, 2019, 12:16 AM Reply Quote 0
          • S Offline
            shbatm Module Developer @djsunrise19
            last edited by Jan 5, 2019, 12:16 AM

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

            Or should it work with “enp3s0”?

            As long as the line in the log is returning your computers’ correct IP Address, enp3s0 appears to be working…

            Check netstat tulpn | grep 21900 and make sure the port is open. Otherwise check that your Alexa is on the same network/WiFi/account as you expect. If you’re getting the port open, then it’s something with the network or Alexa causing the problems.

            D 1 Reply Last reply Jan 5, 2019, 10:32 AM Reply Quote 0
            • R Offline
              richland007
              last edited by Jan 5, 2019, 6:25 AM

              @shbatm Ok so it works BUT it is only finding the last device on my list of the config.js file module entry when there are 36 others there. I tried discovery like 20 times from the website.
              Should i try adding them one by one from the bottom up by commenting them out and adding them one by one …unless you got any other ideas :)

              D

              1 Reply Last reply Reply Quote 0
              • S Offline
                shbatm Module Developer
                last edited by shbatm Jan 5, 2019, 6:33 AM Jan 5, 2019, 6:32 AM

                @richland007 in the log is it showing all of the ports in the range open? (e.g. 21900-21936)?

                R 1 Reply Last reply Jan 5, 2019, 6:45 AM Reply Quote 0
                • R Offline
                  richland007 @shbatm
                  last edited by Jan 5, 2019, 6:45 AM

                  @shbatm Where do i see the logs??
                  When i use

                  netstat -tulpn | grep electron
                  

                  It only show that 1 one port 0.0.0.0:21900 Listen

                  D

                  S 1 Reply Last reply Jan 5, 2019, 4:46 PM Reply Quote 0
                  • D Offline
                    djsunrise19 @shbatm
                    last edited by djsunrise19 Jan 5, 2019, 11:16 AM Jan 5, 2019, 10:32 AM

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

                    netstat tulpn | grep 21900

                    Yes, IP-Adress is correct. From console everything looks like it should. Alexa is in the same network - wlan, mirror lan. I also have hue in here and the hue module on my mirror. Everything looks fine there. But actually, Alexa finds nothing.

                    Ich checked your command. After that, with sudo netstat -tulpnI see this:
                    0_1546684263939_86c66852-83ae-41d7-8499-8392004f63c3-image.png

                    Do I need the wemo skill or something like that?

                    S 1 Reply Last reply Jan 5, 2019, 4:44 PM Reply Quote 0
                    • S Offline
                      shbatm Module Developer @djsunrise19
                      last edited by Jan 5, 2019, 4:44 PM

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

                      wemo skill

                      You shouldn’t need a separate skill with it. It looks like everything is working from the mirror side so I’m not sure what else to try…

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 7
                      • 8
                      • 9
                      • 4 / 9
                      4 / 9
                      • First post
                        32/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