MacWyznawca / homebridge-mqtt-switch-tasmota

Plugin to HomeBridge optimized to work with firmware Sonoff-Tasmota, MQTT.
MIT License
57 stars 18 forks source link

Flooding MQTT BROKER #41

Open jeylites opened 6 years ago

jeylites commented 6 years ago

Hi

This plugin works great, I'm using the complete config to run 30 Sonoff T1 switches on the network. The only problem I have is the retain, LWT is flooding the MQTT broker. How can I go about keeping the messages to the minimal but not sacrificing the state tele when homebridge recovers from a power cycle?

I tried the minimal config, where I live we go through power outages due to the storm. It's hard to tell if the switches are OFF or ON since it's not reporting back the state.

A snippet of my config

{
    "bridge": {
        "name": "Homeroom",
        "username": "XX:XX:XX:XX:XX:XX",
        "port": 51821,
        "pin": "XXX-XX-XXX"
    },
    "description": "",
    "platforms": [

    ],
    "accessories": [{
            "accessory": "mqtt-switch-tasmota",
            "name": "FAN",
            "url": "mqtt://192.168.0.200",
            "username": "admin",
            "password": "admin",
            "topics": {
                "statusGet": "stat/m1/POWER1",
                "statusSet": "cmnd/m1/POWER1",
                "stateGet": "tele/m1/STATE"
            },
            "onValue": "ON",
            "offValue": "OFF",
            "activityTopic": "tele/m1/LWT",
            "activityParameter": "Online",
            "startCmd": "cmnd/m1/TelePeriod",
            "startParameter": "60"
        },
        {
            "accessory": "mqtt-switch-tasmota",
            "name": "SPOT",
            "url": "mqtt://192.168.0.200",
            "username": "admin",
            "password": "admin",
            "topics": {
                "statusGet": "stat/m1/POWER2",
                "statusSet": "cmnd/m1/POWER2",
                "stateGet": "tele/m1/STATE"
            },
            "onValue": "ON",
            "offValue": "OFF",
            "activityTopic": "tele/m1/LWT",
            "activityParameter": "Online",
            "startCmd": "cmnd/m1/TelePeriod",
            "startParameter": "60"

        }
    ]
}
jeylites commented 6 years ago

@MacWyznawca

help please :)

MacWyznawca commented 6 years ago

I don'y have ani problems with LWT. I have 15 accessories of this type.

IP HomeKit accessory has this problem. If sesion (WiFi, HomeBridge) is broken by restart or power off, accessory can't renev connection. HomeKit mus „ask” first.

wstephan commented 5 years ago

Hi, i have two shelly 1 with tasmota 6.4.1 and can confirm the flooding of my MQTT Broker with LWT Message and payload "[object Object]". Sometimes it stops after a reboot but the it starts again after few minutes....