Block ott.io.mi.com requests (for unimplemented TCP dummycloud) #671
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ot is for UDP, ott is for TCP cloud connect which isn’t implemented by our dummycloud
This causes trouble, when miio_client thinks it has a TCP server in its list and even when unreachable they don’t seem to get removed again…
There are still quirks to the local development setup. Because of regular (/etc/hosts) DNS resolution fallback, miio_client actually manages sometimes (esp when restarting Valetudo locally) to establish a dummycloud connection with 127.0.0.1 and it then takes a while (~10 minutes in my early observations) to eventually retry the configured development host. We’ll probably need a config variant that disables the dummycloud entirely when only serving /gslb requests.
And in case anybody else is looking into debugging miio_client behavior. It logs to stdout by default which isn’t very useful in detached state, but it does take commandline arguments:
-l 4 -L /tmp/miio.log
will give you more detailed understanding of what’s going on.