Basic
The bOS Basic Driver is used to integrate custom devices that communicate through TCP, UDP, or Serial connections.
Table of contents
Connection types
In bOS, several connection types are available, including:
Serial
TCP
UDP
TCP Server
The connection settings must be configured according to the selected communication type.
For a Serial connection, make sure the correct COM port and serial communication parameters are selected.
For a TCP or UDP connection, configure the correct IP address and port of the connected device.
For a TCP Server connection, bOS acts as the server and waits for incoming communication from the connected device or system.
The bOS Basic Driver is useful when integrating devices that do not have a dedicated ComfortClick driver but support communication through standard network or serial protocols.
In case received data must be parsed, parsing settings need to be set according the format of received data: text (regex), json or xml. Changing the encoding (ASCII, UTF7,8,32 depending on the input data)
Example of Basic driver functionalities with a TCP connection type and basic Json line command sending and parsing certain values out of that command. Correct IP’s and parsing must of course be set before. To add the Json text in add a Command device under Basic node.
Video of a complete integration of your Denon speaker through advanced JSON data parsing and visualization control setup can be found in the link below:
https://www.youtube.com/watch?v=Nu1zR4rwJa8Values and Parsing
Below the connection settings we have Values for our Basic driver is where we can see values received from the device. If the connection is set correctly, types and decoder, we should receive information from the device. We receive encoded and raw data.
The received data can then be parsed out using any online parser tool.
Very useful and powerful online parser tool can be found here: http://regexstorm.net/
We can browse trough the regex reference and find the correct parser to get the data we want out of the command (e.g. receiving and parsing temperature data from received command).
Most AI tools can parse data with regex. Ask your preferred AI agent to extract the specific strings you need.
Basic Command
When using a Command, make sure the command Type is configured correctly.
In this example, the type is set to Text. The JSON command is then entered into the Text Data field.
For HEX-based commands, a new line command can also be defined. In this example, the new line command is set to 0D.
The Text Data field contains the encoded data that will be sent from bOS to the connected device or system. The receiving device must then parse the received data and process it according to its own protocol or command structure.
Commands can also be sent automatically by using one of the following options:
Cyclical Sending
Sends the command repeatedly at a defined interval.Send Trigger
Sends the command when a selected event or value change occurs in the configuration.
This allows custom commands to be sent manually, cyclically, or automatically based on project logic.
Parsers
Depending on the receiving values, we need to add the correct device (integer, boolean, double, string..) under the Basic node. If a device sends a string value and we have a integer device set under the basic, the received data will be incorrect.
We need to add the correct variable according to the data received.
Each device has a different regex option with additional features (true/false text, decimal marks...)
Parsed Data
When data is received via our Basic driver and correctly selected device (in this case Double), we must set correct regex code to get the correct data out.
We of course use http://regexstorm.net/ or our favourite AI tool to parse data and type the regex values under Regex field in bOS.
If regex code is typed correctly for the received command, we can check Values field and check the parsed data out. If everything is set correctly, we should receive current temperature information from the device.
We can also chose between decimal point or decimal comma, depending of course on the data received.