JosefJantzen / MMM-AlexaControl

Control your MagicMirror with Alexa
MIT License
45 stars 10 forks source link

Monitor Command not responsive #15

Closed pandeyprakhar00 closed 4 years ago

pandeyprakhar00 commented 4 years ago

Hi, I am able to use these commands - Reboot, Stop, Refresh & Restart. However i am having trouble to turn the monitor on/off. Can you please Guide ! Where i am making mistake.

{ module: 'MMM-AlexaControl', position: 'middle_center', config:{ image: true, pm2ProcessName: "mm", vcgencmd: true, refresh: true, restart: true, stop: true, reboot: true } },

pandeyprakhar00 commented 4 years ago

I am completely new to programming, so unable to figure it out.. in terminal window

vcgencmd display_power 0

works just fine !

JosefJantzen commented 4 years ago

Hi, sorry I updated the module in the last days and I forgot to edit the config example. So that's the config you should use:

    {
        module: 'MMM-AlexaControl',
        position: 'middle_center',
        config:{
            image: true,
            pm2ProcessName: "mm",
            vcgencmd: "vcgencmd"
        }
    }
pandeyprakhar00 commented 4 years ago

Works like a charm.. However, i was trying to create a switch called "news" -> that would direct me to Page 2, I created a switch called news using the code below, but alexa is unable to find the device named "news".

{ module: 'MMM-AlexaControl', position: 'top_bar', config:{ image: false, pm2ProcessName: "mm", vcgencmd: "vcgencmd", refresh: true, restart: true, stop: true, reboot: true, shutdown: true, monitor: true, pages: 2, devices: { devices: [{ name: 'news', port: 11102, handler: _this.sendSocketNotification("PAGE_CHANGED", 1) } ]} } },

Please guide

  1. If the syntax used is correct or not
  2. Do i have to add switch "news" any where else such as, node_helper.js or in /translations/en.json
  3. Any additional requirement that needs to be followed ?

Thanks in advance :-)

JosefJantzen commented 4 years ago

Your config seems to be right. I see that you have still configured two pages. Had Alexa find these devices? If she found you can rename the device for page two and you don't need an extra device. I'm don't really know why Alexa not discovered the device. Did you made any network changes?

pandeyprakhar00 commented 4 years ago

I got it working ! Thanks for your Support !