Comments (15)
Sorry, I phrased that question poorly. For example, if the press mode with a timer for 3 seconds is set in the app, then I send an on command on HomeKit, will the plugin/HomeKit know to show that the SwitchBot is off after the 3 seconds are over?
You can set the press timer, but I think the status is the same that in-press state and post-press state of the SwitchBot.
Does that mean that it will show as on in the Home app, even though the timer has turned it off?
I guess I will find out soon when my delivery arrives!
from homebridge-switchbot-for-mac.
Would using the same MAC address for on and off on the current setup work?
from homebridge-switchbot-for-mac.
If you want to use it with a single device, you can have the same address specified for on and off, but just specify the MAC address directly as shown below and it will work.
(Internally, it works by specifying the same MAC address for on and off.
https://github.com/zizi4n5/homebridge-switchbot-for-mac#control-one-switchbot
from homebridge-switchbot-for-mac.
Thanks for your response. That makes sense. I have not not received my switchbot yet, it is arriving later today, but I wanted to understand the functionality of this plugin, but was confused by the reference to two devices in the Properties section on the readme.
from homebridge-switchbot-for-mac.
Thanks for your comment.
I feel it's hard to explain one device and two devices, so I'll add an image, etc. and improve it.
from homebridge-switchbot-for-mac.
Would it be possible to have single device on and off as shown in the screenshot, with a normal mode, and an add on mode. This would be useful for light switches.
There is no option to change the mode in the plugin.
So the SwitchBot device will work in the mode that is set SwitchBot app.
Try changing the mode of your device in the SwitchBot app.
https://www.switch-bot.com/bot
from homebridge-switchbot-for-mac.
Press-hold Time can be set in the SwitchBot app too.
from homebridge-switchbot-for-mac.
That's good to know. I was unaware that it listens to the in app settings. My experience with other hardware such as the Broadlink RM is quite the opposite. The plugin usually has to set these things.
Would HomeKit know if the switchbot is on or off using that setting in the app?
I am currently looking at the code an attempting to convert it from a switch accessory to a lock accessory. I am hoping it will be simple enough.
from homebridge-switchbot-for-mac.
Would HomeKit know if the switchbot is on or off using that setting in the app?
HomeKit cannot know what settings you have in the app, but if you change the settings in the SwitchBot app, the SwitchBot device will reflect the changes.
Then, the SwitchBot device will behave according to the device's settings when HomeKit sends on or off.
from homebridge-switchbot-for-mac.
This plugin uses the node-switchbot's turnOn/turnOff methods. This method works according to the settings of the SwitchBot device.
https://github.com/futomi/node-switchbot#turnon-method
Then there's also the press/down/up methods, so it looks like I could add a set mode option to the plugin.
However, I'm not sure if this is a limitation of node-switchbot or the SwitchBot API, but node-switchbot does not support press timers.
from homebridge-switchbot-for-mac.
Sorry, I phrased that question poorly. For example, if the press mode with a timer for 3 seconds is set in the app, then I send an on command on HomeKit, will the plugin/HomeKit know to show that the SwitchBot is off after the 3 seconds are over?
And as general point, can the plugin determine the state of the SwitchBot through the API?
from homebridge-switchbot-for-mac.
Then there's also the press/down/up methods, so it looks like I could add a set mode option to the plugin.
However, I'm not sure if this is a limitation of node-switchbot or the SwitchBot API, but node-switchbot does not support press timers.
That's good to know. If I have the time, and once I get head around why it is still showing as a switch accessory after I changed all the relevant references to a lock accessory, I might look at implementing this so that the settings are not split between the app and the plugin.
from homebridge-switchbot-for-mac.
Sorry, I phrased that question poorly. For example, if the press mode with a timer for 3 seconds is set in the app, then I send an on command on HomeKit, will the plugin/HomeKit know to show that the SwitchBot is off after the 3 seconds are over?
You can set the press timer, but I think the status is the same that in-press state and post-press state of the SwitchBot.
And as general point, can the plugin determine the state of the SwitchBot through the API?
In the case of node-switchbot, the state of the SwitchBot is You can get it as Advertisement Data.
However, I don't know how to use it in detail because I don't use it.
https://github.com/futomi/node-switchbot#advertisement-data
from homebridge-switchbot-for-mac.
I have received my SwitchBot and it behaves as discussed. Would a timeout/timer for the state that is shown in HomeKit (on or off) be difficult to implement, so it can be matched with the timer in the app?
I have achieved this by using the ping feature, but setting an IP that will always be unreachable.
from homebridge-switchbot-for-mac.
There will be some unnecessary pings, but I think it's a no problem that way.
from homebridge-switchbot-for-mac.
Related Issues (17)
- More of a Question HOT 1
- Failing to turn on HOT 22
- lock mode HOT 1
- Ping results in switch state stuck "on" HOT 3
- Ping IP HOT 4
- Configuration of more than 1 switch fails / on-off mode HOT 4
- Support for Switchbot Curtain HOT 1
- Can you do a windows OS support for this plugin ? HOT 1
- Not working when daemonized on macOS Big Sur HOT 4
- Support for Humidifier HOT 3
- Momentary on mode
- Has this been tested under Mojave? HOT 2
- Device not found HOT 1
- Plugin Does Not Work Following Reboot HOT 10
- Segmentation Fault: 11 HOT 14
- Support Outside of macOS HOT 25
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-switchbot-for-mac.