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?
Question about Inclusion Process
Re: Question about Inclusion Process
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.
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.
-
- Posts: 160
- Joined: 03 May 2014 07:02
Re: Question about Inclusion Process
What is the easiest way to get the current timestamp?
Re: Question about Inclusion Process
Don't use the current timestamp. Use the previous timestamp returned from server.
-
- Posts: 160
- Joined: 03 May 2014 07:02
Re: Question about Inclusion Process
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.