sengled-rs
Tiny API wrapper over Sengled smart home devices. Loose port of ha-sengledapi to Rust.
Installation
Use cargo add sengled.
Usage
See some examples.
async
Optimization
You can use .with_preferred_qos on sengled::Client to control the MQTT QoS
by which MQTT messages are delivered.
You can use .with_skip_server_check() on sengled::Client before starting the
client to skip the server check. By default, the wrapper will contact an API
endpoint and gather some information about the target MQTT broker server. In my
testing, this has not changed, so when using .with_skip_server_check(), the
wrapper will use constant defaults and save an API call.
You can use .start(session) instead of .login_and_start() if you already
have the jsessionId for your Sengled account. .login_and_start() returns
this jsessionId so you can cache this value and use .start(session) later to
save an API call.