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

Implement new GetBinaryState command #31

Closed
mB-PiBox opened this issue Oct 25, 2017 · 3 comments
Closed

Implement new GetBinaryState command #31

mB-PiBox opened this issue Oct 25, 2017 · 3 comments

Comments

@mB-PiBox
Copy link

mB-PiBox commented Oct 25, 2017

It appears Echo devices are now sending request for Get BinaryState actions when entering the Devices tab in the app or alexa.amazon.com (web app). This results in any device running emulated WeMo scripts to active; all discovered "devices" turn on (or switch stated depending on their On|Off configuration.)

A check for type of action from the command sent out by the Echo might resolve this.

@n8henrie
Copy link
Owner

Huh, I am not yet seeing this behavior. Thanks for the heads up. I guess I'll have to keep an eye out and add a patch whenever mine update.

@mB-PiBox
Copy link
Author

mB-PiBox commented Oct 26, 2017

I did a quick google search to see if others were reporting the issue; only mention I could find was at https://bitbucket.org/xoseperez/espurna/issues/256/all-switches-controlled-by-espurna .. I haven't looked at the fauxmoESP coding to see how close it resembles the one here though.

n8henrie added a commit that referenced this issue Oct 30, 2017
Partial fix for #31

\#TODO:

- Add a `get_state` method to built-in plugins
- Add a `get_state` method to fauxmo-plugins plugins
@n8henrie
Copy link
Owner

I found the behavior -- I actually have to enter into one of the devices on iOS, it doesn't do it by just opening the devices tab, I have to click the device, then it tries to update the state.

I've implemented a fix in the dev branch that I think seems reasonable and seems to work. The bigger issue is that now it would be a good idea to take advantage of this new feature by having Fauxmo devices try to return their state.

I also included the new Echo request into protocol notes -- if anybody has an actual Wemo, it would be really helpful for me to see what the Wemo is supposed to respond.

I put the first step of this into ec9d5f0 by checking for a get_state method on plugins and issuing a warning if it doesn't exist. Alexa seems to handle this situation okay, just recognized that it doesn't know what the current state is.

However, if plugins can return the state, they should implement this method. For starters, I need to update the built-in plugins as well as the fauxmo-plugins plugins to try to return state. Should probably be able to get this working with the Home Assistant plugin as well.

Will take a little work, happy to take contributions. I'll also start an issue at the fauxmo-plugins repo.

@n8henrie n8henrie changed the title GetBinaryState Implement new GetBinaryState command Oct 30, 2017
@n8henrie n8henrie mentioned this issue Nov 12, 2017
5 tasks
n8henrie added a commit to n8henrie/fauxmo-plugins that referenced this issue Nov 15, 2017
Also adds corresponding tests.

- Fixes #3

See also: n8henrie/fauxmo#31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants