Uses the WeMo emulator wemore to expose an on/off command to Alexa to put your mac to sleep, and to wake it up (immediately).
npm installnode app- rename
.env_sampleto.envand add a unique SERIAL (I used a random uuid) - Go to the Alexa App, or tell Alexa to discover new devices.
- (optional) If you want to run this controller as a service, install pm2 by running
npm install pm2 -gand then runpm2 start app.jsfrom this directory. - (optional) To start
pm2on boot runpm2 startup. Alternately, to stoppm2from launching on boot runpm2 unstartup launchd
- Say
Alexa turn off the Computerto put your mac to sleep. - Say
Alexa turn on the Computerto wake your mac from sleep.