Closed trkks closed 11 months ago
If you're removing the .local
part, you're not using mdns name but the docker created static hostname. And the .local
needs to be included in the discovery.
https://www.w3.org/TR/wot-discovery/#introduction-dns-sd-sec
So in the above case you should be connecting - according the discovery - to the address returned by thingi._webthing._tcp.local
, not the domain name, using the protocol it tells to use.
Check this shit out: https://gitlab.jyu.fi/wasmiot/flask-demo/-/blob/master/thingi/client.py
Ok so I now make the queries to devices on the first IP address in mDNS "responses" in 91e4c42e75041c5771d159a36b319e4228eeabde. This is probably not the intended way, but at least the devices should be available in non-Docker networks if I understood correctly?
Apparently there was another place where I forgot to remove this from, but should be all good now.
With the current supervisor in my understanding on this line, the supervisor defines itself its special top level domain, but the node-library for mDNS (bonjour) does not remove this nor does Docker-compose seem to understand it when accessing the device by its internal (i.e., network created by Docker) hostname.
Currently this is handled by removing the suffix, which feels dumb.
Here's what querying HTTP on
<hostname>.local
results in on the orchestrator: