Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Discovery 'stages'
Discovery 'stages' [message #1700592] Sat, 04 July 2015 09:14 Go to next message
Chris Jackson is currently offline Chris JacksonFriend
Messages: 256
Registered: December 2013
Senior Member
I'm wondering if we need a 'stage' concept for the discovery process...

The problem I've got is that in zwave it may take some time to work out the 'thing type' - especially for battery devices. By 'some time' I mean hours, or even a day as I know some people have their battery devices configured to only wake up once a day! For mains powered devices this isn't a problem as we can get the required information quick enough to avoid any confusion.

As it stands, I need to know the thingType before I can show that a device is discovered - even though I know that the device exists much earlier. I fear that this delay will cause questions like "I've added my device, but it doesn't show up"... When the device is first discovered, I will know the thingID, but not the thingType - I'm wondering if we should have some sort of state that allows this new thing to be presented in the inbox in a "discovery in progress" stage (or something similar).

Chris
Re: Discovery 'stages' [message #1700985 is a reply to message #1700592] Wed, 08 July 2015 13:52 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
What exactly DO you know about the device in this "early" discovery stage? Just some address and nothing more? Does it mean that you also would not be able to "approve" such a discovery result in this stage?
Re: Discovery 'stages' [message #1700986 is a reply to message #1700985] Wed, 08 July 2015 14:04 Go to previous messageGo to next message
Chris Jackson is currently offline Chris JacksonFriend
Messages: 256
Registered: December 2013
Senior Member
Correct...

Initially, all you know is the address - so you know it exists in the network, but you don't know what it is. As discovery progresses, we learn the device type, manufacturer etc. So you're right, in the early phases we wouldn't want to approve it either...
Re: Discovery 'stages' [message #1700993 is a reply to message #1700986] Wed, 08 July 2015 14:33 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
So this even applies for an "interactive" setup process? I.e. you manually start a scan, which activates the pairing mode and you then press some pairing button on the battery-powered device? Or isn't that how ZWave works at all?
Re: Discovery 'stages' [message #1701007 is a reply to message #1700993] Wed, 08 July 2015 15:24 Go to previous messageGo to next message
Chris Jackson is currently offline Chris JacksonFriend
Messages: 256
Registered: December 2013
Senior Member
Correct - at least for older devices (most devices currently on the market) it's exactly as you say - activate 'inclusion' mode to include it into the network, and then we have to exchange a bunch of messages to download enough data to be able to identify it.
Re: Discovery 'stages' [message #1701079 is a reply to message #1701007] Thu, 09 July 2015 08:43 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
I am wondering, if there is an option to do it with the current infrastructure:
You could create DiscoveryResults ("Z-Wave Device") with a specific thing type (e.g. "zwave:unknown") for such devices. If there is no ThingHandlerFactory which can handle this type, it simply won't be able to approve them. Once you have all data collected that you need, you can call thingRemoved() in your DiscoveryService, so that the unknown entry is removed from the inbox again and you can add a proper result. Would this fulfill your needs?
Re: Discovery 'stages' [message #1701120 is a reply to message #1701079] Thu, 09 July 2015 13:06 Go to previous messageGo to next message
Chris Jackson is currently offline Chris JacksonFriend
Messages: 256
Registered: December 2013
Senior Member
Hi Kai,
This would probably work, but I would suggest it's a slight 'bodge' Smile The problem I have with it is (I think) it will generate errors if someone tries to approve it as I think there will be some error that says there's no handler available (but I might be wrong).

This could be stopped in the UI by disabling the approve button if the type is unknown (but it would be best to standardise on this convention to ensure that UIs do this consistently). It would be better to add this as a flag I think to make this clearer.

Chris
Re: Discovery 'stages' [message #1701346 is a reply to message #1701120] Sun, 12 July 2015 10:59 Go to previous messageGo to next message
Chris Jackson is currently offline Chris JacksonFriend
Messages: 256
Registered: December 2013
Senior Member
Hi Kai,
This approach does fundimentally work, but as above results in the following WARNing -:

Cannot create thing. No binding found that supports creating a thing of type

I think it would be better to use some sort of flag to say it's temporary or something - or a different status in the inbox, so that the UI can distinguish the difference... For now though, it's ok...

Chris
Re: Discovery 'stages' [message #1701347 is a reply to message #1700592] Sun, 12 July 2015 11:04 Go to previous message
Chris Jackson is currently offline Chris JacksonFriend
Messages: 256
Registered: December 2013
Senior Member
Created feature request https://bugs.eclipse.org/bugs/show_bug.cgi?id=472442
Previous Topic:PaperUi displaying problem
Next Topic:State conversion in channels
Goto Forum:
  


Current Time: Fri Mar 29 10:05:48 GMT 2024

Powered by FUDForum. Page generated in 0.03121 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top