Closed neophob closed 6 years ago
I had the same issue. I added a check if the request is a set command and not a get command from Alexa. Following modification solved the issue for me:
Change in file deviceEndpoints.js
:
if (request.payload.indexOf('<BinaryState>1</BinaryState>') > 0) { action = 'on'; } else if (request.payload.indexOf('<BinaryState>0</BinaryState>') > 0) { action = 'off'; }
to (by adding a check if it is a set request)
if (request.payload.indexOf('</u:SetBinaryState>') > 0) { if (request.payload.indexOf('<BinaryState>1</BinaryState>') > 0) { action = 'on'; } else if (request.payload.indexOf('<BinaryState>0</BinaryState>') > 0) { action = 'off'; } }
@ramsnerm do you mind creating a PR for that issue?
@neophob done :-)
Merged. About to bump to 1.0.3 on npm to include this and some other PRs.
when using fauxmojs and visiting the alexa website, suddenly all devices are powered on.