Commit Graph

103 Commits

Author SHA1 Message Date
addd89bec5 Day mask helper functions / Refactor of time functions (#31)
* added helper methods for decode/encode dayMask

* moved isBitSet to SLMessage.js as this method is needed for several message types

* Refactored reusable functions to SLMessage
2020-06-16 21:22:22 -05:00
1aea09d95e Missed these new ones 2020-06-12 13:44:09 -05:00
9e158ae903 Made readme and changelog markdownlint compliant 2020-06-12 13:42:25 -05:00
b2439cd90c Added SLAddClient / SLRemoveClient messages (#30) 2020-06-10 08:05:32 -05:00
71c606cb94 Updated changelog 2020-06-09 16:52:36 -05:00
98f759c717 Added debug logging, updated readme with new message+event 2020-06-09 16:51:41 -05:00
407a4ec1f2 Added attribution to changelog items 2020-06-09 16:46:01 -05:00
db522ba5db SLCancelDelay message added (#29) 2020-06-09 16:43:09 -05:00
626ca5b64f Added recent work to the changelog 2020-06-09 09:31:14 -05:00
51d5b5a620 Added dependency on debug package, converted console.log to debug logs
I find these console logs valuable for development but don't want them on all the time for everyone. It's cumbersome to comment/uncomment them continually, so this package helps nicely. I generally don't like adding dependencies, but this one seems wildly popular and itself only has one dependency (and that dependencies doesn't depend on anything else). So it seems acceptable to use.

I also enabled these debug logs by default when running the example configuration from VSCode.
2020-06-09 09:25:40 -05:00
71dad9a51b Disabled max-len eslint rule for the entire project
Personally I've never found value in keeping line lengths low and it just leads to code that's awkward to write and read. No sense in disabling this per-file.
2020-06-09 09:22:25 -05:00
c0ac043d7b Added constants for heat modes 2020-06-09 08:47:32 -05:00
ee30cd815e GetPumpStatus isRPMs changed to bool to be consistent with SetPumpStatus 2020-06-09 08:42:26 -05:00
bf3902efe8 Updated formatting/semantics, added missing event/method documentation 2020-06-09 08:41:15 -05:00
e6acd36562 Added helper to get the number of pumps installed in a system 2020-06-09 08:39:38 -05:00
75d642cbfc GetPumpStatus / SetPumpFlow commands (#28)
* 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
2020-06-09 07:49:24 -05:00
219ce110ea Added an extra GitHub action to run SLMessage tests 2020-06-08 22:21:06 -05:00
cd981c19ef Added ability to get circuit info by the device id
This is useful for EquipmentConfiguration and upcoming PumpStatus messages.
2020-06-08 22:14:31 -05:00
8d908aad5d WIP interpretation of equipment configuration properties 2020-06-08 19:05:45 -05:00
6013410525 Ran npm install v1.5.0 2020-06-06 19:04:00 -05:00
95140d112e Preparing for release 2020-06-06 19:02:29 -05:00
db28ef4bbc Updated outdated dependencies 2020-06-06 18:59:39 -05:00
c1ceacbd98 Updated Readme / Added EggTimer Support (#25)
* added setCircuitRuntimeById function
2020-06-06 18:57:58 -05:00
9c72e7b61d Schedule Editing Additions (#24)
* Added support for: adding schedule events, deleting schedule events, listing schedule events and updating scheduled events
2020-06-03 22:07:33 -05:00
def2d8aad4 Fixed typo in github action script 2020-05-25 14:09:56 -05:00
2d6d694aa5 Create nodejs.yml 2020-05-25 14:06:19 -05:00
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