Home Automation Using OpenHab Server and Google Assistant

Control your home appliances using google assistant on your phone. The appliances include AC's, geysers, coffee makers.
ORIGINAL POST
By Minnu Maria Joseph
components
Hardware Components
WIZ750SR
X 1
Serial to Ethernet Gateway Module
WizWiki-W7500
X 1
mbed Borad
RCWL-0516
X 1
Mircowave sensor
Software Apps and online services
Google Assistant SDK
Google Assistant SDK
details

WIZ750SR with openHAB and Google assistants.jpg

Schematics

WIZW750sr

One the main component used in this project is the wiznet Wizw750SR ( S2E) and it’s evaluation board.

The screenshot of the openHAB interface

OpenHAB server is used for publishing the status of light . As user commands ON/OFF the slider on OpenHAB also changes and it publishes this status. The w7500 subscribes this and accordingly we can change the lightbulb to ON/OFF.

Openhab with Google assistant

Describes the components used in this project.

Block Diagran

this is the basic working of this project.

The screenshot of mobile notification when security switch becomes ON

Receiving notification

Code

W7500 code

C/C++

Code for the w7500, with which the bulb is interfaced.
#include "mbed.h"

//DigitalOut myled(D0);
//DigitalOut buzz(D2);
//AnalogIn ldr(A0);
//AnalogIn gas(A1);
DigitalOut myled(D2);
void turnoff();
void turnon();
Serial pc(USBTX,USBRX);

Serial a(D1,D0);

int main() 
{
while(1)
{
    if(a.readable()>0)
    { 
        char c = a.getc();
        pc.printf("%c",c);
        
        
        if(c=='0')
        {
            turnoff();
            
            }
            
            if(c=='1')
        {
            turnon();
            
          }
        }
    
    }

}
  
void turnoff()
    {
        myled=0;
        pc.printf("off");
        
    }
    
void turnon()

    {
        myled=1;
         pc.printf("on");
    }

WIZ750SR with openHAB and Google assistants.jpg

Schematics

WIZW750sr

One the main component used in this project is the wiznet Wizw750SR ( S2E) and it’s evaluation board.

The screenshot of the openHAB interface

OpenHAB server is used for publishing the status of light . As user commands ON/OFF the slider on OpenHAB also changes and it publishes this status. The w7500 subscribes this and accordingly we can change the lightbulb to ON/OFF.

Openhab with Google assistant

Describes the components used in this project.

Block Diagran

this is the basic working of this project.

The screenshot of mobile notification when security switch becomes ON

Receiving notification

Code

W7500 code

C/C++

Code for the w7500, with which the bulb is interfaced.
#include "mbed.h"

//DigitalOut myled(D0);
//DigitalOut buzz(D2);
//AnalogIn ldr(A0);
//AnalogIn gas(A1);
DigitalOut myled(D2);
void turnoff();
void turnon();
Serial pc(USBTX,USBRX);

Serial a(D1,D0);

int main() 
{
while(1)
{
    if(a.readable()>0)
    { 
        char c = a.getc();
        pc.printf("%c",c);
        
        
        if(c=='0')
        {
            turnoff();
            
            }
            
            if(c=='1')
        {
            turnon();
            
          }
        }
    
    }

}
  
void turnoff()
    {
        myled=0;
        pc.printf("off");
        
    }
    
void turnon()

    {
        myled=1;
         pc.printf("on");
    }

COMMENTS

Please Login to comment
  Subscribe  
Notify of