MacWyznawca / homebridge-mqtt-switch-tasmota

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

Support for Sonoff 4CH Pro? #23

Closed timhng closed 6 years ago

timhng commented 6 years ago

I see that you've added support for the Sonoff Dual. Will this also work for the Sonoff 4CH Pro? If not, is this something that you intend to add in the future?

timhng commented 6 years ago

To answer my own question - this excellent plugin already supports the 4CH Pro. Just need to Have a separate configuration for each channel in the config.json file. The Topic should be the same ifor all channels but command POWER1, POWER2 etc.

FamJohansson commented 6 years ago

@timhng Do you have an example config.jason that you can add here?

kodibrain commented 6 years ago

you have to change statusGet and statusSet in the switch you need.

"statusGet" : "stat/Pumpe/POWER4", "statusSet" : "cmnd/Pumpe/POWER4", (POWER1, POWER2, POWER3...)

{ "activityParameter" : "Online", "activityTopic" : "tele/Pumpe/LWT", "startCmd" : "cmnd/Pumpe/TelePeriod", "onValue" : "ON", "switchType" : "outlet", "offValue" : "OFF", "startParameter" : "60", "url" : "mqtt://192.168.2.5", "password" : "", "topics" : { "statusGet" : "stat/Pumpe/POWER4", "statusSet" : "cmnd/Pumpe/POWER4", "stateGet" : "tele/Pumpe/STATE" }, "accessory" : "mqtt-switch-tasmota", "username" : "", "manufacturer" : "", "serialNumberMAC" : "", "model" : "", "name" : "Pumpe 4" },