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.
* 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
* 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
* 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
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.
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.
* 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
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.
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.