Node-red-contrib-google-action 2.0.0-alpha released

It does seem to accomplish the same thing - not exposing whole nodered interface to the internet. I don't think anything that is as dynamic/flexible as nodered (or for example Jenkins CI) should be accessible from the internet as it will be attracting unwanted attention.

Webhookrelay makes things even easier as device can change internally IP address and no firewall/router NAT config is required. Users get their public endpoints such as https://my.webhookrelay.com/v1/webhooks/544a6fe8-........ and all webhooks that arrive to that endpoint will be streamed to nodered.

Is the google action payload inside HTTP body or are headers/URL query also involved?

Paul, thanks for the offer but again forget my question :wink:

Seems that - at the end of the gactions command - you need to use the project id, and not the project name... For anybody having the same troubles, here is where you can find the id.

  • Open the console.actions.google.com page

  • Click on the rectangle of your project (in the rectangle you see the project name!)

    image

  • Click on the menu to go to the project settings:

    image

  • And there is your project id:

    image

  • Which can be used at the end of your gactions command:

    gactions test -preview_mins 9999999 -action_package action.json -project <my project id>
    

    Which gives a much better result now:

    Pushing the app for the Assistant for testing...
    Your app for the Assistant for project is now ready for testing on Actions on Google enabled devices or the Actions Web Simulator at

Caution: whenever somebody reads this afterwards, the screenshots most probably will not match the reality. That is perfectly normal because Google changes their stuff continiously. So you will have to start searching again :joy:

Now up to the next problem ...

Almost there...
I have send a message from the Google Actions Simulator tool, and the text arrives nicely in my Node-RED flow:

image

Up to the last step now: speak to my Google Home device and send the text to my Node-RED flow ...

From the simulator I see that all devices linked to my personal Google account can be used for testing:

image

This makes sense, since I haven't released my app as public (i.e. for all users). My Google Home account is indeed linked to my Google Home device. But when I say "Hey Google. Talk to Node Red" (as specified in my action.json file) to the device, then the damn thing just says he cannot help me...

@BartButenaers - I don't know if you've made further progress, but I'm now at the same stage as your last post, and with the same results.

It would also be great if @DeanC could share a basic 'example' flow, demonstrating functionality, and which we could use as a template, to build upon.

Paul

Hi Paul,
Still trying and crying ...

I had read somewhere that you cannot run actions in language X, if your device is responding to another language Y. Since my Google Home device is dutch, I activated that also in my project settings:

image

And I have added the language code also to my action.json file:

image

But it still doesn't work. And if you say it also doesn't work for full english users like yourself, the problem will be located elsewhere...

BTW don't know if this is normal in test mode, but I don't see any actions:

image

And as a result I cannot see the error log, as described here.

When I say "hey google, talk to node red", I get -
https://clyp.it/1p5lrucg/widget
If I say "yes", then it replies "Sure, I'll get the test version of your test app" and google opens the test app.

There is a way around this, by creating a 'routine' in the Home app, so saying "hey google, use node red", it opens the test app.

Not sure what you mean. Do you talk to a Google Home (Mini) device? If so, what do you mean with 'google opens the test app'?

Yes, I just speak the command.

Each google account allows the user to create just one 'test app', which must be invoked before running the node red commands.
The test app is invoked by saying "hey google, use my test app". The test app is then opened for however long that the conversation continues, and is only then responsive to node-RED commands.

Once the conversation ends, then the test app is dropped.

Really appreciate your help, but seems you are a 'bit' more experienced than me...

  • That 'test app', is it something you have to install manually? Or is that done automatically via the action.json? Or is that automatically available? Or is the test app our url from the action.json file perhaps?

  • Suppose the 'test app' is working fine, do you have to repeat every time:

    "hey google, use my test app".
    "hey google, talk to node red"
    "hey google, ..." --> do something in Node-RED like "light kitchen on"

  • To avoid having to say "hey google, use my test app", then I should create such a routine?

As far as I'm aware, it's created when you create the app in https://console.actions.google.com. If you say to your google mini "Hey google, use my test app", you should get a verbal confirmation and a msg from your node-RED 'start' node.

Yes, but not the 2nd command, and once the test app is active, it will await the node-RED command (no need to say "hey google" again)
"hey google, use my test app".
"hey google, talk to node red"
"hey google, ... do something in Node-RED like "light kitchen on"

This can be automated by creating a routine with 2 commands in the 'My assistant should...' section;

  1. use my test app
  2. kitchen light on

...and call the routine, 'turn on kitchen light'.
So you would say "hey google, turn on kitchen light" and both commands would be consecutively issued.

Unfortunately, even with the routine, google replies "OK I'll get your test app" before switching on the light. This is the reason why I stopped using the earlier version of this node, and am currently trying NORA, which accepts commands like "hey google, switch on the kitchen light", without invoking the test app.

1 Like

Thanks a lot Paul !!!!
Now my Google Home Mini finally calls my Node-RED flow.
Did two tests (in red highlighted what I have said to the device):

image

Will also try later on your routine tip...
I'm very glad that Dean has chosen you to be his personal assistent during his absence. It was one of his best decisions !

Now I finally understand why I have wasted some much time searching all around. The dutch version of the app doesn't contain yet all functionality (like routines, dutch start texts for test app, ...), although Google announced that for the end of this year.

So I have now a dutch device, with (temporary) incomplete dutch software ... :rage:

I'm seeing the same here for some functions...
For example the 'Continued Conversation' feature.... which is a major step forward, but not available in the UK yet, only the US.
However, like you have found, switching to another locale (US) gives me the feature, albeit an American accent....

Indeed, that might be a workaround. But I think I'll just wait until they have finished the dutch version, and continue meanwhile with other Node-RED stuff...

Last question (for today :sunglasses:) about this section in the action.json file:

image

That was the reason why I have been saying "Hey Google, talk to Node-RED" over and over again to that mini device, until my wife asked if something was wrong with me :face_with_raised_eyebrow:

If I understand correctly, the mini device only responds to that sentence as soon as I should release my NodeRedApp public (for everybody). But since I want to keep my NodeRedApp private, I need to stay working with the test version during the remainder of my miserable life (which is why I need to execute gactions test -preview_mins 9999999 ... to have a preview time of about 19 years). And that test version of my app can only be activated with "Hey Google, talk to my test app", which is a default sentence from Google...

Is that correct?

IMO Yes, but @DeanC will have included the query pattern 'talk to node red' in action.json for a reason... we just don't know why, or how to make use of it due to the lack of documentation.

There will be a reason... Dean, like you, is an accomplished programmer.

I noted somewhere earlier that it is now possible to put you Google Assistant app into alpha test mode using the Google Assistant console. This allows you to name your app anything you want within the restrictions imposed by Google (unique two word name that is not a recognized trademark). In the console, you can invite other registered users to access your app, making it a sort of private app.

As an alternative, you can use Routines in the Google Home app to set a shortcut such as 'Node Red' -> 'Talk to my test app'

Hello
I have used this blog to configure and make my google action work with node red, thanks a lot.
Now, I would like to use the same things, but instead of routing the port 8081 to my node-red machine, I would prefer to use a webhookrelay (a contrib for NodeRed).
For the moment, i have registerd in webhookrelay, and my node webhookrelay is connected to my account at webhookrelay.com.
Then, I have modified the action.json file so that the url is now the one I use to connect to my webhookrelay, followed by the :8081 for the port to connect to.
But unfortunately, it seems that the googleaction doesn't arrive until my google action IN node.
Here is what I have changed in the action.json file :8081 :slight_smile:

"conversations": {
    "nodeRedApp": {
      "name": "nodeRedApp",
      "url": "https://my.webhookrelay.com/v1/webhooks/0d2f938e-30f2-4427-xxxx-yyyyzzzz8f12:8081/",
      "fulfillmentApiVersion": 2,
      "in_dialog_intents": [
        {
          "name": "actions.intent.CANCEL"
        }

Then, I have registered this new file with the command
gactions test -preview_mins 9999999 -action_package action.json -project <my project id>

But even if I received a correct reply, it seems that the link beetween google action and webhookrelay is not made correctly.
What did I forget?

Hello.
I just dicovered nodered some weeks ago, and enjoyed the google action node.
In my case, everything works fine.
But I open the port 8081, and the action.json file includes a fix IP adress.
I hav seen you were starting talking about webhookrelays. This is a very interesting thing, because this would mean that no port forwarding should have to be done (8081), and any IP adress not configured anymore.
But I haven't seen in the post of Dec'18 any answer about how to make webhookrelays and node-red google action work together.
Do you have an example to show me if and how you did it?
Thanks a lot.

@DeanC do you have any example flows I can work off of? I'm having difficulty with understanding how the ask module works. If I just say "talk to test app" it just says not responding. If I do "tell test app to do something" that proceeds but at that point I'm unsure how the flow works. I see your diagram example but I'd like to see the code and etc inside each node.

Also, do you know if a response can include an image that displays on a Google Hub? I know I can include an audio file as part of the response. Thanks.