This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Closed
Ask multiple questions
jjtbsomhorst
Member
in Archive
Hi,
I'm currently trying to build an app that requires me to let Homey ask the user several questions after each other. I'm currently running into an issue where the second question's callback is triggered without a result ( and no error ) before I have time to answer it.
My gues is that the callback of the previous question is triggered becuase the timeout of 10 seconds has expired. I have the following pseudo code
Homey.manager('speech-input').ask('Vraag 1',function(err,result){
Homey.log('asking first question');
Homey.log(result);
if(result != ""){
Homey.manager('speech-input').ask('vraag 2',function(err,result){
Homey.log('Answer to second question');
Homey.log(result);
});
}
});
What happens is the following |
- asking the first question
- answer 1
- asking the second question
-
In other words the last answer is directly returned as an empty string and I can not answer it myself. Is this a bug? And if not how to solve?
I'm currently trying to build an app that requires me to let Homey ask the user several questions after each other. I'm currently running into an issue where the second question's callback is triggered without a result ( and no error ) before I have time to answer it.
My gues is that the callback of the previous question is triggered becuase the timeout of 10 seconds has expired. I have the following pseudo code
Homey.manager('speech-input').ask('Vraag 1',function(err,result){
Homey.log('asking first question');
Homey.log(result);
if(result != ""){
Homey.manager('speech-input').ask('vraag 2',function(err,result){
Homey.log('Answer to second question');
Homey.log(result);
});
}
});
What happens is the following |
- asking the first question
- answer 1
- asking the second question
-
In other words the last answer is directly returned as an empty string and I can not answer it myself. Is this a bug? And if not how to solve?
This discussion has been closed.
Comments
I noticed that the led ring is also orange (and stays that way) after the question sequence has started.