AtomBaf / homebridge-mqtt-tasmota

Homebridge handler for tasmota/MQTT devices
MIT License
5 stars 5 forks source link

Tasmota on Sonoff THR316 with THS01 #9

Closed Tom74HH closed 1 year ago

Tom74HH commented 1 year ago

I would like to integrate a Sonoff relay with a temperature/humidity sensor. Tosmata is already on the device. Is there a way to make the device compatible with homebridge-mqtt-tasmota? I am already running an IFAN03 with the plugin and would like to use the same plugin.

AtomBaf commented 1 year ago

Hi @Tom74HH You can just simply declare 2 accessories with the same topic. The first one for the temperature/humidity sensor and the second one for the relay switch. Example:

        ....
        {
            "accessory": "mqtt-tasmota",
            "type": "sensor",
            "name": "My temperature sensor",
            "url": "mqtt://my_mqtt_broker",
            "topic": "my_tasmota_topic"
        },
        {
            "accessory": "mqtt-tasmota",
            "type": "lightbulb",
            "name": "My lightbulb sensor",
            "url": "mqtt://my_mqtt_broker",
            "topic": "my_tasmota_topic"
        }