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

Is it possible to update state when curtains are moved by remote or physical movement of the curtains? #30

Open
stridger opened this issue Mar 11, 2021 · 9 comments
Labels
enhancement New feature or request

Comments

@stridger
Copy link

Switchbot Curtain can be controlled by using the Switchbot remote or by physically pulling the curtain. Is it possible for switchbot-mqtt to pick up on such actions and update the mqtt state accordingly?

@fphammerle
Copy link
Owner

fphammerle commented Mar 11, 2021

This project is based on the PySwitchbot library

Unfortunaley, PySwitchbot does not yet provide state information:
https://github.com/Danielhiversen/pySwitchbot/blob/0.9.1/switchbot/__init__.py#L132

As soon as PySwitchbot supports reporting of states, I can implement reporting in switchbot-mqtt.

Upstream issue: sblibs/pySwitchbot#18

@stridger
Copy link
Author

That makes sense, thank you!

@fphammerle fphammerle added the enhancement New feature or request label Mar 11, 2021
@fphammerle
Copy link
Owner

relevant pull request: sblibs/pySwitchbot#21

@oetelaar24
Copy link

Hi, it seems the upstream pull request mentioned has been merged :-)
I'm eager to see if it will work, hope you have some time to update it on your end.

PS, I;''m running a RBPi3B+ with the 0.6.0-armv6 docker container, seems to work ok :)

@fphammerle
Copy link
Owner

Hi, we'll need a new release containing that MR first: https://github.com/Danielhiversen/pySwitchbot/releases

@oetelaar24
Copy link

It's here :)
https://github.com/Danielhiversen/pySwitchbot/releases/tag/0.10.0

@toddrob99
Copy link

Hi, is there any plan to update the state along with motor position? Currently it seems to get stuck on closing.

@fphammerle
Copy link
Owner

Hi, plans yes, but it hasn't been implemented yet.

@fphammerle
Copy link
Owner

for reference:
SwitchbotCurtain.get_basic_info returns a boolean "inMotion", which could be used for updating the device state:
https://github.com/Danielhiversen/pySwitchbot/blob/0.13.3/switchbot/__init__.py#L709
should be added here: https://github.com/fphammerle/switchbot-mqtt/blob/v3.0.0/switchbot_mqtt/_actors/__init__.py#L160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants