RS485 API

You can connect up to 32 slave devices to a RS485 channel. To connect to a slave device, you have to register it to the master device first.

Config

message RS485Config {
  repeated RS485Channel channels;
  IntelligentPDInfo intelligentInfo;
}
channels
CoreStation has 4 RS485 channels. The other devices has one channel.
intelligentInfo
Some BioStar devices can be attached to 3rd party ACUs using OSDP protocol. In those cases, you can configure additional options. See the article for details.
message RS485Channel {
  uint32 channelID;
  Mode mode;
  uint32 baudRate;
}
mode
baudRate
Available options are 9600, 19200, 38400, 57600, and 115200. The default value is 115200.
enum Mode {
  NOT_USE = 0;
  MASTER = 1;
  SLAVE = 2;
  STANDALONE = 3;
}
MASTER
Only the device in MASTER mode can have slave devices.
SLAVE
Only the devices in SLAVE mode can be added to a device as slaves.
STANDALONE
Default mode.
message IntelligentPDInfo {
  bool useExceptionCode;
  bytes exceptionCode;
  IPDOutputFormat outputFormat;
  uint32 OSDPID;
}
useExceptionCode
If true, send the exceptionCode to the 3rd party ACU when authentication fails.
exceptionCode
8 byte code to be sent to the 3rd party ACU when authentication fails.
outputFormat
The data to be sent to the 3rd party ACU when authentication succeeds.
OSDPID
The unique identifier for the OSDP network.
enum IPDOutputFormat {
  CARDID = 0;
  USERID = 1;
}
CARDID
Send the card ID when authentication succeeds.
USERID
Send the user ID when authentication succeeds.

GetConfig

Get the configuration of a device.

Request
Parameter Type Description
deviceID uint32 The ID of the device
Response
Parameter Type Description
config RS485Config The RS485 configuration of the device

SetConfig

Set the configuration of a device.

Request
Parameter Type Description
deviceID uint32 The ID of the device
config RS485Config The RS485 configuration to be set to the device

SetConfigMulti

Set the configurations of multiple devices.

Request
Parameter Type Description
deviceIDs uint32[] The IDs of the devices
config RS485Config The RS485 configuration to be set to the devices

Slave devices

You can search, add, or delete slave devices on RS485 channels.

message SlaveDeviceInfo {
  uint32 deviceID;
  device.Type type;
  bool enabled;
  bool connected;
  uint32 channelID; 
}

SearchDevice

Search slaves of a device. If the device has more than one RS485 channel, all the channels will be probed at the same time. To access any of the devices found, you have to register them using SetDevice.

Request
Parameter Type Description
deviceID uint32 The ID of the device whose slave devices will be searched
Response
Parameter Type Description
slaveInfos SlaveDeviceInfo[] The slave devices found in the RS485 channels

GetDevice

Get the registered slave devices.

Request
Parameter Type Description
deviceID uint32 The ID of the device
Response
Parameter Type Description
slaveInfos SlaveDeviceInfo[] The slave devices registered to the device

SetDevice

Register the slave devices.

You only have to register slaves once. However, since this information is not stored in the device gateway, you have to use Connect.SetSlaveDevice or ConnectMaster.SetSlaveDevice when the device gateway is reconnected.

Request
Parameter Type Description
deviceID uint32 The ID of the device
slaveInfos SlaveDeviceInfo[] The slave devices to be registered to the device