Hi,
I've followed all the documentation to a T -- my event from my gadget is firing according to AGT (I modified it to output to console when sending an event).
The namespace is the same, event is both correct on Skill and Gadget according to the Request logs.
Everything "looks" like it should be working but when an event is received, my Skill doesn't handle it.
Could there be anything obvious in the process I might be overlooking?
Here is my code:
python
from agt import AlexaGadget class MyGadget(AlexaGadget): ... def Send(self, payload): self.send_custom_event("Custom.MyGadgetNamespace", "EventName", payload)
skill (NodeJS)
canHandle(handlerInput) { return handlerInput.requestEnvelope.request.type === 'LaunchRequest'; }, handle(handlerInput) { ... return handlerInput.responseBuilder .addDirective({ "type": "CustomInterfaceController.StartEventHandler", "token": UUID.v4(), "expiration": { "durationInMilliseconds": duration, "expirationPayload": { "state": "It's expired!" } }, "eventFilter": { "filterExpression": { "and": [ { "==": [ { "var": "header.namespace" }, "Custom.MyGadgetNamespace" ]}, { "==": [ { "var": "endpoint.endpointId" }, endpointId ]} ] }, "filterMatchAction": "SEND_AND_TERMINATE" } }) .withShouldEndSession(false) .getResponse(); }
canHandle(handlerInput) { return handlerInput.requestEnvelope.request.type === 'CustomInterfaceController.EventsReceived'; }, handle(handlerInput) { ... console.log(`== CUSTOM EVENT == ${JSON.stringify(handlerInput.requestEnvelope.request.events[0]}`); ... }
exports.handler = Alexa.SkillBuilders.standard() .addRequestHandlers( LaunchHandler, EventsReceivedHandler, ... ) ... .lambda();
Can anyone help?
Cheers,
Jamie