Collection of temperature controller functions
Methods
(static) close(controllerId)
Closes the tempearture controller
Parameters:
Name | Type | Description |
---|---|---|
controllerId |
Number | Controller ID |
(static) getCurrentTemperature(controllerId) → {Number}
Measures the current temperature
Parameters:
Name | Type | Description |
---|---|---|
controllerId |
Number | Controller ID |
Returns:
- Type
- Number
(static) getTargetTemperature(controllerId) → {Number}
Gets the target temperature currently configured
Parameters:
Name | Type | Description |
---|---|---|
controllerId |
Number | Controller ID |
Returns:
- Type
- Number
(static) open(controllerType, options) → {Number}
Opens a new temperature controller
Example
const options = { host: 'localhost', port: 2000 }
const id = temperatureController.open('nex1000', options)
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
controllerType |
String | Temperature controller type Supported controllers
|
||||||||||||||||||||
options |
Object | controller options Properties
|
Returns:
- Type
- Number
(static) setTargetTemperature(controllerId, temperature)
Sets the target temperature
Example
const options = { host: 'localhost', port: 2000 }
const id = temperatureController.open('nex1000', options)
temperatureController.setTargetTemperature(id, 60)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
controllerId |
Number | Controller ID |
||
temperature |
Number | Target temperature |
||
options.precision |
Number |
<optional> |
1
|
Sets an error margin for the target temperature. Measured in degrees. |
options.timeout |
Number |
<optional> |
600
|
Sets Maximum time to wait until target temperature reached. Measured in seconds. |
options.interval |
Number |
<optional> |
10
|
Sets how often current temperature should be measured. Measured in seconds. |
(static) stopOperation(controllerId)
Stops the tempearture controller
Parameters:
Name | Type | Description |
---|---|---|
controllerId |
Number | Controller ID |