homebridge-switchbot
homebridge-switchbot copied to clipboard
Feature Request: Combine Two SwitchBots into one Accessory?
Describe Your Problem
To open my garage door, I use two SwitchBots. Is it possible to expose the two accessories as one in Homekit? To open my garage door, the first SwitchBot has to turn on the intercom before the second opens the gate. I can easily expose my individual SwitchBots as Garage Doors in Homekit, but need to combine the two accessories into one for it to actually work.
Relevant log output
Config for homebridge-switchbot
No response
Screenshots
Device & Model
SwitchBot
Node.js Version
V16.15.1
NPM Version
V7.x.x
Homebridge Version
v1.5.0
Homebridge SwitchBot Plugin Version
V.x.x.
Homebridge Config UI X Plugin Version
No response
Operating System
MacOS
I have a similar request. I use two bots to control my window blind controller (one bot presses the "UP" button, the other the "DOWN" button). It would be great if these could be combined into a single switch (or even better: window cover) device in Homekit.
I have a similar request. I use two bots to control my window blind controller (one bot presses the "UP" button, the other the "DOWN" button). It would be great if these could be combined into a single switch (or even better: window cover) device in Homekit.
Similar request here. I end up using some dummy window cover plugin that trigger the bot switches. Works ok, but it is a quite dirty solution
I will take any pull requests on this
Similar request here. I end up using some dummy window cover plugin that trigger the bot switches. Works ok, but it is a quite dirty solution
Which plugin do use? I found that Dummy Garage works quite well for this, although it shows up as a garage door, of course.
Similar request here. I end up using some dummy window cover plugin that trigger the bot switches. Works ok, but it is a quite dirty solution
Which plugin do use? I found that Dummy Garage works quite well for this, although it shows up as a garage door, of course.
I am using homebridge-window-cover to create dummy window shutters. Just install it, no need to config anything.
The ideal way to do this would be to use Homebridge to create an accessory within Homebridge and use cURL to send requests to Homebridge. IMO this should be made way easier in Homebridge itself (the ability to automate accessories through plugins). To do this you're also gonna need to change the default duration that tokens last. That being said, a pull request for this wouldn't be too difficult.
Actually, thinking about this more, its pretty difficult with the current implementation and would basically require a shim layer in between, while not impossible, its a difficult UI problem and understanding for new users, the easiest way is definitely to make an accessory in Homebridge. I will Open Source my implementation at some point in the next couple weeks. And one could pretty easily adapt that to this request. I'll also probably request a better, safer way to do the cURL stuff within the actual Homebridge project since if one were to get access to your bearer token, they'd have pretty significant access to your system and could do things like unlock doors, flip on and off lights, etc.
The ideal way to do this would be to use Homebridge to create an accessory within Homebridge and use cURL to send requests to Homebridge. IMO this should be made way easier in Homebridge itself (the ability to automate accessories through plugins). To do this you're also gonna need to change the default duration that tokens last. That being said, a pull request for this wouldn't be too difficult.
Very much interested in this and willing to roll-up my sleeves if necessary. Would you mind giving some initial directions to a noob on this?
The ideal way to do this would be to use Homebridge to create an accessory within Homebridge and use cURL to send requests to Homebridge. IMO this should be made way easier in Homebridge itself (the ability to automate accessories through plugins). To do this you're also gonna need to change the default duration that tokens last. That being said, a pull request for this wouldn't be too difficult.
Very much interested in this and willing to roll-up my sleeves if necessary. Would you mind giving some initial directions to a noob on this?
I’m not sure how beginner level you are but, I’d start with this repo, fork it, and then you’ll need to remove the http calls (technically not necessary but for cleanliness/clarity of your code and drop in the 2 switchbot cURLS (one for the gate, the other for the garage) on open and on close. You can look at my implementation for a thermostat as a guide. For the record, my thermostat is originally based on this so there’s gonna be a good amount of overlap between what I changed and what you’ll have to change.