-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Feature Request: Support for SwitchBot Blind Tilt #649
Comments
Working on it. |
@sdaltons1, latest beta should display the Blind Tilts, I haven't been able to implement push commends yet. Can you try the latest beta: |
The blinds do show up using the latest beta. Seems to have some issues with understanding "open" vs closed up or closed down. When the blinds are 100% open HomeKit shows 50% and when moving to 100% it actually closes them. I think this is more an issue with SwitchBot as I've noticed this with all voice assistants. They need to build a default close direction or something like that |
@timmy8784 we will probably have to create a config to say what is closedup and what is closedDown |
Have updated to the beta and have mine showing as well. If the blinds are open and I tap on them (using Apple Home), they will close properly. But once they are closed, HK doesn't seem to understand how to open them. I haven't played with the sliders yet. |
@sdaltons1, like I said. I haven't implemented push commands yet. |
@timmy8784 or @sdaltons1 can you get me some debug logs of the status updates you are getting from the Blind Tilts? I will actually be able to do a close or open and and move the blinds closedUp or ClosedDown using HomeKit TargetHorizontalTiltAngle Characteristic. |
Forgive my ignorance, but how exactly would I do this? Is this simply trying to access the blinds and copy what shows in the activity in homebridge? |
Well first you will need to either turn debug mode on for Homebridge, the plugin, or for the device. Then copy any logs on the blind tilt. Easier to set debug on a per device level. You can do this by getting the deviceID which is in the logs and pasting it in the plugin config under SwitchBot device settings. Then there is a logging option, select debug. |
Does any of this help? 13/01/2023, 13:52:42] [SwitchBot] Blind Tilt: Living Room Blinds 2 openAPIRefreshStatus |
Yes it does! Thanks! |
Not sure how I missed that 🤦♂️ Let me know if I can help in any other way. And thanks for doing this! |
I also have a few blind tiles devices. Let me know if there is any info I can provide to help. |
I've been trying to implement Not sure if I'm doing something wrong or if this is just not supported by the Home app right now. Mapping 0-100 to 0=100% down, 50 = open, 100=100% up also does not seem really great; The blinds will only show up closed when tilting down, not up. I'm not sure what the best way is here. Any guidance? |
@AndreasVerhoeven, I just haven't had time to work on this, so thanks. It does display, but if you are still display the light sensor the controls are within the separate services of the accessory. I can push what I have so far if that helps. Also the controls are not displayed up front, you have to scroll down and you will see a bar that you can go from left to right and right to left. |
If you can push what you have, I can try to pick it up from there! |
okay changes are in branch |
Thanks! I know see the HorizontalTilt slider in the Home app! Wondering what would be smart to do: Option 1: map the slidePosition the HorizontalTilt 0% -> -90deg, 50% = 0deg, 100%=90deg Option 2: use a combination of tilt and position
Pros: the big slider is used Option 3: only use TargetPosition and let the user configure a set direction Pros: simple Option 4: 0=closed downwards, 50%=open, 100%=closed upwards with option to invert Pros: simple, already works Or should this be user configurable? Might be a lot of work? |
I think it should be user configurable. So we can have options for Valid Values of TargetHorizontalTiltAngle. We would have defaults and then allow for config changes. Something like this:
|
What would the main position slider do in this case? |
We would have to determine that somewhere. Once I get some blinds I can play around with this more :) haha |
I know you guys weren't really asking me but I also only really open them or close them up. So I will throw in a meaningless vote for option 3 above! |
okay nvm, sorry I don't have the blinds yet, so wasn't sure what it could all do. I reviewed a view and can now see that will will want to use the I think we do this. We use So this is how it would work: We would only allow If If |
I was thinking of something along the lines of:
That way, it's pretty flexible and support a lot of use cases? Sdalton1 and me only closes the blinds upwards, so we would configure it as 'only_up', while other people might want to use the tilt direction? |
@donavanbecker I got something working
I got a lot of it working after messing with the OpenAPI, but I'm constantly running into this piece of code:
If I understand correctly, we want to trigger update checks also if the device never told us it is moving. However, the |
@AndreasVerhoeven feel free to change what you need. I just copied the curtain file to get this started. Also if you want to work on BLE, I can give you direction. |
I think I'm hitting a bug I've also hit with curtains here. Another problem seems to be that the OpenAPI is never telling us if the device is moving:
Don't know how to work around this yet. I'll try to work on the BLE part as well, but it has been highly unstable for me in the past, so unsure how much success I will have with that |
@AndreasVerhoeven You could probably find a lot of info for BLE here: sblibs/pySwitchbot#181 And we would need to integrate it in this repo: OpenWonderLabs/node-switchbot#179 |
@AndreasVerhoeven I got my blind tilts today!! So I can work on this more. Would you want to submit what you have so far with a pull request? And then we can both work base off of that. |
That's great news! I've based my changes on 2.4.1-beta branch in https://github.com/AndreasVerhoeven/homebridge-switchbot/blob/beta-2.4.1/src/device/blindtilt.ts . I'll clean it up a bit later and make a PR in a few hours. Few issues I ran into:
Apart from that, controlling the device thru homekit via several configurable methods works pretty well already! |
## [Version 2.5.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v2.5.0) (2023-01-28) ## What's Changed - Add Intial Support for Blind Tilt (OpenAPI Only), Thanks [@AndreasVerhoeven](https://github.com/AndreasVerhoeven). [#649](#649) @dnicolson - Remove incorrect warning message, Thanks [@dnicolson](https://github.com/dnicolson). [#661](#661) - Replace switchbot wait with utility function, Thanks [@dnicolson](https://github.com/dnicolson). [#633](#633) - Enhancements to BLE functionality - Housekeeping and updated dependencies. **Full Changelog**: v2.4.0....v2.5.0
## [Version 2.5.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v2.5.0) (2023-01-28) ## What's Changed - Add Intial Support for Blind Tilt (OpenAPI Only), Thanks [@AndreasVerhoeven](https://github.com/AndreasVerhoeven). [#649](#649) @dnicolson - Remove incorrect warning message, Thanks [@dnicolson](https://github.com/dnicolson). [#661](#661) - Replace switchbot wait with utility function, Thanks [@dnicolson](https://github.com/dnicolson). [#633](#633) - Enhancements to BLE functionality - Housekeeping and updated dependencies. **Full Changelog**: v2.4.0....v2.5.0
@AndreasVerhoeven, took what you had so far and released it in v2.5.0. We can make improvements of that. Thanks!
Do you have Curtains? if not look over the Curtain file. I have
works for me. |
I am up an running with mine on 2.5.1. I have mine set to Middle to Down in my config, but when the plugin loads, I get this in the logs:
"mode" is properly set to only_down due to my change in the config, but "mappingMode" is at only_up. When closed they go up and not down as set. Any ideas? I'm on firmware 2.0 on my Blind Tilts. |
It's more that because of a lack of the
|
@AndreasVerhoeven I have reopened them. FYI, I don't actually work for SwitchBot, I just maintain this plugin and have some access to the othe repos to help out. |
Sorry, with |
Hey y'all, just wanted to add that I have switchbot tilt blinds, I'm also happy to beta test and get y'all whatever logs you needs, if it'd be helpful! |
The current beta 9 sees the blinds, sends commands... but fails to make a bluetooth connection or control the blinds. The SB app does work, so I know it's not an issue with the bots per se. And yes, I would be happy to test any fixes. :D |
Just got four blinds and am starting work with the plug-in. Looks good and configured for down only and API. All works awesome.. though status feedback is slow. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sorry, how do I set blinds to close down only? I noticed there are mentions of it and pictures of peoples config files with Mode = .. I don’t have any of that in my config file. Thank you |
Thank you for the reply. I don’t have that Mapping Mode anywhere? |
@simonrb2000 Open a new issue, so I can see your config. You aren't setting anthing in the device settings. |
Problem
Saw that the blind tilts have now been added to the API
Solution
Can support for the blind tilts be added to this plug-in? Please and thanks!
Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: