Add more speech commands
Hello, regarding #390 i have the same issue.
after adding in de.json:
"shutter2up": {
"text": "Rolladen zwei Wohnzimmer hoch",
"voice": "Rolladen zwei Wohnzimmer hoch",
"description": "Rolladen zwei Wohnzimmer hoch"
},
"shutter2down": {
"text": "Rolladen zwei Wohnzimmer runter",
"voice": "Rolladen zwei Wohnzimmer runter",
"description": "Rolladen zwei Wohnzimmer runter"
}
and controller.js
addCommand('shutter2up', function() {
var clickurl = 'http://user:[email protected]/api/device/Raffstore2/moveUp';
});
addCommand('shutter2down', function() {
var clickurl = 'http://user:[email protected]/api/device/Raffstore2/moveDown';
});
nothing happend after saying exactly this command. In the mirror i can see that the speech command has been EXACTLY recocnized in German. But after that, nothing happen. Except that every other speech command works as expected even if i change the command in de.js
Do you actually do anything with clickurl? It looks like all you are doing is setting a variable. Maybe I'm missing something...
If you just execute the URL by hand (in the browser) it do what i expected. It´s "Do move shutter DOWN... and UP.
Yeah... But you actually need to make an HTTP request to GET that URL, the code that you provided doesn't actually do anything except change a variable. Again, I could be missing something here.
What you really want to do is:
$http.get('http://user:[email protected]/api/device/Raffstore2/moveDown')
If you are convinced that the callback isn't working then you may want to try setting a breakpoint there to see what's going on.
This is 21 days old since the last update... @hyp3rx has this issue been resolved for you? if so please comment how it was resolved (hopefully @evancohen's comment helped) and close the issue. If it's not resolved please let us know how we can further help... Also please check us out on gitter.im if you haven't already...
If we don't hear anything over the next week we'll assume this is resolved and close the issue.
haven't heard a response in 8 days. I'm closing this issue...
@hyp3rx if you're still having issues please comment on this issue and we can reopen..
Hi,
i have tested the solution ... but sadly it doesn't work :0(
//Shutter
addCommand('shutter', function () {
$http.get('http://192.168.1.xx:3777/user/WebhookBY.php?RUNScriptID=27550')
});
What's wrong ?! Can somebody help ?!
@justbill2020 please reopen
This is addressed with the recent refactoring in the dev branch. You'll want to create a new "Plugin". The documentation isn't complete, but there are plenty of in-code examples.