AtomBaf / homebridge-mqtt-tasmota

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

POWER1 POWER2 #1

Closed andreyxc closed 3 years ago

andreyxc commented 3 years ago

10:11:09 MQT: stat/lightAndrey/RESULT = {"POWER1":"OFF"} 10:11:09 MQT: stat/lightAndrey/POWER1 = OFF 10:11:10 MQT: stat/lightAndrey/RESULT = {"POWER2":"OFF"} 10:11:10 MQT: stat/lightAndrey/POWER2 = OFF

Sonoff T1 2CH Модуль

how to organize 2 switches?

AtomBaf commented 3 years ago

Hi Andrey

I don't have myself a Sonoff T1 2CH switch, but as far as I can imagine, I can do a quick fix for this purpose. I suggest that you will have to setup two switch accessories, and for each one, you will add a number property (default to '', but can be '1' or '2' or whatever) and I will append this number to all related mqtt topics. Does it sound good to you ?

andreyxc commented 3 years ago

I will like everything if it works.

14:23:10 MQT: tele/lightAndrey/STATE = {"Time":"2021-05-08T14:23:10","Uptime":"8T17:03:22","UptimeSec":752602,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":10,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"homekit18","BSSId":"52:FF:20:27:36:E8","Channel":1,"RSSI":100,"Signal":-41,"LinkCount":9,"Downtime":"0T00:00:59"}} 14:23:10 MQT: stat/lightAndrey/RESULT = {"POWER1":"OFF"} 14:23:10 MQT: stat/lightAndrey/POWER1 = OFF 14:23:11 MQT: stat/lightAndrey/RESULT = {"POWER2":"OFF"} 14:23:11 MQT: stat/lightAndrey/POWER2 = OFF 14:24:10 MQT: tele/lightAndrey/STATE = {"Time":"2021-05-08T14:24:10","Uptime":"8T17:04:22","UptimeSec":752662,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":10,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"homekit18","BSSId":"52:FF:20:27:36:E8","Channel":1,"RSSI":100,"Signal":-41,"LinkCount":9,"Downtime":"0T00:00:59"}} 14:24:11 MQT: stat/lightAndrey/RESULT = {"POWER1":"OFF"} 14:24:11 MQT: stat/lightAndrey/POWER1 = OFF 14:24:11 MQT: stat/lightAndrey/RESULT = {"POWER2":"OFF"} 14:24:11 MQT: stat/lightAndrey/POWER2 = OFF 14:25:10 MQT: tele/lightAndrey/STATE = {"Time":"2021-05-08T14:25:10","Uptime":"8T17:05:22","UptimeSec":752722,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":10,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"homekit18","BSSId":"52:FF:20:27:36:E8","Channel":1,"RSSI":100,"Signal":-41,"LinkCount":9,"Downtime":"0T00:00:59"}} 14:25:10 MQT: stat/lightAndrey/RESULT = {"POWER1":"OFF"} 14:25:10 MQT: stat/lightAndrey/POWER1 = OFF 14:25:11 MQT: stat/lightAndrey/RESULT = {"POWER2":"OFF"} 14:25:11 MQT: stat/lightAndrey/POWER2 = OFF 14:26:10 MQT: tele/lightAndrey/STATE = {"Time":"2021-05-08T14:26:10","Uptime":"8T17:06:22","UptimeSec":752782,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":10,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"homekit18","BSSId":"52:FF:20:27:36:E8","Channel":1,"RSSI":100,"Signal":-40,"LinkCount":9,"Downtime":"0T00:00:59"}} 14:26:11 MQT: stat/lightAndrey/RESULT = {"POWER1":"OFF"} 14:26:11 MQT: stat/lightAndrey/POWER1 = OFF 14:26:11 MQT: stat/lightAndrey/RESULT = {"POWER2":"OFF"} 14:26:11 MQT: stat/lightAndrey/POWER2 = OFF

andreyxc commented 3 years ago

Well, you definitely need to add two switches, this is logical!

AtomBaf commented 3 years ago

yep, on it. Shouldn't be long

andreyxc commented 3 years ago

Nowhere to rush, Thank you

AtomBaf commented 3 years ago

published, could you try it ? (you must set the 'switchNumber' property to 1 and 2 respectively)

        {
            "accessory": "mqtt-tasmota-switch",
            "name": "Dual Switch 1",
            "url": "mqtt://192.168.0.3",
            "topic": "lightAndrey",
            "switchNumber": "1"
        },
        {
            "accessory": "mqtt-tasmota-switch",
            "name": "Dual Switch 2",
            "url": "mqtt://192.168.0.3",
            "topic": "lightAndrey",
            "switchNumber": "2"
        }
andreyxc commented 3 years ago

Yes thanks a lot Works

andreyxc commented 3 years ago

Everything works well. Thank you

AtomBaf commented 3 years ago

Sorry, for the sake of having a the same conventions for the shutter feature, I will rename the property switchIndex

AtomBaf commented 3 years ago

0.2.6 published, doc adjusted

andreyxc commented 3 years ago

Ok!