Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
hardillb committed Nov 8, 2016
1 parent 09043a1 commit 37abfc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions alexa.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down
2 changes: 1 addition & 1 deletion examples/alexa-home-skill.json
Original file line number Diff line number Diff line change
@@ -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 "}]
[{"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 "}]

0 comments on commit 37abfc6

Please sign in to comment.