Page 1 of 1

Question about Inclusion Process

Posted: 18 Jul 2014 10:06
by Shazard
Hi,

Probably I misunderstood the Doc again, but here is my question.

I noticed expert UI during Inclusion takes LESS then 20 seconds to detect new device. I don't understand how?

Yesterday I included Fibaro Motion Sensor, and inclusion took about 5-10 seconds and UI immediately showed that it has included. Doc says, that Inclusion is about 20 seconds, and then Controllers goes back to normal mode.

What does UI do? Does it goes to ZWaveAPI/Data/0 endpoint to receive, or how can I using REST API know that device was included before Inclusion process ends?

Re: Question about Inclusion Process

Posted: 20 Jul 2014 23:39
by pofs
20 seconds is a timeout here.
Sure, if device is included, controller goes to normal mode earlier.
But if you press include button and don't include a device in 20 seconds timeframe, controller returns to normal mode automatically.

Just don't do anything special about inclusion. And don't try to detect inclusion before inclusion process ends. When data will be available, you'll see it on next /Data/<timestamp> query.

Re: Question about Inclusion Process

Posted: 22 Jul 2014 18:35
by Mike Yeager
What is the easiest way to get the current timestamp?

Re: Question about Inclusion Process

Posted: 23 Jul 2014 01:50
by pofs
Don't use the current timestamp. Use the previous timestamp returned from server.

Re: Question about Inclusion Process

Posted: 25 Jul 2014 05:54
by Mike Yeager
I knew that nut I was unsure how to get the timestamp in the first place. Figured it out and am in the process of modifying my code to use the JSON data instead of individual data queries. Still working in Python at the moment but it's starting to look an awful lot like some of the JS examples I've seen. If I can find a way to do what I need to do in JS, that will be the next logical progression.