Added support for remote + passworded access

This password encoder was decompiled from the Android app then manually cleaned up and ported to Javascript. It ain't pretty, but it works.

I don't know that this is all necessarily the most correct or idiomatic way to implement these features, but I wanted to make sure the functionality got committed to help out people wanting to use this for smart home appliances (#1).
This commit is contained in:
2019-02-22 15:21:49 -06:00
parent ba734517c9
commit a09df2569b
8 changed files with 371 additions and 13 deletions

View File

@ -5,8 +5,21 @@ const SLMessage = require('./SLMessage.js').SLMessage;
const MSG_ID = 14;
exports.SLChallengeMessage = class SLChallengeMessage extends SLMessage {
constructor() {
constructor(buf) {
super(0, MSG_ID);
if (buf) {
this._wroteSize = true;
this.writeBuffer(buf, 0);
this.decode();
}
}
decode() {
super.decode();
this.challengeString = this.readSLString();
}
static getResponseId() {