-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This adds a bunch of messages to retrieve and set various things on the controller. It also groups the messages under one export to simplify the process of using and discovering many of them from one location. Some of these are WIP/probably not portable to other systems. This also adds the ability to set multiple circuits at once.
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ICRequest } from "./request.js"; | ||
/** | ||
* Requests the status of chemical controllers known to this controller. | ||
* | ||
* The response contains the list of chemical controllers available in the `objectList` array. | ||
* For example, an IntelliChem may be one of the entries with `objnam` = `"CHM01"`, `params`.`OBJTYP` | ||
* = `"CHEM"`, `params`.`SUBTYP` = `"ICHEM"` while an IntelliChlor salt cell may be `objnam` = `"CHR01"`, | ||
* `params`.`OBJTYP` = `"CHEM"`, `params`.`SUBTYP` = `"ICHLOR"`. IntelliChlor knows the `"SALT"` level | ||
* while IntelliChem knows the `"PH"` values (PHTNK, PHSET, PHVAL), `"ORP"` values (ORPTNK, ORPSET, ORPVAL), | ||
* `"ALK"` (alkalinity), `"CALC"` (calcium hardness), and `"CYACID"` (cyanuric acid). | ||
* | ||
* pH and ORP Set and Val are in their respective units and orders of magnitude (e.g. 7.6, 750) while the TNK | ||
* levels seem to be on a scale of 1-7 (so "7" would be 100% full). | ||
* | ||
* @returns the object used to issue this request | ||
*/ | ||
export declare function GetChemicalStatus(): ICRequest; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ICRequest } from "./request.js"; | ||
/** | ||
* Requests the list of heaters known to this controller. | ||
* | ||
* The response contains an `objectList` populated with heater information. | ||
* | ||
* @returns the object used to issue this request | ||
*/ | ||
export declare function GetHeaters(): ICRequest; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { GetBodyStatus } from "./body-status.js"; | ||
import { GetChemicalStatus } from "./chem-status.js"; | ||
import { GetSystemConfiguration } from "./configuration.js"; | ||
import { GetHeaters } from "./get-heater.js"; | ||
import { SetHeatMode } from "./set-heater.js"; | ||
import { SetItemStatus } from "./set-status.js"; | ||
import { SetSetpoint } from "./setpoint.js"; | ||
import { GetSystemInformation } from "./system-info.js"; | ||
export declare const messages: { | ||
GetBodyStatus: typeof GetBodyStatus; | ||
GetChemicalStatus: typeof GetChemicalStatus; | ||
GetHeaters: typeof GetHeaters; | ||
GetSystemConfiguration: typeof GetSystemConfiguration; | ||
GetSystemInformation: typeof GetSystemInformation; | ||
SetHeatMode: typeof SetHeatMode; | ||
SetItemStatus: typeof SetItemStatus; | ||
SetSetpoint: typeof SetSetpoint; | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ICRequest } from "./request.js"; | ||
/** | ||
* Requests to turn a body's heater on or off. | ||
* | ||
* This is very WIP. For my pool and my heater configuration, the MODE needs to be 11 to enable my | ||
* heater and 1 to disable all heaters. I have a feeling 11 is unique to my system's configuration, | ||
* but I can't yet determine how to know what 11 maps to in order to make this more generic. | ||
* | ||
* Note that this doesn't necessarily start heating the body by itself - if the body's pump is | ||
* currently off, enabling the heater will not turn it on. If the pump/body is on, then this will | ||
* enable the heater and no further action is required. | ||
* | ||
* @returns the object used to issue this request | ||
*/ | ||
export declare function SetHeatMode(bodyObjnam: string, enabled: boolean): ICRequest; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
import { ICRequest } from "./request.js"; | ||
/** | ||
* Requests the status of bodies known to this controller. | ||
* Requests to change the status of items known to this controller. | ||
* | ||
* The response contains the list of bodies in the `params` field. Each body has | ||
* an `objnam` that should be used to reference that body for future requests. | ||
* When `params`.`STATUS` is `"OFF"`, use `params`.`LSTTMP` to get the temperature | ||
* of the body the last time it was on, or `params`.`TEMP` to get the temperature | ||
* if the `STATUS` is `"ON"`. `LSTTMP` seems to always be accurate, however, whether | ||
* the body is currently on or off. | ||
* Turns one or more items on or off. Use the `objnam` of the circuit to be set. | ||
* | ||
* @returns the object used to issue this request | ||
*/ | ||
export declare function SetItemStatus(item: string, status: boolean): ICRequest; | ||
export declare function SetItemStatus(item: string | string[], status: boolean): ICRequest; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.