unit.getHistoryData(fromTime, toTime) will request data about sensor and circuit changes over time, then `getHistoryData` will be emitted when the data is ready to be handled.
Fixes#59
Fixed `addClient` and `removeClient` events returning `SLCancelDelay` objects. This shouldn't really make a difference as there are no properties to worry about on one or the other, but it was still incorrect and could cause bugs if stuff was added to those messages in the future.
This parameter is optional, so compatibility shouldn't be affected. Each SLMessage can set its own sender ID which is present on the returned message. This allows callers to fire multiple requests at once, even of the same type, while being able to identify which response went with which request. If not specified, the default value is 0.
Also went ahead and documented some of the helper functions present on SLMessage (so, available on all message instances).
Finally, since I was in and messing with each message anyway, I simplified and removed some repeated code from each derived message and had it call into the super to take advantage of shared decoding functionality.
The lambdas ("arrow functions") in test functions were removed per advice from Mocha's documentation where the implicit `this` rebinding can apparently cause problems. This should probably have been its own commit, but, again, I was already in there messing with stuff, so...oh well.
Closes#43
These change frequently and it's probably not worth documenting anyway. I'm pretty sure these versions were no longer valid anyway since, for example, Mocha no longer supports node v8.
* added GetPumpStatus / SetPumpFlow commands
* Updated README.md with GetPumpStatus / SetPumpFlow information
* rename `setPointType` to `isRPMs`
* renamed val0 to pumpType and val1 to isRunning
* added `unknown command` case
* fixed lint error
* Renamed unknown values to pumpUnknown1 and pumpUnknown2
* renamed 30 to unknownCommand
This implementation is barebones and only does what I was able to find easily in the official app's source code. I'd love to do more with this, so any pull requests adding functionality would be welcomed.
Closes https://github.com/parnic/node-screenlogic/issues/4