makermusings/fauxmo

Respond to Alexa

Closed this issue · 2 comments

Hi,

I have setted everything up, so that i can controll the pin, and it words perfectly fine.
The issue i have is: everytime i tell alexa to turn a GPIO on or off, she does it fine, but after that she tells me every time, that the device is not online. Do alexa need a response from the pi to stop saying this? What do i have to do to send this response? what else can i do?

sry for bad englisch

OlkeA commented

Hi,

I ran into the same issue with Alexa.
While I was waiting for Python 3 to build on my Raspi for using the latest fauxmo branch (n8henrie/faufmo) I came up with a quite simple "copy/paste hack" of the fauxmo.py in this repository (see attached file fauxmo_state.py.txt).

The current implementation does not respond to the Status request from Alexa. Apparently the response to it became mandatory with some update weeks ago.

So, I copied and modified the SetBinaryState code to handle the GetBinaryState request, copied the GetBinaryStateResponse body from mattenoble and decided that an action_handler must now also implement a status-method (return True = "ON" or False = "OFF") and done.

Not so pretty but maybe it helps somebody and Alexa is satisfied again.

EDIT: Just saw it too late. There is already a pull request addressing the issue: link

Just a thank you for this. Solved my misbehaving Alexa/Fauxmo setup. I had been seeing intermittent operation with "device unavailable" in the Alexa app and the Echo saying it was not responding. in just the past week or two. Applying your GetBinaryState patch worked!