-
Notifications
You must be signed in to change notification settings - Fork 43
Integration with Sonoff Tasmota
Teodor Ivanov edited this page Feb 2, 2019
·
1 revision
Sonoff Tasmota devices could be easily integrated using MQTT. When hardware button of Sonoff devices is pressed it has to notify Amazon Echo Hub node that the power state is changed. In order to do this we have to subscribe to the MQTT messages send by Sonoff device on state change.
- Edit Amazon Echo Hub to "Enable Input"
- Create an input MQTT node and subscribe to Tasmota messages. E.g. stat/sonoff/POWER
- Create a function node to modify the payload
var nodeid="a92fedf5.1d7f4";
if (msg.payload == "ON"){
msg.payload = {
on: true,
nodeid: nodeid
}
} else if(msg.payload == "OFF"){
msg.payload = {
on: false,
nodeid: nodeid
}
}
return msg;
Note: nodeid variable is the ID of your Amazon Echo Device node