This RUST project can read and write a R4DCB08 temperature collector/monitor from the command line.
The following hardware is required for this project:
- One or more R4DCB08 temperature collectors.
- One or more DS18B20 temperature sensors.
- One USB-RS485 converter.
- Operating Voltage: DC 6-24 Volt
- Operating Current: 8-13 Milli-Ampere (depending on the connected DS18B20)
- Up to 8 DS18B20 temperature sensors can be connected
- Measurable temperature range -55°C to +125°C
- 0.5° accuracy from -10°C to +85°C
- Install Rust e.g. using these instructions.
- Ensure that you have a C compiler and linker.
- Clone
git clone https://github.com/acpiccolo/R4DCB08-Temperature-Collector.git
- Run
cargo install --path .
to install the binary. Alternatively, check out the repository and runcargo build --release
. This will compile the binary totarget/release/tempcol
.
To see all available commands:
tempcol --help
For RTU Modbus connected temperature collectors:
tempcol rtu-scan
tempcol rtu --address 1 --baudrate 9600 read
For TCP Modbus connected temperature collectors:
tempcol tcp 192.168.0.222:502 read
You can even use this tool as a daemon for a MQTT broker:
tempcol rtu --address 1 --baudrate 9600 daemon mqtt --username my_name --password my_secret mqtt://localhost:1883
Feature | Purpose | Default |
---|---|---|
tokio-rtu-sync |
Enable the implementation for the tokio modbus synchronous RTU client | ✅ |
tokio-rtu |
Enable the implementation for the tokio modbus asynchronous RTU client | ✅ |
tokio-tcp-sync |
Enable the implementation for the tokio modbus synchronous TCP client | - |
tokio-tcp |
Enable the implementation for the tokio modbus asynchronous TCP client | - |
bin-dependencies |
Enable all features required by the binary | ✅ |
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.