With more digging, I found a better trigger to use when Alexa starts and stops talking.
Msg.payload.description.summary contains the words that Alexa heard you say. If you use a switch node and do Regex matches with Alexa*, it seems to work as a trigger. Make sure to uncheck "ignore case" when you do the Matches Regex in Switch Node. It looks like the summary is in all lowercase but just in case.
Also, when Alexa is done with you, she will send a payload with a blank msg.payload.description.summary so I am using that to turn off light. It seems to happen about 5 seconds after she is done talking.
PS. Is it wrong I keep referring to this inanimate object as a she or her????
Using what you posted, an Alexa Event node dumping out to a debug node i see the payload and the description.summary as noted.
What would be the way to stop her from acting on the phrase?
So like for example as a test, I have this simple flow and I said "Alexa.. node red status" and i see that come through the debug console where I can write some code to act on it, but meanwhile she blabbed on about some audio book and started playing some audible content
I agree. I think you would have to do something like @aaiyar suggested because I think the actions are within Alexa, not Node Red, where she is continuing to talk about some audio book.
I would like to have the community input about node that can get AND set state (ex: mode or HSM nodes)
I opened an issue in github (to be easier to track) to explain and discuss about it
But you can answer here if you prefer
Thanks
I just converted my capture/restore RM rules to NR sequences. I’d like some assistance in making the capture more efficient.
Using an RGBW bulb as an example, right now, I am independently querying and storing (in variables):
"switch" (on/off) and "colorMode" (CT/RGB)
If the mode is CT, I query and store “level” and “colorTemperature”
If the mode is RGB, I query and store “hue”, “saturation” and “level”
This means that for an RGBW bulb, I’m doing 4 (or 5) queries.
Is there a way to get all the information about the state of a bulb in a single query and then just parse and store the status information in the desired variables?
There is with HTTP GET commands, but not with the nodes in this integration.
That said, multiple device + change nodes vs a single node plus a function node/js code to parse seems about equal effort/complexity to me. And it is actually less hub stressful to do the multiple device block route (versus a separate HTTP Maker API call on the device), as the values are already cached on the node-red side anyway.
Also you might be able to wrap the details in a sub-flow to make it visually simpler, if it is simply too many blocks for your liking.
if you are going to have separate device nodes anyway, just make them have the command/attribute you want to begin with, instead of setting in a function node. Eliminate the function node altogether.
Another idea, is instead of having a bunch of change nodes, you could potentially just run the output into a single join node (array key by topic), then output the join node into a single variable. Then reference the elements of that new variable instead of 5 individual variables.
(I'm going to go test that last part right now.... BRB)
Although, you might need to do something more/different than just "topic" for the key, if all of the attributes are coming from the same device, as they would all have the same key....