This release adds support for the WaveshareV2 relay board. It also uses a new version of brewdrivers with a lot of improvements.
Changes
This adds support for WaveshareV2. It is treated as a totally separate controller from V1, so you can still use both concurrently if necessary. The usage of the new version in the CLI is the same as the old one; just configure your devices properly in your configuration file.
Note that I have not added support for changing a controllers baudrate in the CLI. This is coming in the next version. For now, stick with the defaults
STR1: 9600
Waveshare (v1/v2): 9600 (?)
CN7500: Set on the screen with the menu buttons (can't be changed through software)
Changes to the Configuration File
The configuration file has added a few fields. These are required for the config file to read successfully. See this page for a full list of the keys with explanations. Here's an example device as an example
name: Test Bed
id: test-bed
ip_addr: 0.0.0.0
devices:
- id: omega1
name: Omega PID
conn: # conn = connection details
port: /dev/ttyUSB0
baudrate: 19200
timeout: 35
controller: CN7500
controller_addr: 22
addr: 0
- id: relay0
name: STR1 Relay 0
conn:
port: /dev/ttyUSB0
baudrate: 38400
timeout: 16
controller: STR1
controller_addr: 254
addr: 0
- id: wsrelay0
name: WaveshareV2 Relay 0
conn:
port: /dev/ttyUSB0
baudrate: 38400
timeout: 40
controller: WaveshareV2 # This now supports WaveshareV2. It is treated as a totally separate controller type
controller_addr: 1
addr: 0Installation
# First, uninstall old versions if necessary
$ cargo uninstall NBC_cli
# Then resinstall. Make sure it's version 4.5.0
$ cargo install NBC_cli