diff --git a/alexa.js b/alexa.js index d4e03cc..49016c4 100644 --- a/alexa.js +++ b/alexa.js @@ -52,8 +52,8 @@ module.exports = function(RED) { }); node.client.on('message', function(topic, message){ - //console.log(topic); - //console.log(message.toString()); + // console.log(topic); + // console.log(message.toString()); var msg = JSON.parse(message.toString()); node.emit('alexa'+msg.payload.appliance.applianceId, msg); }); diff --git a/examples/alexa-home-skill.json b/examples/alexa-home-skill.json index d1130ad..c5831cd 100644 --- a/examples/alexa-home-skill.json +++ b/examples/alexa-home-skill.json @@ -1 +1 @@ -[{"id":"9c6207d7.984558","type":"alexa-home","z":"b9139cb2.26ad3","conf":"49924182.27202","device":"2","name":"Bedroom lights","topic":"bedroom","x":144.5,"y":55,"wires":[["cadef1cb.d7361"]]},{"id":"7c305e7d.89a27","type":"wemo out","z":"b9139cb2.26ad3","name":"Bedroom","device":"a95be6ee.1ed928","x":621,"y":128,"wires":[]},{"id":"cadef1cb.d7361","type":"switch","z":"b9139cb2.26ad3","name":"","property":"payload.command","propertyType":"msg","rules":[{"t":"eq","v":"TurnOnCommand","vt":"str"},{"t":"eq","v":"TurnOffCommand","vt":"str"}],"checkall":"true","outputs":2,"x":235,"y":115,"wires":[["6971943f.155f1c"],["be8accb1.414b1"]]},{"id":"6971943f.155f1c","type":"trigger","z":"b9139cb2.26ad3","op1":"true","op2":"false","op1type":"bool","op2type":"bool","duration":"5","extend":false,"units":"min","reset":"","name":"","x":408,"y":76,"wires":[["7c305e7d.89a27"]]},{"id":"be8accb1.414b1","type":"change","z":"b9139cb2.26ad3","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":407,"y":137,"wires":[["7c305e7d.89a27"]]},{"id":"49924182.27202","type":"alexa-home-conf","z":"","username":"hardillb"},{"id":"a95be6ee.1ed928","type":"wemo-dev","z":"","device":"231442B01005F2-94103EA2B27803ED","name":"Bedroom "}] \ No newline at end of file +[{"id":"9c6207d7.984558","type":"alexa-home","z":"b9139cb2.26ad3","conf":"49924182.27202","device":"2","name":"Bedroom lights","topic":"bedroom","x":144.5,"y":55,"wires":[["cadef1cb.d7361","e8519caa.f923c"]]},{"id":"7c305e7d.89a27","type":"wemo out","z":"b9139cb2.26ad3","name":"Bedroom","device":"a95be6ee.1ed928","x":621,"y":128,"wires":[]},{"id":"cadef1cb.d7361","type":"switch","z":"b9139cb2.26ad3","name":"","property":"payload.command","propertyType":"msg","rules":[{"t":"eq","v":"TurnOnRequest","vt":"str"},{"t":"eq","v":"TurnOffRequest","vt":"str"}],"checkall":"true","outputs":2,"x":235,"y":115,"wires":[["6971943f.155f1c"],["be8accb1.414b1"]]},{"id":"6971943f.155f1c","type":"trigger","z":"b9139cb2.26ad3","op1":"true","op2":"false","op1type":"bool","op2type":"bool","duration":"5","extend":false,"units":"min","reset":"","name":"","x":408,"y":76,"wires":[["7c305e7d.89a27","e8519caa.f923c"]]},{"id":"be8accb1.414b1","type":"change","z":"b9139cb2.26ad3","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":407,"y":137,"wires":[["7c305e7d.89a27"]]},{"id":"e8519caa.f923c","type":"debug","z":"b9139cb2.26ad3","name":"","active":true,"console":"false","complete":"false","x":608,"y":33,"wires":[]},{"id":"49924182.27202","type":"alexa-home-conf","z":"","username":"hardillb"},{"id":"a95be6ee.1ed928","type":"wemo-dev","z":"","device":"231442B01005F2-94103EA2B27803ED","name":"Bedroom "}] \ No newline at end of file