smart-mirror icon indicating copy to clipboard operation
smart-mirror copied to clipboard

Add more speech commands

Open hyp3rx opened this issue 10 years ago • 7 comments

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

hyp3rx avatar Nov 10 '16 09:11 hyp3rx

Do you actually do anything with clickurl? It looks like all you are doing is setting a variable. Maybe I'm missing something...

evancohen avatar Nov 11 '16 00:11 evancohen

If you just execute the URL by hand (in the browser) it do what i expected. It´s "Do move shutter DOWN... and UP.

hyp3rx avatar Nov 11 '16 07:11 hyp3rx

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.

evancohen avatar Nov 11 '16 19:11 evancohen

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.

justbill2020 avatar Dec 02 '16 18:12 justbill2020

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..

justbill2020 avatar Dec 10 '16 21:12 justbill2020

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

wuppi83 avatar Dec 26 '16 10:12 wuppi83

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.

evancohen avatar Dec 26 '16 16:12 evancohen