Skip to content

Instantly share code, notes, and snippets.

@NorthernMan54
Last active October 27, 2024 18:29
Show Gist options
  • Save NorthernMan54/ef912a07482b9ab83fa80b91b5b763e8 to your computer and use it in GitHub Desktop.
Save NorthernMan54/ef912a07482b9ab83fa80b91b5b763e8 to your computer and use it in GitHub Desktop.
EcoPlugs as a sonoff-tasmota device

I had flashed an ecoplug with sonoff-tasmota 6.5.0, and made these configuration changes.

1 - Under Configure MQTT, I set the full topic, to

%prefix%/%topic%-7360/

2 - Configure Module

Type 17 - Wion

3 - On my mosquito server, created a file /etc/avahi/services/mosquitto.service

<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">Mosquitto MQTT server on %h</name>
  <service>
   <type>_mqtt._tcp</type>
   <port>1883</port>
   <txt-record>info=Publish, Publish! Read all about it! mqtt.org</txt-record>
  </service>
</service-group>

4 - In the console

Rule1 1
Rule1 on Mqtt#Disconnected do MqttHost 0 endon
PowerOnState 0
SetOption55 1

This is for an internet router watchdog

rule2 1
rule2 on wifi#disconnected do backlog power 0;delay 150;power 1; delay 1800 endon
rule3 1
rule3 on Time#Minute|10 do power 1 endon
WifiConfig 5
@NorthernMan54
Copy link
Author

pinout
IMG_2954
IMG_2952

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment