# new SystemAccessPoint(hostName, userName, password, tlsEnabled, verboseErrors, logger)
Constructs a new SystemAccessPoint instance
Parameters:
Name | Type | Default | Description |
---|---|---|---|
hostName |
string
|
The system access point host name. |
|
userName |
string
|
The user name that shall be used to authenticate with the system access point. |
|
password |
string
|
The password that shall be used to authenticate with the system access point. |
|
tlsEnabled |
boolean
|
true | Determines whether the communication with the system access point shall be protected by TLS. |
verboseErrors |
boolean
|
false | Determines whether verbose error messages shall be used, for example for message validation. |
logger |
Logger
|
The logger instance to be used. If no explicit implementation is provided, the this.logger will be used for logging. |
Classes
Members
# basicAuthKey
The basic authentication key used for requests.
# tlsEnabled
Determines whether requests to the system access point will use TLS.
Methods
# connectWebSocket(certificateVerification) → {void}
Connects to the System Access Point web socket.
Parameters:
Name | Type | Description |
---|---|---|
certificateVerification |
boolean
|
Determines whether the TLS certificate presented by the server will be verified. |
void
# async createVirtualDevice(sysApUuid, deviceSerial, virtualDevice) → {Promise.<VirtualDeviceResponse>}
Creates a new virtual device.
Parameters:
Name | Type | Description |
---|---|---|
sysApUuid |
string
|
The UUID identifying the system access point. |
deviceSerial |
string
|
The serial number to be assigned to the device. |
virtualDevice |
VirtualDevice
|
The virtual device to be created. |
The response to the virtual device request.
Promise.<VirtualDeviceResponse>
# disconnectWebSocket(force) → {void}
Disconnects from the System Access Point web socket.
Parameters:
Name | Type | Description |
---|---|---|
force |
boolean
|
Determines whether or not the connection will be closed forcibly. |
void
# async getConfiguration() → {Promise.<Configuration>}
Gets the configuration from the system access point.
The system access point configuration.
Promise.<Configuration>
# async getDatapoint(sysApUuid, deviceSerial, channel, dataPoint) → {Promise.<GetDataPointResponse>}
Gets the specified data point from the system access point.
Parameters:
Name | Type | Description |
---|---|---|
sysApUuid |
string
|
The UUID idenfifying the system access point. |
deviceSerial |
string
|
The device serial number. |
channel |
string
|
The channel identifier. |
dataPoint |
string
|
The datapoint identifier. |
The response to the get data point request.
Promise.<GetDataPointResponse>
# async getDevice(sysApUuid, deviceSerial) → {Promise.<DeviceResponse>}
Gets the specified device from the system access point.
Parameters:
Name | Type | Description |
---|---|---|
sysApUuid |
string
|
The UUID identifying the system access point. |
deviceSerial |
string
|
The device serial number. |
The response to the device request.
Promise.<DeviceResponse>
# async getDeviceList() → {Promise.<DeviceList>}
Gets the device list from the system access point.
The requested device list.
Promise.<DeviceList>
# getWebSocketMessages() → {Observable.<WebSocketMessage>}
Gets the web socket messages.
An observable that is updated with the messages received from the web socket.
Observable.<WebSocketMessage>
# async setDatapoint(sysApUuid, deviceSerial, channel, dataPoint, value) → {Promise.<SetDataPointResponse>}
Sets a new value for the specificed data point.
Parameters:
Name | Type | Description |
---|---|---|
sysApUuid |
string
|
The UUID idenfifying the system access point. |
deviceSerial |
string
|
The device serial number. |
channel |
string
|
The channel identifier. |
dataPoint |
string
|
The datapoint identifier. |
value |
string
|
The new value to be set. |
The response to the set data point request.
Promise.<SetDataPointResponse>
# async setProxyDeviceValue(sysApUuid, deviceClass, deviceSerial, value) → {Promise.<DeviceResponse>}
Sets the given value for the specified proxy device. Please note that this method is part of the experimental API!
Parameters:
Name | Type | Description |
---|---|---|
sysApUuid |
string
|
The UUID idenfifying the system access point. |
deviceClass |
string
|
The device class. |
deviceSerial |
string
|
The device serial number. |
value |
string
|
The value to be set. |
The response to the request.
Promise.<DeviceResponse>
# async triggerProxyDevice(sysApUuid, deviceClass, deviceSerial, action) → {Promise.<DeviceResponse>}
Triggeres the given action for the specified proxy device. Please note that this method is part of the experimental API!
Parameters:
Name | Type | Description |
---|---|---|
sysApUuid |
string
|
The UUID idenfifying the system access point. |
deviceClass |
string
|
The device class. |
deviceSerial |
string
|
The device serial number. |
action |
string
|
The action to be triggered. |
The response to the request.
Promise.<DeviceResponse>