You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not know how to contact you here, so I use issue. your code does exactly what i need but it does not work with my alexa. I tried to use it with my HTTP-request to control my TV receiver.
This is my code, maybe u like to help me a little bit. I am new in programming Alexa. Maybe you or someone else find my misstakes.
Best regards from germany and merry xmas :-)
var speechOutput;
var reprompt;
var welcomeOutput = "Willkommen, der Skill ist nun aktiviert. Nenne mir einen Sender! ";
var welcomeReprompt = "Sage mir doch einfach einen Sender";
"use strict";
var Alexa = require('alexa-sdk');
var http = require('http');
var APP_ID = '...';
var request_ARD = {
host: '192.168.178.23',
path: '/api/zap?sRef=1:0:19:283D:3FB:1:C00000:0:0:0:',
//methode: 'GET'
};
var handlers = {
//Wird beim öffnen des Skill angefragt, wenn kein Intent verwendet wird:
'LaunchRequest': function () {
this.emit(':ask', welcomeOutput, welcomeReprompt);
},
'AMAZON.HelpIntent': function () {
speechOutput = 'Sage mir einen Namen aus deiner Familie!';
reprompt = 'Welcher Name soll es sein?';
this.emit(':ask', speechOutput, reprompt);
},
'AMAZON.CancelIntent': function () {
speechOutput = 'Skill wurde abgebrochen';
this.emit(':tell', speechOutput);
},
'AMAZON.StopIntent': function () {
speechOutput = 'Skill wurde gestoppt';
this.emit(':tell', speechOutput);
},
'SessionEndedRequest': function () {
speechOutput = 'Skill wurde automatisch deaktivert';
this.emit(':tell', speechOutput);
},
'SetChannelIntent': function () {
http.get(request_ARD, function (res) {
console.log("Response: " + res.statusCode);
response(res.statusCode);
}).on('error', function (e) {
console.log("Error message: " + e.message);
});
speechOutput = "Bis hierhin und nicht weiter";
this.emit(':tell', speechOutput);
}
};
exports.handler = (event, context) => {
var alexa = Alexa.handler(event, context);
alexa.APP_ID = APP_ID;
alexa.registerHandlers(handlers);
alexa.execute();
};`
```
The text was updated successfully, but these errors were encountered:
Hello HerrDoktorDB,
I do not know how to contact you here, so I use issue. your code does exactly what i need but it does not work with my alexa. I tried to use it with my HTTP-request to control my TV receiver.
This is my code, maybe u like to help me a little bit. I am new in programming Alexa. Maybe you or someone else find my misstakes.
Best regards from germany and merry xmas :-)
The text was updated successfully, but these errors were encountered: