Hello, my name is ricochin. I am a working mother living in Hiroshima and working for a web production company.
last timeFollowing on from the "I'm a smart speaker," I would like to share a story about how I am actually using smart speakers and free web services to streamline this and that in my home.
Family Structure and Self-Introduction
Husband: He is a child-oriented salesman. | |
Son: almost 4 years old. Very cute. | |
Me: I am a so-called working mother who works for a web company. I recently returned to work full time. I used to write PHP in the past (more than 10 years ago...) but I have been away from it for a long time. |
Now, in this second installment, we will introduce how Google Home, IFTTT, and LINE work together to activate communication in the home by sending and receiving LINE messages by voice.
The main items used in this project
Smart Speakers
Google Home mini (Click here for product website)
I bought it on the spur of the moment during a half-price sale sometime ago.
Since I purchased the mini without deciding what I wanted to use it for, I decided to go with the mini. The main differences between Google Home and Google Home mini are size and sound quality, so the mini is sufficient for the kind of content I will be introducing here.
Hereafter, it will be referred to as Google Home for convenience.
Web Services
IFTTT (https://ifttt.com/)
It is a convenient service that links web services together.
I will leave the detailed usage to other Blogs, etc., but set the status of the service to be triggered in "this" and the service you want to run in "that".
With this IFTTT, you can set your own commands for Google Home. Amazing!
Conversation with Google Home x LINE
transmission
We use IFTTT to send commands on Google Home to family members' LINE talk rooms.
Here's how IFTTT is set up
Convenient for contacting my husband when my hands are busy.
reception (e.g. radio)
If I can send, I'd like to receive as well; if I get a line, I'd like it to be read out loud.
However, IFTTT can send to LINE, but it cannot trigger the receipt of LINE, so it is a little bit difficult over here.
google-home-notifier
google-home-notifier is distributed as a Node.js library that allows you to freely make Google Home speak via your program.
LINE Messaging API
This API allows you to receive and send LINE messages.
Combining the two, it is possible to receive messages on LINE and have Google Home talk to them, but if you think about receiving and processing messages in real time, these two need to be on standby 24 hours a day.
To be put on standby, the PC must be connected to the Internet 24 hours a day.
This is where it comes in handy.
Raspberry Pi
Very simply put, it is a palm-sized computer. You can buy one for less than 10,000 yen including accessories. If you are not familiar with it, you can easily buy a starter kit with OS pre-installed.
I bought this model.
In summary, when a post to a family member's LINE group is received via the LINE messaging API on the Raspberry Pi, it triggers a program using a library called google-home-notifier, which is then read out by Google Home.
Yes, it is difficult. I don't know what it means anymore, do you?
This kind of thing is difficult! If you can't do it, LINE Clova, a smart speaker made by LINE, lights up when a LINE message comes in, or reads the message when you ask it to read a LINE message, although not in real time. It is cute and cheaper than Raspberry Pi.
LINE Clova Product Page
However, Raspberry Pi is also surprisingly easy to do, and even I, a non-programmer, can manage it in less than half a day.
Many people have already tried the same thing and have written source code and explanatory articles.
It would be faster for you to look at the site I referred to rather than my poor explanation, so please go there.
preferences
https://qiita.com/ktetsuo/items/8c9cd5714e231aa6ae09
Talking code
https://www.heart-net.biz/wordpress/ubuntu/google-line/
And this is what it looks like when you actually use it.
My son is happy because he knows that his father is coming home now.
My son cannot say "Google" very well yet, but I hope that eventually he will be able to communicate with my husband and me outside using Google Home and LINE.
If you like, you can try to imitate them!
Thank you for reading to the end.