Google Home Integration

Google Home Integration


How it works

Controlling a Trash by just saying “OK Google Open the Trash!”
Google Home already has integration with IFTTT.
And IFTTT has Webhooks integration.

obniz has a messaging API.
It is easy to send message from any other webservices to obniz.
By adding Webbhooks to obniz on IFTTT, GoogleHome integrasion is as easy as possible.


  1. obniz – 1
  2. battery or usb adaptor & cable – 1
  3. Servo motor & Trash – 1


Step 1

Connect Servo motor to an obniz.
io1: GND,
io2: VCC,
io3: signal

Then power up your obniz.


Step 2

Add webhook on IFTTT.

Step 3

Write code below.
And run it on HTML or nodejs.


This is a html/script for this.

<div id="online-status"></div>
<h1>Talk with google home</h1>
<div id="text">
    <li>Open the trash</li>
    <li>Close the trash</li>
  var obniz = new Obniz("OBNIZ ID HERE");
  obniz.onconnect = async function () {
    var servo = Parts("ServoMotor");
    servo.wired(obniz, 1, 2, 3);
     obniz.onmessage = function(message, from) {
        if(message === "googlehomeOpen"){
          obniz.display.print("open the trash");
        if(message === "googlehomeClose"){
          obniz.display.print("close the trash");

See the Pen Cookbook: with Google home by obniz (@obniz) on CodePen.

Leave a Comment

%d bloggers like this: