Announcement

REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at https://forum.rexygen.com.

Looking forward to meeting you there!
 

#1 2018-11-19 12:07:36

geocipo
Member
Registered: 2015-12-07
Posts: 23

Use "ok Google"

Hi, is it possible to order rex output with the "ok google"?
If there is a possibility is it possible to have an example?

Thanks you in advance

Last edited by geocipo (2018-11-19 12:10:02)

Offline

#2 2018-11-19 14:14:05

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Use "ok Google"

Hi geocipo,

I'm not sure if I understand your question correctly. Please, can you describe your idea in more details? What exactly do you want to achieve?

Cheers, Tomas

Offline

#3 2018-11-22 10:32:43

geocipo
Member
Registered: 2015-12-07
Posts: 23

Re: Use "ok Google"

I would like to drive the outputs of my Unipi with the function "Voice of google" via rexygen. Is it possible? example: https://youtu.be/X9inuvuyzHQ But in simplified function for rexcontrol?

Offline

#4 2018-11-22 13:30:26

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Use "ok Google"

Hi geocipo,

now I see the point wink In general: yes, it is possible. As far as I got to know Google Assistant SDK preferably uses Python, right? It is possible to read/write data from/to REXYGEN using REST API. See attached example on mastering REXYGEN REST API using Python.

Cheers, Tomas

0302-03_REST_API_Python_Bash_etc.zip

Offline

#5 2018-11-25 12:58:29

geocipo
Member
Registered: 2015-12-07
Posts: 23

Re: Use "ok Google"

Thank you for your answer. However, I am a newbie ...
I would like to use IFTTT with my smartphone.

Create a "New" applet: "If this then that"

this => Google assistant
That => Webhooks

In the configuration of webhooks I put:
POST
url is: http: //192.168.1.XX: 8008 / api / data / rest_api_task / CNB_IN: YCN

used with the example 0302-03_REST_API_Python_Bash_etc.zip

How can I directly send a 1 or a 0 directly via the url?
Is it possible?


The idea would be to create several applet on ifttt and incorporate it into my home automation.

If I say Turn on the kitchen => an applet sends the url "on" on the rex CNB

If I say Off the kitchen => an applet sends the url "off" on the rex CNB

It would allow me to have the google assistant easily on my home automation


Thanks for the help.

Last edited by geocipo (2018-11-25 13:29:28)

Offline

#6 2018-11-27 13:15:34

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Use "ok Google"

Hi geocipo,

have a look at the screenshot - it should answer all your questions regarding settings of IFTTT Webhook.

Note: the setting in this post works with REXYGEN login "admin" and blank password. If you use other authentication change the token parameter in URL (encoded in base64).

ifttt_configureWebhook.png

Let me know if you managed to control your kitchen wink

Cheers, Tomas

Offline

#7 2018-11-27 16:23:34

geocipo
Member
Registered: 2015-12-07
Posts: 23

Re: Use "ok Google"

Woww! Great ! I will test that! However, how do I create the token in relation to my password?

Offline

#8 2018-11-27 18:09:27

geocipo
Member
Registered: 2015-12-07
Posts: 23

Re: Use "ok Google"

Hi, I just tried but it does not work ... Does it work for you?

Here is my Printscreen:

Capture2.jpgCapture1.jpg

Last edited by geocipo (2018-11-27 18:10:25)

Offline

#9 2018-11-28 10:31:49

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Use "ok Google"

Hi,

yes, it's working for me. Does your Raspberry Pi has public IP address? This could be the problem - local IP address is not enough. What does IFTTT Activity channel says? Which error?

Token:
you can generate your token by any of online tools to encode base64 in following format: login:password (default in REXYGEN: "admin:")

Cheers, Tomas

Offline

#10 2018-11-28 16:28:00

geocipo
Member
Registered: 2015-12-07
Posts: 23

Re: Use "ok Google"

Yes that must be the problem. he sends me "Timeout" you do not have an idea for the local? Habridge? Philips Hue Emulator? Or a better idea? I have 3 RPI with Rex on it I prefer to stay in local.

thank you for your reply

Offline

#11 2018-12-03 15:11:56

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Use "ok Google"

Hi,

I'm not familiar with the services you mentioned. In local network you can use Google assistant on your RPi and communicate with REXYGEN via REST API.

Cheers, Tomas

Offline

#12 2018-12-05 15:54:48

geocipo
Member
Registered: 2015-12-07
Posts: 23

Re: Use "ok Google"

Thank you for your reply! I opened my network to the internet, it works!
However, is it possible to send a "push button" command? "on" for 1 sec with JSON?

Because I would like to find the solution to combine "Push button, HMI, and ifttt" I can not send an "ON", it would have to be an impulse.

Offline

#13 2018-12-05 20:46:23

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Use "ok Google"

Hi,

try to pair IFTTT with MP function block in REXYGEN. Just specify the "pt" parameter as 1s and it should do the job.

Regards, Tomas

Offline

#14 2018-12-09 14:09:45

geocipo
Member
Registered: 2015-12-07
Posts: 23

Re: Use "ok Google"

Great! I drive the whole of my house with the voice! thank you!

Offline

#15 2018-12-13 08:46:17

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Use "ok Google"

Awesome! Are you planning to publish some information about your home automation project? Or maybe shoot a short video showing your system in action?

I'm sure I'm not the only one who would love to hear more about your project.

Kind regards,
Jaroslav

Offline

#16 2018-12-14 12:30:28

geocipo
Member
Registered: 2015-12-07
Posts: 23

Re: Use "ok Google"

Hi Jaroslav, I already sent you my home automation system a few months ago.
Here is a video that shows the control of my cooking with voice



vide_2018-12-14-1886a7202p1000578.jpg

Offline

#17 2018-12-17 12:51:29

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Use "ok Google"

Thank you for sharing your video! Well done, you did really good job smile

Offline

Board footer

Powered by FluxBB