Ensure the "Web Thing: Native web thing support" addon is enabled:
Then, run the Rust example:
cargo run
[main] Starting server
setting new humidity level: 0.12784115970134735
setting new humidity level: 22.60777473449707
setting new humidity level: 30.48933982849121
setting new humidity level: 16.809547424316406
setting new humidity level: 14.687156677246094
Then, scan for devices:
NOTE I renamed the devices to be prefixed Rusty to confirm this was working.
Alternatively:
avahi-browse --all | grep _webthing._tcp
+ wlp6s0 IPv6 RustyDevice _webthing._tcp local
+ enp5s0 IPv6 RustyDevice _webthing._tcp local
+ enp5s0 IPv4 RustyDevice _webthing._tcp local
NOTEavahi-browse finds ThingsType::Multiple by the multiple's name. But (see below), will find ThingsType::Single by the device name, e.g.:
- wlp6s0 IPv6 RustyDevice _webthing._tcp local
- enp5s0 IPv4 RustyDevice _webthing._tcp local
- enp5s0 IPv6 RustyDevice _webthing._tcp local
mDNS Service Discovery (mDNS-SD) now works correctly.
Fixed: #52
It's not easy to provide Rust-based unit test for this (see #53).
However, the service publication can be shown to work using the gateway:
Then browsing the Gateway's UI:
Ensure the "Web Thing: Native web thing support" addon is enabled:
Then, run the Rust example:
Then, scan for devices:
Alternatively: