Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration of more than 1 switch fails / on-off mode #20

Closed
padman74 opened this issue Oct 13, 2020 · 4 comments
Closed

Configuration of more than 1 switch fails / on-off mode #20

padman74 opened this issue Oct 13, 2020 · 4 comments
Labels
question Further information is requested

Comments

@padman74
Copy link

Hello.

I configured two switchbots by defining two accessories in config file having different names. Both accessories appear as switches in Homekit. But in Homekit the second one shows randomly on and off without any reason. When I configure only 1 switch it shows constantly on. What makes the switch showing on/off?

Further I don't understand why the switch needs to be on if it should be a stateless button. I would expect the opposite.

Regards
padman

@zizi4n5
Copy link
Owner

zizi4n5 commented Oct 14, 2020

Describe the contents of the Config for the two SwitchBots you have set up for Homebridge.

e.g.

{
    "accessories": [
        {
            "accessory": "SwitchBot-For-Mac",
            "name": "Switch",
            "delay": 5000,
            "retries": 3,
            "macAddress": "01:23:45:67:89:AB",
            "ping": {
                "ipAddress": "127.0.0.1",
                "interval": 2000,
                "retries": 1,
                "timeout": 1000
            }
        }
    ]
}

@padman74
Copy link
Author

 {
        "accessory": "SwitchBot-For-Mac",
        "name": "Bedroom",
        "delay": 5000,
        "retries": 3,
        "macAddress": "xx:xx:xx:xx:xx:xx",
        "ping": {
            "ipAddress": "127.0.0.1",
            "interval": 2000,
            "retries": 1,
            "timeout": 1000
        }
},
{
        "accessory": "SwitchBot-For-Mac",
        "name": "Kitchen",
        "delay": 5000,
        "retries": 3,
        "macAddress": "yy:yy:yy:yy:yy:yy",
        "ping": {
            "ipAddress": "127.0.0.1",
            "interval": 2000,
            "retries": 1,
            "timeout": 1000
        } 
},

@zizi4n5
Copy link
Owner

zizi4n5 commented Oct 14, 2020

The ping option is only available if you can use ping to determine whether a device is on or off.
Set the ipAddress of the target device, not "127.0.0.1".

Otherwise, remove the ping option.

@padman74
Copy link
Author

got it, thank you!

@zizi4n5 zizi4n5 added the question Further information is requested label Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants