first
This commit is contained in:
commit
1bbd7c3573
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
/.vscode
|
||||||
|
/target
|
||||||
|
/Cargo.lock
|
||||||
31
Cargo.toml
Normal file
31
Cargo.toml
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
[package]
|
||||||
|
name = "toes-matter"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
license = "MIT OR Apache-2.0"
|
||||||
|
readme = "README.md"
|
||||||
|
publish = false
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["zeroconf"]
|
||||||
|
zeroconf = ["rs-matter/zeroconf"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
async-io = "2"
|
||||||
|
embassy-futures = "0.1"
|
||||||
|
embassy-time = { version = "0.5", features = ["std"] }
|
||||||
|
embassy-time-queue-utils = { version = "0.3", features = ["generic-queue-64"] }
|
||||||
|
env_logger = "0.11"
|
||||||
|
futures-lite = "2"
|
||||||
|
log = "0.4"
|
||||||
|
rand = { version = "0.8", features = ["std", "std_rng"] }
|
||||||
|
rs-matter = { path = "../../rs-matter/rs-matter", default-features = false, features = [
|
||||||
|
"log",
|
||||||
|
"os",
|
||||||
|
"rustcrypto",
|
||||||
|
"zbus",
|
||||||
|
"max-sessions-32",
|
||||||
|
"max-groups-per-fabric-12",
|
||||||
|
"max-group-keys-per-fabric-2",
|
||||||
|
"max-group-endpoints-per-fabric-3",
|
||||||
|
] }
|
||||||
38
README.md
Normal file
38
README.md
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
# toes-matter
|
||||||
|
|
||||||
|
Tiny facade around `rs-matter` for the Toes RGB light flow:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
#![recursion_limit = "256"]
|
||||||
|
|
||||||
|
fn main() -> toes_matter::Result<()> {
|
||||||
|
env_logger::init_from_env(
|
||||||
|
env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"),
|
||||||
|
);
|
||||||
|
|
||||||
|
futures_lite::future::block_on(async {
|
||||||
|
toes_matter::generate_credentials("./creds").await?;
|
||||||
|
toes_matter::provision().await?;
|
||||||
|
toes_matter::listen().await
|
||||||
|
})
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Runtime assumptions
|
||||||
|
|
||||||
|
- Linux + BlueZ on system D-Bus
|
||||||
|
- `wpa_supplicant` controlling the Wi-Fi interface
|
||||||
|
- `wpa_cli`, `ip`, and a DHCP client available
|
||||||
|
- `rgbled` in `$PATH`
|
||||||
|
- Avahi/zeroconf for mDNS
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
- `TOES_MATTER_CREDS_DIR` / `MATTER_CREDS_DIR` default: `./creds`
|
||||||
|
- `TOES_MATTER_STATE_DIR` / `MATTER_KV_DIR` default: `<creds>/state`
|
||||||
|
- `TOES_MATTER_WIFI_IFACE` / `MATTER_WIFI_IFACE` default: `wlan0`
|
||||||
|
- `RGBLED_ORDER` default: `grb`
|
||||||
|
|
||||||
|
## Development credentials
|
||||||
|
|
||||||
|
`generate_credentials()` writes rs-matter's built-in development/test DAC/PAI/CD and the test PAA trust-store cert. These are for local development, not production.
|
||||||
BIN
credentials/Chip-Test-PAA-FFF1-Cert.der
Normal file
BIN
credentials/Chip-Test-PAA-FFF1-Cert.der
Normal file
Binary file not shown.
13
examples/basic.rs
Normal file
13
examples/basic.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#![recursion_limit = "256"]
|
||||||
|
|
||||||
|
fn main() -> toes_matter::Result<()> {
|
||||||
|
env_logger::init_from_env(
|
||||||
|
env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"),
|
||||||
|
);
|
||||||
|
|
||||||
|
futures_lite::future::block_on(async {
|
||||||
|
toes_matter::generate_credentials("./creds").await?;
|
||||||
|
toes_matter::provision().await?;
|
||||||
|
toes_matter::listen().await
|
||||||
|
})
|
||||||
|
}
|
||||||
1140
src/lib.rs
Normal file
1140
src/lib.rs
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user