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 install
node app
- rename
.env_sample
to.env
and 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 -g
and then runpm2 start app.js
from this directory. - (optional) To start
pm2
on boot runpm2 startup
. Alternately, to stoppm2
from launching on boot runpm2 unstartup launchd
- Say
Alexa turn off the Computer
to put your mac to sleep. - Say
Alexa turn on the Computer
to wake your mac from sleep.