Added handling of the system disliking function arguments
Updated readme with failure events that are triggered
This commit is contained in:
@ -206,6 +206,8 @@ Sets the heating setpoint for any body. See [`SLSetHeatSetPointMessage`](#slseth
|
|||||||
* `controllerConfig` - Indicates that a response to `getControllerConfig()` has been received. Event handler receives a [`SLControllerConfigMessage`](#slcontrollerconfigmessage) object.
|
* `controllerConfig` - Indicates that a response to `getControllerConfig()` has been received. Event handler receives a [`SLControllerConfigMessage`](#slcontrollerconfigmessage) object.
|
||||||
* `circuitStateChanged` - Indicates that a response to `setCircuitState()` has been received. Event handler receives a [`SLSetCircuitStateMessage`](#slsetcircuitstatemessage) object.
|
* `circuitStateChanged` - Indicates that a response to `setCircuitState()` has been received. Event handler receives a [`SLSetCircuitStateMessage`](#slsetcircuitstatemessage) object.
|
||||||
* `setPointChanged` - Indicates that a response to `setSetPoint()` has been received. Event handler receives a [`SLSetHeatSetPointMessage`](#slsetheatsetpointmessage) object.
|
* `setPointChanged` - Indicates that a response to `setSetPoint()` has been received. Event handler receives a [`SLSetHeatSetPointMessage`](#slsetheatsetpointmessage) object.
|
||||||
|
* `loginFailed` - Indicates that a remote login attempt via supplying a system address and password to `UnitConnection` has failed likely due to the incorrect password being used.
|
||||||
|
* `badParameter` - Indicates that a bad parameter has been supplied to a function. This can be triggered, for example, by sending the wrong controller ID to a `set` function.
|
||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
|
4
index.js
4
index.js
@ -259,6 +259,10 @@ class UnitConnection extends EventEmitter {
|
|||||||
// console.log(" it's a login failure.");
|
// console.log(" it's a login failure.");
|
||||||
this.emit('loginFailed');
|
this.emit('loginFailed');
|
||||||
break;
|
break;
|
||||||
|
case 31:
|
||||||
|
// console.log(" it's a parameter failure.");
|
||||||
|
this.emit('badParameter');
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// console.log(" it's unknown. type: " + msgType);
|
// console.log(" it's unknown. type: " + msgType);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user