sonoff s20 hardware:
sonoff firmware http://
sonoff MQTT
sonoff MQTT Commands
sonoff tasmota button usage:
sudo vi /boot/config.txt add to the end of the file: enable_uart=1 sudo systemctl stop serial-getty@ttys0.service sudo systemctl disable serial-getty@ttys0.service sudo vi /boot/cmdline.txt remove: console=serial0,115200 sudo reboot sudo apt-get install esptool download firmware:
sudo esptool -vv -cb 115200 -cp /dev/serial0 -ca 0X00000 -bz 1M -bm dout -cf /home/pi/Downloads/sonoff-UK.bin ssid Vendor: Espressif Inc. Connect to the device webpage (http://[sonoff-ip]/cn) MQTT Javascript
MQTT Raspberry pi
Nathan Sonoff pow
======================== MQTT sudo apt-get update sudo apt-get install mosquitto sudo apt-get install mosquitto-clients ======================== mosquitto_pub -h -t cmnd/sonoff-basement-heating/ipaddress1 -m 0 mosquitto_sub -h -t stat/sonoff-basement-heating/RESULT -v stat/sonoff-basement-heating/RESULT {"IPAddress1":" ("} mosquitto_pub -h -t cmnd/sonoff-vfast/status -m 5 mosquitto_sub -h -t stat/sonoff-vfast/STATUS5 -v stat/sonoff-vfast/STATUS5 {"StatusNET":{"Hostname":"sonoff-vfast-5856","IPAddress":"","Gateway":"","Subnetmask":"","DNSServer":"","Mac":"84:F3:EB:4B:D6:E0","Webserver":2,"WifiConfig":2}} mosquitto_pub -h -t cmnd/sonoff-BB1/power -m off mosquitto_pub -h -t cmnd/sonoff-BB1/power -m on ======================== ======================== pip install esptool --port COM5 erase_flash --port COM4 write_flash 0x1000 my_app-0x01000.bin --port COM5 write_flash -fs 1MB -fm dout 0x0 sonoff.bin ========================