victorv88
Published

Smart House controlled by website and vocal commands

The project represents a layout of a real life smart house, which simulates multiple day to day tasks such as door and light manipulations.

IntermediateShowcase (no instructions)444
Smart House controlled by website and vocal commands

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
LED (generic)
LED (generic)
×2
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
DHT11 Temperature & Humidity Sensor (4 pins)
DHT11 Temperature & Humidity Sensor (4 pins)
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×2
General Purpose Transistor NPN
General Purpose Transistor NPN
×2
Buzzer
Buzzer
×1

Story

Read more

Code

Voice controll app in C#

C#
In order to implement voice controll, i used System.Speech.Recognition library.
using System.Speech.Recognition;
using System.Speech.Synthesis;

 private void Form1_Load(object sender, EventArgs e)
        {
            Choices commands = new Choices();
            commands.Add(new string[] { "stop livingroom", "bedroom light on", "bedroom light off", "livingroom light on"})
            GrammarBuilder gBuilder = new GrammarBuilder();

            gBuilder.Append(commands);

            Grammar grammar = new Grammar(gBuilder);

            recEngine.LoadGrammarAsync(grammar);
            recEngine.SetInputToDefaultAudioDevice();
            recEngine.SpeechRecognized += recEngine_SpeechRecognized;


            synthesizer.Volume = 100;  // 0...100
            synthesizer.Rate = -2;     // -10...10
        }

Libraries used for server-side in Node Js

JavaScript
var app = require('express')();
var server = require('http').Server(app);
const SerialPort = require('serialport');
const Readline = require('@serialport/parser-readline');
var io = require('socket.io')(server);
var fs = require('fs');

Credits

victorv88
0 projects • 0 followers

Comments