datech / node-red-contrib-amazon-echo

Alexa controlled Node-Red nodes supporting latest Amazon Echo devices. NO Alexa Skills required. NO cloud dependencies.
MIT License
140 stars 42 forks source link

"Alex, Dim Family Room lights to 50%" sends 2 commands #105

Closed InstigatorX closed 4 years ago

InstigatorX commented 4 years ago

2 messages are sent when saying "dim family room lights to 50%". First one is the original brightness and second one is the 50% brightness. This has the effect of lights on at previous brightness and then dimming down from that. If previous brightness was 100% its super bright for a moment and then 50%.

datech commented 4 years ago

Yep, it’s expected behavior as Alexa is sending two different command for “on” and bri change.

The following issue might give you more details: https://github.com/datech/node-red-contrib-amazon-echo/issues/71#issuecomment-539626497

InstigatorX commented 4 years ago

Thx. Will give it a try, but don’t you think this is more of a workaround than an actual fix?

Barabba11 commented 4 years ago

How we can fix Alexa behaviour?

InstigatorX commented 4 years ago

Maybe build some logic in that detects this use case and only sends the 2nd request?

datech commented 4 years ago

We've discussed this in the past, so it looks like it is better not to change the default Alexa behavior. It is possible to implement any logic in your flow. That's why I see it more like a workaround if we imbed any logic in the hub.

Barabba11 commented 4 years ago

I agree, I strongly suggest to add a function, or better use the author flow suggestion, to filter out the unnecessary message. This means less probability of bugs/issues in the module for all other users. Search in closed topics for that example