mirror of
https://github.com/parnic/node-intellicenter.git
synced 2025-06-17 02:21:53 -05:00
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.
25 lines
734 B
TypeScript
25 lines
734 B
TypeScript
import { GetRequest, ICRequest, ICRequestObj } 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 function GetHeaters(): ICRequest {
|
|
const req = GetRequest();
|
|
req.command = "GetParamList";
|
|
req.condition = "OBJTYP = HEATER";
|
|
req.objectList = [];
|
|
|
|
const reqObj = new ICRequestObj();
|
|
reqObj.objnam = "ALL";
|
|
reqObj.keys = [
|
|
"OBJTYP: SUBTYP: SNAME: LISTORD: STATUS: PERMIT: TIMOUT: READY: HTMODE : SHOMNU : COOL : COMUART : BODY : HNAME : START : STOP : HEATING : BOOST : TIME : DLY : MODE",
|
|
];
|
|
req.objectList.push(reqObj);
|
|
|
|
return req;
|
|
}
|