Sonoff / Tasmota ...quick and dirty

 

Switch state after loss of power / initial boot

poweronstate 3 (at boot switch will be set to the last known state before loss of power or restart)
poweronstate 4 (switch will be always set to ON, toggle will be disabled)

Set network addresses

IPAddress1 192.168.0.55   (set IP address)
IPAddress2 192.168.0.1    (set Gateway)
IPAddress3 255.255.255.0  (set Netmask)
IPAddress4 192.168.0.1    (set DNS Server)

Reboot

restart 1