MacWyznawca / homebridge-mqtt-switch-tasmota

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

add a second Sonoff #5

Closed FamJohansson closed 7 years ago

FamJohansson commented 7 years ago

How can I add a second Sonoff device in the config.json file?

"accessories": [ { "accessory": "mqtt-switch-tasmota", "name": "sonoff",

            "url": "mqtt://Homebridge",
            "username": "DVES_USER",
            "password": "DVES_PASS",

            "topics": {
            "statusGet": "stat/sonoff/RESULT",
            "statusSet": "cmnd/sonoff/POWER",
            "stateGet": "tele/sonoff/STATE"
                                },
            "onValue": "ON",
            "offValue": "OFF",

            "activityTopic": "tele/sonoff/LWT",
            "activityParameter": "Online",

            "startCmd": "cmnd/sonoff/TelePeriod",
            "startParameter": "60",

            "manufacturer": "ITEAD",
            "model": "Sonoff",
            "serialNumberMAC": ""
        },
        {
            "accessory": "mqtt-switch-tasmota",
            "name": "taklampe",

            "url": "mqtt://Homebridge",
            "username": "DVES_USER",
            "password": "DVES_PASS",

            "topics": {
            "statusGet": "stat/taklampe/RESULT",
            "statusSet": "cmnd/taklampePOWER",
            "stateGet": "tele/taklampe/STATE"
                                },
            "onValue": "ON",
            "offValue": "OFF",

            "activityTopic": "tele/taklampe/LWT",
            "activityParameter": "Online",

            "startCmd": "cmnd/taklampe/TelePeriod",
            "startParameter": "60",

            "manufacturer": "ITEAD",
            "model": "Sonoff",
            "serialNumberMAC": ""
        }

And how to configure Sonoff settings

FamJohansson commented 7 years ago

If i turn the second sonoff on or off via web page it turns on and off and I Can see the status changes in Apple Home app. If I turn it on or off via Apple Home app the status is changed in the Apple home app but the sonoff is not turning on or off.

jeylites commented 7 years ago

@FamJohansson I'm in the same situation. Have you managed to solve it?

Here is my setting

https://github.com/MacWyznawca/homebridge-mqtt-power-consumption-log-tasmota/issues/3

FamJohansson commented 7 years ago

Hi, I have not managed to resolve this.

FamJohansson commented 7 years ago

Is there anyone who has a solution to this?

FamJohansson commented 7 years ago

Can @MacWyznawca look at this?

MacWyznawca commented 7 years ago

First working? Config file looks ok.

Can You check console log via web on second? That model? Basic?

FamJohansson commented 7 years ago

@macwyznawc Both is basic

deon-wentzel commented 7 years ago

Hi, I have about 15 Sonoff working perfectly. Have you changed the MQTT name on Sonoff to taklampe via the Web Interface on the Sonoff Device.

FamJohansson commented 7 years ago

Hello again,

I was missing a / in this line. "statusSet": "cmnd/taklampePOWER",

Thanks for all the help.

Case closed.