ESP8266-01 mit Tasmota Sonoff







USB Stick zum flashen den ich umgebaut habe mittels eines Jumpers



Der Jumper macht mir einen Bügel zu den beiden Pins damit ich in den Flashmodus des ESP komme.













Programm zum flashen: 

https://github.com/tasmota/tasmota-pyflasher/releases oder https://github.com/marcelstoer/nodemcu-pyflasher/releases



sonoff-DE.bin: https://github.com/arendst/Tasmota/releases





Nachdem flashen wie üblich mit einem mobilen Gerät den ESP suchen einloggen und die Wlan Daten des eigenen Netzwerkes eingeben.

Nachdem Reboot sollte der ESP im eigenen Netzwerk verfügbar sein und kann per IP angesprochen werden.



Einstellungen im Sonoff Portal:

Bei diesem Modul muss man zusätzlich mit den "Rules" den GPIO auf seriell umbiegen.

  • Set module to Generic (18) (in module configuration and click save)

  • Set D3 GPIO0 as Relay1 (21) (in module configuration and click save)

  • Disable SerialLog (type seriallog 0 in the Tasmota console)

  • Add the following rules typing in the console:

    Rule1 on System#Boot do Backlog Baudrate 9600; SerialSend5 0 endon on Power1#State=1 do SerialSend5 A00101A2 endon on Power1#State=0 do SerialSend5 A00100A1 endon

  • Enable the rule (type rule1 1 in the Tasmota console)

  • Note: If that doesn't work for you, you may find that using Power1#Boot as the event to trigger the baud rate setting (instead of System#Boot) works, as it did for me. So the alternate rule is:

    on Power1#Boot do Backlog Baudrate 9600; SerialSend5 0 endon on Power1#State=1 do SerialSend5 A00101A2 endon on Power1#State=0 do SerialSend5 A00100A1 endon

Dual Relay (note, older versions of this board used a baud rate of 9600, so if 115200 doesn't work, try 9600)

To configure an LC Technology ESP8266 Relay X2, use the following settings...

  • Set module to Generic (in module configuration and click save)

  • Set GPIO0 and GPIO2 as Relay1 and Relay 2 (in module configuration and click save)

  • Disable SerialLog (type seriallog 0 in the Tasmota console)

  • Add the following rules typing in the Tasmota console:

    Rule1 on System#Boot do Backlog Baudrate 9600; SerialSend5 0 endon on Power1#State=1 do SerialSend5 A00101A2 endon on Power1#State=0 do SerialSend5 A00100A1 endon on Power2#State=1 do SerialSend5 A00201A3 endon on Power2#State=0 do SerialSend5 A00200A2 endon

  • Enable the rule (type rule1 1 in the Tasmota console)

Quad Relay (note, older versions of this board used a baud rate of 9600, so if 115200 doesn't work, try 9600)

In configuration open Configure Other paste this template and select activate
{"NAME":"LC Technology 4CH Relay","GPIO":[52,255,17,255,255,255,255,255,21,22,23,24,255],"FLAG":0,"BASE":18}

Enter this command in console (configure the 1st rule)

Rule1 on System#Boot do Backlog Baudrate 9600; SerialSend5 0 endon on Power1#State=1 do SerialSend5 A00101A2 endon on Power1#State=0 do SerialSend5 A00100A1 endon on Power2#State=1 do SerialSend5 A00201A3 endon on Power2#State=0 do SerialSend5 A00200A2 endon on Power3#State=1 do SerialSend5 A00301A4 endon on Power3#State=0 do SerialSend5 A00300A3 endon on Power4#State=1 do SerialSend5 A00401A5 endon on Power4#State=0 do SerialSend5 A00400A4 endon

Enable the rule (type rule1 1 in the Tasmota console)





Http Befehle:

http://IP/cm?cmnd=Power%20on

http://IP/cm?cmnd=Power%20off



Vorlage für die Schaltbefehle:





Vorlage Befehlserkennung für den Status:

Der Json gibt natürlich viel mehr her per http://IP/cm?cmnd=state



UDP:



Sys-Log Host ist die IP vom Miniserver

Sys-Log Port ist der Port den du im Minisverver angibst





MQTT Anbindung:













Befehle per MQTThttps://stevessmarthomeguide.com/setting-up-the-sonoff-tasmota-mqtt-switch/#content