alexa-remote2
Library to remote control an Alexa (Amazon Echo) device via LAN/WLAN.
Early code version.
let Alexa = require('alexa-remote2');
let alexa = new Alexa();
let cookie = 'x-amzn-dat.../ /...=" csrf=12345780';
alexa.init({
cookie: cookie,
email: '...',
password: '...',
bluetooth: true,
logger: console.log,
alexaServiceHost: 'layla.amazon.de',
userAgent: '...',
acceptLanguage: '...',
amazonPage: '...',
useWsMqtt: true
},
function (err) {
if (err) {
console.log (err);
return;
}
for (let device of this.devices) {
console.log (device._name);
}
}
);
Thanks:
Partly based on Amazon Alexa Remote Control (PLAIN shell) and alexa-remote-control and OpenHab-Addon
Thank you for that work.
Known issues/Todos
Changelog:
0.3.0 (2018-08-13)
- (Apollon77) Added Websocket/MQTT connection class and also initialize it when requested via alexa-remote class.
- (Apollon77) Websocet/MQTT class and also Alexa-Remote are now event emitters to be able to notify on push changes
- (Apollon77) many fixes and optimizations, changed code to be an ES6 class
- (Apollon77) reworked the "prepare" step and only initialize what's really needed and allow extra "init" methods also to update Devices, Bluetooth and such. Docs will follow
- (Apollon77) API breaking: executeAutomationRoutine is not expecting a routineId anymore, but the complete routine definition.
0.2.x
- (Apollon77) 0.2.8: fixes, fix shuffle/repeat commands, make sure speak object is a string
- (Apollon77) 0.2.7: speak maximum are 250 characters, routines will now queried 2000 at once (instead of only 20 before)
- (Apollon77) 0.2.6: fixes
- (Apollon77) 0.2.5: new functions to read musicproviders and send searchphrases for them
- (Apollon77) 0.2.5: by default direct all calls to "alexa."+amazonPage to be more generic, overwritable
- (Apollon77) 0.2.4: several smaller bugfixes
- (Apollon77) 0.2.4: an speak call with empty string will return an error
- (Apollon77) 0.2.4: add infos if multiroom device or member
- (Apollon77) 0.2.3: in non .com replace numbers with points into numbers with comma
- (Apollon77) 0.2.0: several optimizations and publish as alexa-remote2 on npm
- (Apollon77) 0.2.0: use alexa-cookie@0.2.0 library to also offer proxy support
- (Apollon77) 0.2.0: retrieve automation routines in prepare
- (Apollon77) 0.2.0: enhanced sendCommand and added support for Routines and sequencial Commands
0.1.x
- (Apollon77) 0.1.3: Use specific User-Agents for Win32, MacOS and linux based platforms
- (Apollon77) 0.1.2: add logging for used Alexa-URL and user-Agent once at init
- (Apollon77) 0.1.1: rename "shuffle" to "ShuffleCommand" and repeat to RepeatCommand)
0.1.0
- (Apollon77) added automatic cookie renewal when email and password are provided
- (Apollon77) added authentication checks by bootstrap call (like alexa-remote-control)
- (Apollon77) several fixes
- (Apollon77) added logger option
0.0.x