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



  • @shbatm How do i read more log lines not only tailing the last 15 from pm2 logs mm ??
    This works so nicely with the only one device that it is starting (turn on and turn off the whole mirror) it is awesome… i am so hurt that i am unable to have the rest of the “devices/modules” working.

    If you want to have a look at my long a%$ 🙂 config.js entry for the MMM-AlexaOnOff module here it is ;

    {
        module: 'MMM-AlexaOnOff',
        config: {
            //netInterface: 'wlan0',
            //startPort: 15000,
            devices: [{ 
                  name: "Clock Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_4_clock" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "modules_4_clock" }
                  },
    			  name: "Calendar Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_5_calendar" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_5_calendar" }
                  },
                              name: "Denis Calendar",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_6_calendar" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_6_calendar" }
                  },
    			  name: "Compliments Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_7_compliments" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_7_compliments" }
                  },
    			  name: "Gas Prices Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_8_MMM-Gas" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_8_MMM-Gas" }
                  },
    			  name: "Instagram Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_9_MMM-Instagram" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_9_MMM-Instagram" }
                  },
    			  name: "Page Indicator Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_11_MMM-page-indicator" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_11_MMM-page-indicator" }
                  },
    			  name: "Temperature Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_12_MMM-DHT-Sensor" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_12_MMM-DHT-Sensor" }
                  },
    			  name: "Weather Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_13_MMM-NOAA3" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_13_MMM-NOAA3" }
                  },
    			  name: "System Stats Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_14_MMM-SystemStats" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_14_MMM-SystemStats" }
                  },
    			  name: "Movie Listings Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_15_MMM-MovieListings" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_15_MMM-MovieListings" }
                  },
    			  name: "Thermostat Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_16_MMM-Ecobee" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_16_MMM-Ecobee" }
                  },
    			  name: "Alexa Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_17_MMM-AlexaPi" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_17_MMM-AlexaPi" }
                  },
    			  name: "Exchange Rate Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_20_MMM-LICE" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_20_MMM-LICE" }
                  },
    			  name: "Stocks Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_21_stocks" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_21_stocks" }
                  },
    			  name: "Traffic Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_22_MMM-GoogleMapsTraffic" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_22_MMM-GoogleMapsTraffic" }
                  },
    			  name: "My Commute Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_23_MMM-MyCommute" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_23_MMM-MyCommute" }
                  },
    			  name: "Camera Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_24_MMM-iFrame" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_24_MMM-iFrame" }
                  },
    			  name: "RSS Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_25_MMM-RSS-FEED" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_25_MMM-RSS-FEED" }
                  },
    			  name: "Fitbit Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_26_MMM-fitbit" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_26_MMM-fitbit" }
                  },
    			  name: "Google Fit Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_27_MMM-GoogleFit" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_27_MMM-GoogleFit" }
                  },
    			  name: "Horoscope Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_28_MMM-horoscope" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_28_MMM-horoscope" }
                  },
    			  name: "Phone Notification Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_29_phone_notification" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_29_phone_notification" }
                  },
    			  name: "TV Stream Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_30_MMM-RTSPStream" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_30_MMM-RTSPStream" }
                  },
    			  name: "Tiles Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_31_iFrame" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_31_iFrame" }
                  },
    			  name: "Spotify Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_32_MMM-NowPlayingOnSpotify" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_32_MMM-NowPlayingOnSpotify" }
                  },
    			  name: "Events Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_33_MMM-Events" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_33_MMM-Events" }
                  },
    			  name: "Nasa Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_34_MMM-NASA" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_34_MMM-NASA" }
                  },
    			  name: "Logo Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_35_MMM-SimpleLogo" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_35_MMM-SimpleLogo" }
                  },
    			  name: "Random Quotes Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_36_random_quotes" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_36_random_quotes" }
                  },
    			  name: "Bible Verse Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_37_MMM-DailyBibleVerse" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_37_MMM-DailyBibleVerse" }
                  },
    			  name: "Dropbox Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_39_MMM-DropboxWallpaper" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_39_MMM-DropboxWallpaper" }
                  },
    			  name: "Weather Background Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_40_MMM-Dummy" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_40_MMM-Dummy" }
                  },
    			  name: "News Module",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_43_MMM-Jnews" }
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_43_MMM-Jnews" }
                  },
    	      name: "Eva's Modules",
                  on: [
                      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_6_calendar" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_14_MMM-SystemStats" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_21_stocks" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_25_MMM-RSS-FEED" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_26_MMM-fitbit" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_29_phone_notification" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_30_MMM-RTSPStream" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_31_iFrame" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_32_MMM-NowPlayingOnSpotify" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_34_MMM-NASA" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_43_MMM-Jnews" }
                  }
                  ],
                  off: [
                      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_6_calendar" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_14_MMM-SystemStats" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_21_stocks" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_25_MMM-RSS-FEED" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_26_MMM-fitbit" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_29_phone_notification" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_30_MMM-RTSPStream" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_31_iFrame" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_32_MMM-NowPlayingOnSpotify" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_34_MMM-NASA" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_43_MMM-Jnews" }
                  }
                  ],
    	      name: "Denis Modules",
                  on: [
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_27_MMM-GoogleFit" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_9_MMM-Instagram" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "HIDE", module: "module_39_MMM-DropboxWallpaper" }
                  }
    			  ],
                  off: [
    			      {
    				  notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_27_MMM-GoogleFit" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "Show", module: "module_9_MMM-Instagram" }
                  },
    			      { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "SHOW", module: "module_39_MMM-DropboxWallpaper" }
                  }
                      ], 
                  name: "Mirror",
                  on: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "MONITORON"}
                  },
                  off: { 
                    notification: "REMOTE_ACTION",
                    payload: { action: "MONITOROFF"}
                  },     
    			  
            }]
        }
    }
    

    It is only loading the last “device” named Mirror for (an all on/off feature) on port 21900.

    I tried changing the port start number to something else to no avail, i tried commenting out all but the last 2 of the devices still no luck…it only starts 1.

    Edit: I spoke too early on singing it praises if you give a command ( in my case all i have is one that makes the monitor go off and than on after you ask Alexa to turn Mirror On) after 2-3 minutes everything freezes and you absolutely can not interact with the mirror completely neither from putty /ssh or vnc (ctrl/alt/del) or keyboard input only a hard power reset is the solution it has happened twice. I did try it one last time before posting this, and right after “Alexa turn Mirror On” i hit ctrl+Q to quit MM and see what the CPU values were and they were right around 70% but they went immediately down to 1% and nothing happened no more freezing of the Rpi…weird!!! I really need to get you some more detailed logs

    Please help me solve this so i can turn my modules on and off
    Thank you for your prompt replies and patience
    Denis



  • @shbatm Thanks. I’m using an echo dot 3rd generation. Sadly, I have to wait. There seems to be no problems with your module / the mirror / network.

    Good work!


  • Module Developer

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

    How do i read more log lines not only tailing the last 15 from pm2 logs mm ??

    They should be in ~/.pm2/logs by default. You can also stop the pm2 version and run the mirror manually using the instructions above.

    I’ll let you know if I can replecate the CPU issue, but that’s very strange. I haven’t seen that.

    Make sure you update to the latest version of the module to see the correct line, but other than that I don’t know why its not working for more than one device. At this point it sounds like a fauxmojs issue… You can always open an issue on their GitHub repo.


  • Module Developer

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

    Thanks. I’m using an echo dot 3rd generation. Sadly, I have to wait. There seems to be no problems with your module / the mirror / network.

    I’d suggest posting a comment on the fauxmojs issue–maybe it will prompt them that more people are waiting for a fix. It looks like the python version has been fixed, so I’m sure it’s just a matter of them getting around to it.


  • Module Developer

    @richland007 – So I just noticed something interesting: I tried adding multiple devices, and running “Discover my devices” from my echo. Alexa said she didn’t find any new devices, but when I looked in the device list on alexa.amazon.com, she had already found the other devices. Maybe try deleting all of the Wemo devices on your Alexa app and then retrying discovery?



  • @shbatm i will try it again but i think i did it once or twice deleting all my devices and had her discover them back up to no avail
    D



  • @shbatm I was wondering, however i am sure that i am wrong and just wishful thinking, but maybe changing the minimum version of MM for MMM-AlexaOnOff to 2.4.1 (which is the version i am at) only works for one instance, meaning initiating one device and not for all of them???
    D


  • Module Developer



  • @richland007 Solution: Why not just update your mirror to 2.6.0? On my 2.6.0 mirror this add-on is working great, Alexa is finding all it’s 15 devices in one run.



  • Does anyone have instructions on how to connect this to Google Home? I’ve been searching for days with no luck.