Step 1 : Hassio phải cài đặt MQTT sevrer
root@aml:~# netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 aml:46374 localhost:http-alt TIME_WAIT
tcp 0 0 aml:1988 aml:51475 ESTABLISHED
tcp 0 0 aml:46372 localhost:http-alt TIME_WAIT
tcp 0 0 aml:8123 192.168.1.103:50399 ESTABLISHED
tcp 0 0 aml:ssh 192.168.1.103:50427 ESTABLISHED
tcp 0 0 aml:1988 192.168.1.201:25862 TIME_WAIT
tcp 0 0 aml:1988 192.168.1.201:6969 TIME_WAIT
tcp 0 0 aml:1988 192.168.1.201:1823 TIME_WAIT
tcp 0 0 aml:44696 192.168.1.200:rtsp TIME_WAIT
Step 2 Flash sonoff tasmota
tải các phần mêm cơ bản :
https://www.youtube.com/watch?v=LwZltnda4v8
https://www.compuphase.com/software_termite.htm
https://github.com/arendst/Sonoff-Tasmota/releases
https://github.com/letscontrolit/ESPEasy/releases
Step 3 : Flash xong va kết nối
Step 4 : Config sonoff
Step 6 : Test
root@aml:~# netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 aml:46374 localhost:http-alt TIME_WAIT
tcp 0 0 aml:1988 aml:51475 ESTABLISHED
tcp 0 0 aml:46372 localhost:http-alt TIME_WAIT
tcp 0 0 aml:8123 192.168.1.103:50399 ESTABLISHED
tcp 0 0 aml:ssh 192.168.1.103:50427 ESTABLISHED
tcp 0 0 aml:1988 192.168.1.201:25862 TIME_WAIT
tcp 0 0 aml:1988 192.168.1.201:6969 TIME_WAIT
tcp 0 0 aml:1988 192.168.1.201:1823 TIME_WAIT
tcp 0 0 aml:44696 192.168.1.200:rtsp TIME_WAIT
Step 2 Flash sonoff tasmota
tải các phần mêm cơ bản :
https://www.youtube.com/watch?v=LwZltnda4v8
https://www.compuphase.com/software_termite.htm
https://github.com/arendst/Sonoff-Tasmota/releases
https://github.com/letscontrolit/ESPEasy/releases
Step 3 : Flash xong va kết nối
Step 4 : Config sonoff
Step 5 : config trên home assistant
switch:
- platform: mqtt
name: "Sonoff01"
command_topic: "cmnd/sonoff/power"
state_topic: "stat/sonoff/POWER"
qos: 1
payload_on: "ON"
payload_off: "OFF"
retain: true
Step 6 : Test
Nhận xét
Đăng nhận xét