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

Doesn't output %, on/off works #102

Closed raufis27 closed 4 years ago

raufis27 commented 4 years ago
SUMMARY

% doesn't work. Only ON of OFF command output.

ECHO DEVICES
MODULE VERSION

0.1.10


##### CONFIGURATION
<!--- Paste export of the Node-RED flow between quotes -->
```paste below
CONSOLE OUTPUT
msg.payload : string[2]
"on"
STEPS TO REPRODUCE

Alexa, set {device} to 50%

EXPECTED RESULTS

msg.payload : string[2] "50"

ACTUAL RESULTS

msg.payload : string[2] "on"

datech commented 4 years ago

It is expected behavior.

Result on "set {device} to 50%" command will be:

msg: {
   "payload":"on",
   "on":true,
   "bri":128,
   "percentage":50,
 ...
 ...
 }
raufis27 commented 4 years ago

Sorry, I don't get it. If I ask Alexa, or use Alexa app to change brightness, I get only on/off command. Ho do I get percentage of brightness ?

datech commented 4 years ago

The payload attribute of the msg is either on or off. Bri and percentage are attributes on the msg, not on the payload. Are you checking the full message or just the payload?

raufis27 commented 4 years ago

I have debug node connected to output of hub and "device".

raufis27 commented 4 years ago

I see what do you mean now. Thank you so much!

datech commented 4 years ago

Feel free to reopen if you find any inconsistency with the documentation