Skip to content

Rust library implementing deCONZ Serial Protocol

Notifications You must be signed in to change notification settings

adetante/deconz-sp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deconz-sp

A tokio-based Rust library that implements deCONZ Serial Protocol to interact with deCONZ devices.

Based on Serial Protocol specifications, tested with the ConBee USB gateway.

⚠️ Work in progress, library is not finalized. Do not use in production. ⚠️

Build

cargo build
cargo test

Example

See example/src/main.rs for a working example.

deconz_sp::Client wraps the communication with the device.
The Tokio runtime must be started to use the client.

tokio::run(futures::lazy(|| {
        let (client, notifications) = deconz_sp::Client::new("/dev/tty.usbserial-DM00ZSS9")
            .expect("Cannot initialize deCONZ client");
        // ...
}))

deconz_sp::Client::new returns a tuple (Client, Stream<Item = IncomingPayload>) where Client is used to send requests to device, and Stream is the stream of unsolicited received messages.

Run the example:

RUST_LOG=deconz_sp=TRACE cargo run

Built With

About

Rust library implementing deCONZ Serial Protocol

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages