Commit Graph

77 Commits

Author SHA1 Message Date
a59fae5f8c Updated dependency to latest
Preparing for v1.4.0 release
v1.4.0
2020-05-25 13:41:13 -05:00
f315bcd6a5 Allowed eslint to fix style violations 2020-05-25 13:25:18 -05:00
a0e2569743 Updated readme with new events 2020-05-25 13:25:01 -05:00
9205e3b62b add .on(‘error’) handlers that emit the error (#21)
- propagate internal errors back to caller by emitting them so they can properly be handled by callers
2020-05-25 13:19:28 -05:00
8e0cb20620 Added missing events and corrected heat mode event 2020-04-02 13:29:43 -05:00
98edd602ec Updated to support non-Windows platforms 2020-03-29 10:54:06 -05:00
ba1fb3fb6c Updated dependencies to fix vulnerabilities 2020-03-28 16:32:08 -05:00
6a1d31c224 Made eslint happy again 2020-03-04 21:58:13 -06:00
43725ae083 Fixed remote login
I forgot that this message sometimes receives a string instead of a buffer.

Fixes #19
2020-03-04 21:56:06 -06:00
81b3a61c28 Added SLEquipmentConfigurationMessage
I am not documenting this in the readme just yet because I don't really know how to interpret the data provided, but it seems to be necessary if we want to be able to change pump speeds in the future or read any historical data about the equipment. I'm not sure how much I'm going to be able to figure out about these arrays since the data appears random to me at the moment, but perhaps others will be able to figure out what's in here.
2020-02-22 11:29:29 -06:00
da9864462b Renamed to Example for user-friendliness 2020-02-22 11:27:30 -06:00
a2d39e7463 Added some helpers to interpret the controllerType field
These aren't particularly useful, at least not to me, but I found them while perusing the official app, so I figured they couldn't hurt to have.
2020-02-22 11:27:09 -06:00
ed99d411b2 Minor optimization to set buffer size appropriately
This avoids unnecessary allocations/reallocations while decoding a message by pre-sizing the buffer to the amount we know it will require. I feel like there's probably a better way to handle this, but this works for now.
2020-02-10 21:36:13 -06:00
5a55c56ac1 I'm reading that this is supposed to be submitted to source control 2020-02-09 15:29:17 -06:00
e24f49285c Added tests for some of the SLMessage utilities 2020-02-09 14:51:23 -06:00
ba19b6802e Added support for reading arrays from screenlogic messages 2020-02-09 14:51:10 -06:00
c9afb53810 SLMessage now supports instancing from an encoded SLMessage
This allows the base class to be evaluated by unit tests in a way that mocks what the library does with actual messages received from pool equipment.
2020-02-09 14:39:43 -06:00
22357f11e2 Encapsulate alignment into a function to make things slightly easier
This just returns the extra amount needed to add onto the string/array.

Also fixed up writeSLArray() not adding slack like it should have been. This wasn't an issue previously because the only place that currently uses this function is the password feature which is a fixed 16byte length, so it was already aligned. An upcoming commit will be using this, however, so I needed the alignment to be correct.

Finally, the read/write string functions were doing unnecessary conditional checks so I removed them. skipWrite() already does nothing if you tell it to skip 0, and adding 0 to readOffset won't do anything, so neither conditional is necessary at this point.
2020-02-09 14:28:03 -06:00
22858061f7 eslint didn't like these not having semi-colons
I should probably turn the semi-colon linter off since I really dislike the semi-colons everywhere, but it's probably too late for that at this point in the project.
2020-02-09 14:22:32 -06:00
9337068826 Don't change any equipment state when running tests
This is handy for testing certain mutators, but shouldn't happen every time we run tests. It can be enabled by the user on a case-by-case basis.
2020-02-09 14:21:54 -06:00
0397e8ad8f Added support for controlling the salt cell generator output levels
Closes #17
2020-02-08 15:33:13 -06:00
c310885598 Updated changelog and package.json for release v1.3.1 2019-12-27 15:57:36 -06:00
661d8db173 Added helper methods for interpreting the equipFlags value
Provided by @mikemucc in #15. Also updated the readme with the new information.
2019-12-27 15:57:21 -06:00
e567e9c821 gatewayName conversion was stripping final character (#14) 2019-11-30 12:01:29 -06:00
b8ed58e070 Updated changelog and package.json for release v1.3.0 2019-11-26 17:41:26 -06:00
757a3be7d1 Set heat mode (#13)
* Function to set the heater mode + readme updates

* making the test set the heater to 'heat pump'
2019-11-24 16:53:53 -06:00
1dcbe3883b Updated readme with latest Pentair equipment firmware version 2019-07-30 12:09:31 -05:00
b95f6ff777 Fixed spelling of Caribbean
I knew that first one didn't look right, but it's what the official app's source code had, so I went with it.
2019-07-29 21:48:20 -05:00
5ec3fbb802 Added ability to send light commands (on, off, set colors, etc.)
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
2019-07-29 21:37:36 -05:00
3b774923eb Updated changelog 2019-06-22 10:12:04 -05:00
64edc5879b Added handling of the system disliking function arguments
Updated readme with failure events that are triggered
2019-06-22 10:10:13 -05:00
cf3d3cba78 Fixed eslint complaint from commit 3824437 2019-06-21 00:13:11 -05:00
1aa1dddb49 Added ability to set pool or spa heat setpoint
Fixes #9
2019-06-21 00:12:29 -05:00
3824437d7a Factor out circuitData() and use it for is{Spa,Pool}Active (#8) 2019-06-14 16:53:42 -05:00
cd2354c34f Updated changelog and package.json for release v1.2.1 2019-03-26 20:56:30 -05:00
25188ddce9 To be safe, only pass the chunk of the buffer that's relevant 2019-03-26 19:16:23 -05:00
d70bc88f7c Actually fixed large message handling
We shouldn't be trying to read the message length out of the middle of a message when there are multiple segments.

Fixes https://github.com/parnic/node-screenlogic/issues/5 (for real this time, I hope...I don't have a way to test)
2019-03-26 07:10:18 -05:00
08c5457f2c Fixed handling of messages larger than 1024 bytes
Fixes https://github.com/parnic/node-screenlogic/issues/5
2019-03-25 20:02:58 -05:00
398a687cc6 Well that was obviously the wrong date 2019-02-23 10:23:05 -06:00
8727d53440 Revved for NPM 2019-02-22 18:58:10 -06:00
d3de4ec441 Updated readme
Moved changes to dedicated changelog
v1.2.0
2019-02-22 16:06:31 -06:00
605b8e4b4e VSCode launch config 2019-02-22 16:06:20 -06:00
a09df2569b 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).
2019-02-22 16:06:11 -06:00
ba734517c9 Enable linter 2018-04-28 23:06:48 -05:00
3c6b8ebcc7 Linter fixes 2018-04-28 23:06:11 -05:00
26083f75a7 Added very basic tests 2018-04-28 22:41:38 -05:00
aac316c5ed Fixed typo 2018-04-28 22:39:39 -05:00
03022f9220 Updated version for release v1.1.0 2018-04-23 23:44:43 -05:00
8329bb22d7 Added changelog 2018-04-23 23:44:28 -05:00
2d382dda65 Documented setCircuitState 2018-04-23 23:41:33 -05:00