|Best way to implement Discovery without known thingtype [message #1769416]
||Mon, 31 July 2017 12:14
| Marcel Verpaalen
Registered: September 2014
I'm trying to improve discovery for miio.|
The challenge is that the thingType is only known once a secret is provided. Only with the secret the thing can be queried for it's thingType.
I see 2 scenario's that could be possible
1) Discover the generic type, add ti to the inbox as a generic type, Let the user accept the discovery result and create the thing. Than the user can add the secret.
Once the secret is added, discovery the thingType. Change the thing to the proper thingType.
Challenge with this approach is that it is not directly eas/possible to change a thingType
2) Start the same as approach 1: Discover the generic type, add ti to the inbox as a generic type, Let the user accept the discovery result and create the thing. Than the user can add the secret.
Than add a new discovery result with the right thingType and the user can accept it as usual.
Challenge with this approach is that the user ends with 2 things, the now obsolete generic thing and the proper one.
In both cases, the additional challenge is how to prevent the discovery to discover the thing again as generic type once it is known with the proper thingType.
The way I currently envision is to use the ExtendedDiscoveryService and test for each possible thingType, and if all non-existent add it with the generic type.
Anyway, any suggestions on how to best handle this flow?
Is there a easy way to change the thingType for a thing?
Powered by FUDForum
. Page generated in 0.03199 seconds