cakebake / node-red-contrib-alexa-remote-cakebaked

Forked for me and the community to keep dependencies up to date :)
MIT License
42 stars 6 forks source link

Can't get setting alarm volume to work #14

Open IanLauder opened 3 years ago

IanLauder commented 3 years ago

I've created a flow to set across 7 echo's first the speaker volume, then setting the Do Not Disturb flag, then setting the alarm volume.

I can set the speaker volumes and DND flag okay, but I get errors in the debug node trying to set the speaker volume:

invalid input: "{"option":"alarmVolume","value":{"device":"G091JJ0910440BRQ","volume":"40"}}"

I use the Alexa Echo node, pick the Alarm Volume, set it to a string 40 and pick one of the echo devices.

Is this bugged? or do I need to use a different value for the volume?

IanLauder commented 3 years ago

It looks like the node-red node code is bugged in that you can only pass in a string value which causes the errors because it needs a number. Trying environment variables that are numbers didn't work neither did the $abs(#) function which should return a number, it just puts a blank value in the input. But, when you use the custom command in an Alexa command it tells you it needs a value from 1 to 10. But in the Node Red code you need to send in a value from 1 to 100. Setting the payload to a number like 50 and passing that in and setting the Alarm Volume to the msg.payload got past the errors and that is working now.