Get the status of the gateway's learn mode.
Get the gateways's base ID. This ID can be changed a limited number of times.
Get the number of available resets for the base ID. The base ID of a TCM310 transceiver can be reset up to 10 times.
Get the gateway's chip ID. This ID is the unique EnOcean ID of the connected transceiver and cannot be changed.
Get the (teach-in) meta data associated to the supplied device.
The device to be queried.
Get a list of EEPs for which a parser is registered.
Checks if there is a parser for the given EEP.
Check if the supplied device id can be used for sending with this gateway. This is the case if (and only if) the supplied id is
The device id to be checked.
Register a listener to be called when a device was successfully taught in.
This function will be called once a device was successfully taught in.
Register a listener to be called when an EEP message is received.
This function will be called whenever an EEP message is received.
Register a listener to be called when an ERP1 telegram is received. The listener will be called before any further internal processing of the ERP1 telegram.
This function will be called whenever an ERP1 telegram is received.
Register a listener to be called when a received ERP1 telegram was classified as unfamiliar. This is the case if and only if the further internal processing of the telegram was unsuccessful.
This function will be called when when a received ERP1 telegram was classified as unfamiliar.
Register a listener to be called when an ESP3 packet is received. The listener will be called before any further internal processing of the ESP3 packet.
This function will be called whenever an ESP3 packet is received.
Register a listener to be called when a received ESP3 packet was classified as unfamiliar. This is the case if and only if the further internal processing of the packet was unsuccessful.
This function will be called when when a received ESP3 packet was classified as unfamiliar.
Register a listener to be called when learning mode ended.
This function will be called whenever the learning mode ended.
Send a telegram via radio.
The telegram to be sent. If this telegram contains an invalid sender address, the telegram will be sent using:
Send the supplied ESP3 packet. Note: this low level method does not perform any checks/replacements on the sender id for ERP1 telegrams.
The packet to be sent.
Set the gateway into learning mode.
The timeout (in seconds) after which the learning mode will be disabled automatically.
The sender ID to be used for the learning process. Can be either the sender's chip id or one of the 128 consecutive adresses starting at the sender's base id. Defaults to the sender's chip id.
Manually stop the learning mode.
Manual teach in of a device. Use with care: might overwrite existing info.
The device id of the device to be taught in.
The device's EEP.
The device's manufacturer.
The local id which shall be used when sending to the device. Defaults to the gateway's chip id.
Return a new instance using the supplied serial port.
A string identifying the serial port to which the TCM310 module is connected; this might e.g. be "/dev/ttyAMA0" (for the EnOceanPi module on a Raspberry Pi) or "COM3" (for a USB300 module in Windows).
A DeviceInfoMap implementation to be used for storing and retreiving information about the EnOcean devices with which this gateway can communicate. Default is a JSONFileDeviceInfoMap using the default file '.known_enocean_devices'.
Get a list of all available serial ports. Note that this function returns all ports - it does not check whether a suitable transceiver module is connected to the port!
Generated using TypeDoc
This class implements the core functionality of an EnOcean gateway. Currently it has only been tested with an EnOcean TCM310 module.
Initialization
The constructor of this class is private. To obtain an instance, the only currently available option is to use the static function connectToSerialPort.
Automatic interpretation of incoming data
This class automatically interprets all incoming data as far as possible. The receiving chain is outlined below.
Trigger: Data is received on the serial port.
Try to interpret the received data as ESP3 packet:
Try to interpret the ESP3 packet:
Try to interpret the ERP1 telegram:
Identify the sender (check if the device is known):
Get the EEP:
Get a parser for the EEP:
Parse the data:
As you can see above, for all types of involved data structures (ESP3Packet, ERP1Telegram, EEPMessage) the gateway always notifies the sucessful parsing. For the first two, it is possible that further processing fails in which case the respective unfamiliar event will be triggered. This way, you can implement your own functionality either for all data or only for data, which cannot be interpreted (yet) by built-in functionality.