Commit Graph

146 Commits

Author SHA1 Message Date
b2faf57d09 Prepare for 1.8.0 release v1.8.0 2022-04-17 10:47:56 -05:00
c95c9f8ce5 Fix day-of-week handling again
Saturday isn't 0, it's 7.

Add tests to make sure this is working now and forever!
2022-04-17 10:47:45 -05:00
79bff51c17 Satisfy linter 2022-04-15 16:38:29 -05:00
485b494ea8 Add support for reading unit history data
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
2022-04-15 16:38:24 -05:00
4de8a63140 Fix readme typo 2022-04-15 16:24:33 -05:00
e0136a01cd Fix SLDateTime day-of-week calculation
Turns out we were offsetting the wrong direction. This offsets the correct way (verified against a Wireshark capture of the official app).
2022-04-15 16:17:18 -05:00
de8bba63a0 Alphabetize most of the readme sections
And indent the individual messages a bit to help the layout presentation.
2022-04-15 16:13:50 -05:00
77b034ce57 Add reading of SLTimes 2022-04-15 14:55:26 -05:00
0db9e4945e Run npm update 2022-02-01 09:35:32 -06:00
ada16cd355 Run npm audit fix 2022-02-01 09:33:38 -06:00
cbe64bbb2e Update dependencies 2022-01-07 14:34:40 -06:00
4cfffdd9df Drop support for nodejs 10.x, add 14.x and 16.x
Update package.json version
v1.7.0
2021-10-13 14:14:41 -05:00
ba6dac4399 Update changelog, dependencies 2021-10-13 14:12:05 -05:00
f406bccb5d Update coolSetPoint documentation per user findings
Closes #57
2021-09-06 23:09:44 -05:00
a5d207d3aa Add support for setting the current system date/time
#56
2021-09-06 23:02:02 -05:00
f271554d89 Add DateTime writing support to SLMessages
There may be some value in providing a read version of this as well, but
it is comprised of so many properties that I'm leaving that out for now.
If it becomes a need in the future, it will be straightforward to add.
2021-09-06 23:01:42 -05:00
37d40b3386 Add support for retrieving the current system date/time
#56
2021-09-06 23:00:51 -05:00
6f1ee3c13f Add info about add/remove client function events 2021-09-06 22:56:16 -05:00
0b990bbc28 Add links to time conversion functions 2021-09-06 21:51:50 -05:00
2aa14cc114 Fix SLGetScheduleData documentation 2021-09-06 21:51:50 -05:00
bef8e6a379 Bump glob-parent from 5.1.1 to 5.1.2
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-11 07:23:37 -05:00
5bbbfb6f41 Bump lodash from 4.17.20 to 4.17.21
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 22:26:51 -05:00
fa43b3c03e Bump y18n from 4.0.0 to 4.0.1
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-31 14:36:05 -05:00
789f75f4a6 Add missing break 2020-12-12 21:14:41 -06:00
1ea8548991 Add handling/documentation for the scheduleChanged event
See discussion on #44 for more info
2020-12-12 21:12:15 -06:00
542d2f3e94 Disabled scheduled CodeQL runs 2020-11-28 19:44:23 -06:00
5f5b52f1ab Tag new version, update dev dependencies v1.6.1 2020-11-23 08:15:44 -06:00
7f76cb2a54 Update changelog for release 2020-11-23 08:13:43 -06:00
863cd7b1e6 Create codeql-analysis.yml 2020-10-01 11:57:43 -05:00
a53909eaa2 Add table of contents to readme 2020-08-22 21:33:24 -05:00
27bdf0380e Ensure all messages populate the response senderId
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.
2020-08-12 08:51:44 -05:00
8294947f8c Update dev dependencies due to vulnerabilities 2020-08-11 22:31:18 -05:00
b0225c69bd Update to point at the new default branch name 2020-08-11 22:28:07 -05:00
89b8775ce3 Add support for specifying the sender id to each call
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
2020-08-11 22:20:58 -05:00
ab36d17a38 Increase version for NPM-specific fix
I had local changes to the example script that inadvertently were pushed to npm as part of 1.6.0, so that release on npm didn't match the repo's contents.
2020-07-15 20:58:41 -05:00
c36e4cbaa2 Fix changelog release date
Time is meaningless these days anyway...
2020-07-14 15:55:34 -05:00
df22901ea1 Add another missed attribution 2020-07-14 12:51:05 -05:00
b23f488822 Remove specific node versions tested against
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.
2020-07-14 12:50:50 -05:00
d7d10d7408 Update outdated dependencies, fix npm audit v1.6.0 2020-07-14 12:47:21 -05:00
b80807448d Update changelog/package.json for release 2020-07-14 12:46:43 -05:00
2e5203fb85 Adds keepalive setting to socket 2020-06-28 15:40:14 -05:00
0a0c8c7cd0 Bug Fix for decodeValveData / improvedNaming / CIRCUIT_VALUE_MAP (#33)
* initial code to interpret valveDataArray

* Some additional comments on the valveDataArray decoding message

* Adds decodeSensorData, decodeValveData, decodeDelayData, decodeMiscData

* reverts unintended change to index.js

* Refactor / rename variables
	- renamed variables to better describe their use
	- created a helper function 'isValvePresent' to simplify code
	- changed while loop to for loop

* - Fixes bug in decodeValveData where only last valve's data was returned
- renames some variables based on testing to more descriptive names
- add CIRCUIT_NAME_VALUE_MAP for fixed values that the system uses (determined by testing on my system)

* refactored decodeMiscData to simplify code

* - Changed CIRCUIT_NAME_VALUE_MAP to array of objects
- Refactored getCircuitByDeviceId
- Added getCircuitsMap as helper to getCircuitByDeviceId and as a utility function to help in UI development
2020-06-19 09:57:51 -05:00
1e13036faf decodeSensorData, decodeValveData, decodeDelayData, decodeMiscData (#32)
* initial code to interpret valveDataArray

* Some additional comments on the valveDataArray decoding message

* Adds decodeSensorData, decodeValveData, decodeDelayData, decodeMiscData

* reverts unintended change to index.js

* Refactor / rename variables
	- renamed variables to better describe their use
	- created a helper function 'isValvePresent' to simplify code
	- changed while loop to for loop
2020-06-18 16:22:58 -05:00
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