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

“state” does not update #76

Open
markob100 opened this issue Aug 23, 2019 · 5 comments
Open

“state” does not update #76

markob100 opened this issue Aug 23, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@markob100
Copy link

Describe the bug

The “state” string always shows “open”.

To Reproduce
Go to http://YOUR-IP/SOMA-ID

Expected behavior
For this field to show
Closing
Opening
Stopped

(or some equivalent thereof) as appropriate.

Additional context
I’m not sure if this is a bug with the code or a limitation with the data exposed by the Soma units. The reason I am interested is because I am trying to map these outputs into the PositionState characteristic of the WindowCovering service in HomeKit.

Thanks
Mark

@markob100 markob100 added the bug Something isn't working label Aug 23, 2019
@andersonshatch
Copy link
Owner

This is intentional, at least for now. You should get open for any state except for completely closed.
See here:

this.state = this.position === -1 ? 'unknown' : this.position === 0 ? 'closed' : 'open';

I think it's probably feasible to add closing, and opening, though I'm not sure on the meaning of stopped. Wouldn't that be open? Or open is only supposed to represent fully open?

@markob100
Copy link
Author

markob100 commented Aug 23, 2019 via email

@andersonshatch
Copy link
Owner

Thanks for the extra context. I suppose if opening and closing were added, you could assume stopped when you got either open or closed?

Would you be polling the state endpoint to watch for changes from opening/closing to open/closed in order to know when moving had finished?

Target position could also likely be exposed alongside opening or closing in the HTTP response, but this would only ever be the requested position that somactrl knows about; since it holds a connection to each device, you'd not be able to use the app or another means to control it.

@andersonshatch andersonshatch added enhancement New feature or request and removed bug Something isn't working labels Aug 24, 2019
@markob100
Copy link
Author

markob100 commented Aug 24, 2019 via email

@tedstriker
Copy link

From what I've seen, the reason for this lies in soma itself. It doesn't report the current position while moving blinds. The position is reported only after the target position has been reached.
What's funny is, that it provides updates of the battery level all the time while changing blind position.
The proper way to fix this would be a firmware update of the blinds motor.

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

3 participants