Repository navigation
Releases: electrification-bus/rust-sdk
Releases · electrification-bus/rust-sdk
Release list
v0.1.1
Added
- The
tree-deviceexample, a parent/child device tree with a grandchild on one connection and settable properties on two children, and thesetexample, which sends one/setonce the device has synced, waits until the device reports the value and exits with a code for each outcome.
Fixed
- The mdns-sd backend asks for a host's addresses when a service resolves without an IPv4 address, so a broker whose IPv4 answer comes in a later packet gains its IPv4 address within seconds.
v0.1.0
Added
doc/python-sdk.md, a guide for python-sdk users mapping each python-sdk pattern to rust-sdk, with code compiled as doctests of the unpublishedguide-doctestworkspace member, which also compiles the root README's examples.- Cargo workspace with the crates
ebus-homie,ebus-mqtt,ebus-discoveryandebus-homie-tokio, and CI for rustfmt, clippy, tests on Rust 1.85, 1.91.1 and stable, ano_stdbuild of the core crates, and rustdoc. - Homie 5 controller role: the sans-IO controller in
ebus-homie, MQTT topic filters and subscription ownership inebus-mqtt, the tokio driver inebus-homie-tokio, and the bundled rumqttc 0.25 connection in the newebus-rumqttccrate, with awatchexample and end-to-end tests against mosquitto. check_valuefor checking a payload against its property, andfloat32payload formatting.- Homie 5 device role: the sans-IO device tree in
ebus-homie, typed property, settable and event handles and the device driver inebus-homie-tokio, anddevice()on the bundled rumqttc connection, with adeviceexample, end-to-end tests against mosquitto and python-sdk, and a benchmark. RoleandPairinebus-mqtt, which run a device and a controller on one connection (ebus_rumqttc::pair,attach_pair).- The eBus DNS-SD contract in
ebus-discovery: service types and broker preference, TXT record decoding, checks and building, the advertisement model and instance names, merging mDNS sightings into instances, broker ranking in the client's preference order among broker types, matching and selection, finding a broker by a device id any of its transports carries, and the sans-IOBrokerSearch, with vectors generated from python-service-discovery. ebus-discovery-tokio: theBackend,BrowseandGroupseam;Mdnswith the Avahi backend over D-Bus (featureavahi, Linux) and the mdns-sd backend (featuremdns-sd),Mdns::systemfalling back to mdns-sd without avahi-daemon;list_brokers,find_brokerandreresolve;advertiseandAdvertiser, with instance-name and host-name collision handling, TXT updates that send only what changed, and withdrawal on drop.ebus_rumqttc::ReresolveandreresolveonControllerTask,DeviceTaskandPairTask: after the first failed connect since startup or since the last successful connect, and every third after it, the hook's options replace the connection's, with the device's will, clean session, inflight cap and packet limit applied as at startup.MdnsSdOptions::interfaceslimits the mdns-sd backend to the named interfaces.- The
watchanddeviceexamples find their broker over mDNS when neitherEBUS_MQTT_HOSTnorEBUS_MQTT_PORTis set, takeEBUS_BROKER_MODEandEBUS_MDNS_BACKEND, and find a discovered broker again after its address changes. - The
simple-span-controllerexample, a port of python-sdk's: it finds a SPAN panel's broker over mDNS by the SRV targetspan-<serial-number>.local, reads the password from the span-auth file, verifies TLS against the panel's cached or downloaded CA certificate under the panel's host name, and reports the MID'sgridnode and the enclosure'spower-flows. - MQTT 5 room in
ebus-mqtt:Message,LastWill,Link,Link::Upand eachCommandvariant are#[non_exhaustive]; build them withMessage::new,LastWill::new,Link::up,Command::subscribe,Command::unsubscribeandCommand::publish, and match them with.., andLinkwith a_arm. #[non_exhaustive]on each struct variant ofcontroller::Eventanddevice::DeviceEvent, onPropertyDescription,NodeDescription,DeviceDescription,DeviceSpec,NodeSpec,PropSpec,SetOptions,PropertyView,controller::Value,description::Ignored,Delivered,AttachedController,AttachedDevice,AttachedPair,RunningController,RunningDevice,RunningPair,BrokerEndpoint,BrokerType,EbusTxt,TxtReport,Instance(built withInstance::new) andServiceRecord. New chained setters:DeviceSpec::name,DeviceSpec::extension,DeviceSpec::extra,NodeSpec::name,SetOptions::allow_not_readyandSetOptions::unchecked.BROKER_TYPES,TCP_BROKER_TYPESandBrokerSearch::browse_typesare slices.- The controller's entry points are named like the device's and the pair's:
attach_controller,AttachedController,ControllerOptions,RunningControllerandcontroller_client_id. The core tree builder isebus_homie::device::TreeBuilder, the broker configuration errorBrokerConfigError, andDeviceState's parse errorParseStateError;ControllerHandle::deviceanddevicesreturnDeviceView.DirtySetis internal toebus-homie-tokio, andebus_homie::pyfmtis hidden from the documentation. - Every
ebus-homieerror type implementscore::error::Errorwithoutstd.ebus_discovery_tokio::Error,ebus_rumqttc::ErrorandAttachErrorprint only their own context and return the error they wrap fromsource(). ebus_homie::serde_jsonandebus_homie_tokio::bytesre-export the crates those types come from;DebugforMdnsBrowse,MdnsGroupandReconfigure; docs.rs builds every crate with all features and marks feature-gated items.- Each crate has a README, crates.io keywords and categories, and ships its LICENSE; a
v*tag publishes the six crates to crates.io and creates the GitHub release through.github/workflows/release.yml.