coldfire84 / node-red-alexa-home-skill-v3-web

Web Service/ API for Alexa and Google Home Node-RED Smart Home Control
https://red.cb-net.co.uk/
Apache License 2.0
51 stars 7 forks source link

Request: Know if command comes from Alexa or Google Home #134

Open woody4165 opened 3 years ago

woody4165 commented 3 years ago

Hi

Is it possible to know if the command related to a device is requested via Alexa or via GH ?

Thanks

coldfire84 commented 3 years ago

Can you explain your use case? To date I have actively worked to abstract the originating service (and all the differences) away from the user to make managing flows as simple as possible.

woody4165 commented 3 years ago

I would like to have a single device defined and have different behavior depending on who is generating the command. For example, "open gate". If the command comes from Android Auto, so GH, it has to open gate and turn on the light, if it's raised from Alexa, it has just open the gate. Now I've found a workaround, since the msg._messageId field contains one or more "-" sign if generated from Alexa and no "-" if coming from GH.

coldfire84 commented 3 years ago

I'll add this to the next release of the nodes.

woody4165 commented 3 years ago

@coldfire84 Thanks!!