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

Handle "GetBinaryState" requests and cache device states #15

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

boeserwolf
Copy link

  • Previous actions are stored in a (volatile) map "lastKnownDeviceStates".

  • If a "GetBinaryState" request was received, try to get the current device
    state by calling the custom handler function device.getStateHandler.

  • If no custom handler function was defined or it returns undefined, return
    the remembered state for the device using the map lastKnownDeviceStates.

  • In any doubt, just return "0" (off).

BaM and others added 3 commits November 29, 2017 11:43
handle XML responses for GetBinaryState request
Provide an example and description for getSateHandler.
@cchampignon
Copy link

I was unable to discover devices when running your branch. Using the master branch I was able to use the Echo to discover the devices. At that point I was able to use your branch with the state handler working as expected.

@dsandor
Copy link
Owner

dsandor commented May 30, 2018

@boeserwolf can you address the comments from @cchampignon? I will try to get some time to test this also. Sorry it has been 6 months since you committed.

@boeserwolf
Copy link
Author

@dsandor My apologies, I just lacked some spare time to re-check, I will look into it tomorrow as we have a public holiday over here.

@boeserwolf
Copy link
Author

boeserwolf commented Jan 29, 2019

@dsandor @cchampignon I merged the latest master branch and did some in-depth testing. Discovering devices using the Alexa App and the Echo device works perfect for me. Please also bear in mind, that I did not modify anything regarding the discovery.

@cchampignon Could you please test the changes again, and, if the issue continues to exist, tell me more about your discovery procedure and environment (which Echo Gen., etc.)? Thanks in advance.

@boeserwolf
Copy link
Author

@dsandor I see you accepted another PR addressing the same issue, was anything wrong with this approach? 🤔

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

Successfully merging this pull request may close these issues.

3 participants