Close
0%
0%

CortanaRoom home automation

Use Cortana and a Arduino for home automation to control your lights, RGB ledstrips, electric devices and more with your voice!

Similar projects worth following
CortanaRoom is an UWP application that uses cortana to control an arduino by a USB cable. The CortanaRoom application also has an complete ui so that you can also control your room with the click of a button. The application is written in C# and is completely open source. If uou have an application installed called teamviewer you can control your room from anywhere in the world/

Check out this demostration video.

https://www.youtube.com/watch?v=bN5MxCF-QB8

Features

Turn on and off 3 different lights with your voice

Turn on or off an outlet box with your voice

Use your voice to lock or unlock your room (complete support will come later)

Turn an rgb ledstrip into diffrent colors with your voice turn an rgb ledstrip into a fading effect with your voice

Use the build in alarm clock to turn your RGB ledstrip into an wake up light

Support for multiple command sorts. For example you can say "turn LED blue" or you can say "can you turn my LED on in color blue".

Materials needed

1- windows 10 pc with Cortana

1- Arduino

1- usb cable for your Arduino

1- RGB ledstrip (this is optional)

3- N-channel mosfets i use the IRFZ44N (only if you want the RGB ledstrip)

4- 5V relay( 12V is possible with extra some circuitry) i use the SRD-05VDC-SL-C but every 5v relay will work.

Lots of long wires to route trough your home.

View project log

  • 1
    Step 1
    Step 1: Get the CortanaRoom app.

    The CortanaRoom Application can be found on my git hub with this link.

    https://github.com/sieuwe1/CortanaRoom

    There are two files on the git hub page called compiled and project.

    If you do not want to make changes to the code

    If you don't want to make any changes to the code and just run the application you can download the compiled version in the map compiled. In that folder there are 2 versions of the CortanaRoom application. The one version is for official or very good fake arduinos. The other version is for fake arduino clones with the ch340 driver. If you are not sure that you have one of these arduinos follow the steps below.

    Connect the arduino then

    1. windows key + x and select device manager

    2. go to ports

    3. right click your device and select properties

    4. go to the details tab

    5. in the property selection area click hardware lds now you will see your VID and PID

    A clone with the ch340 driver should give "VID_1A86", "PID_7523"

    A official Arduino should give "VID_2341", "PID_0043"

    If one of these above cases is correct you can just download the appropriate version for you arduino. And then install the application with these steps.

    1. Open the downloaded file and go to your arduino version(fake or original)

    2. go to compiled>fake arduino/ Original arduino

    3. right click Add-AppDevPackage and click open with powershell

    4. follow the instructions and you are done.

    If you do not have any of these cases you must follow the steps below.

    If you want to make changes to the code

    You first need to install visual studio 2015 or higher(lower may work not tested). Visual studio can be downloaded from here.https://www.visualstudio.com/downloads/

    You also have to install the UWP SDK to run the project. When you open the project Visual Studio will automatically download these for you (but this may take some time). You also have to install the microsoft remote arduino library. to do this follow the steps on this website.

    https://developer.microsoft.com/en-us/windows/iot/...

    After everything is finished and you are in Visual Studio go to step 2.

  • 2
    Step 2
    Step 2: Configure CortanaRoom with your arduino

    Configure CortanaRoom with your arduino

    In order to let cortana make a usb serial connection to your arduino you first need the VID and PID numbers of the arduino. For a original or fake Arduino with the same USB to serial converter IC the VID and PID are probably as followed "VID_2341", "PID_0043". Put these values in the blue circled part in the picture above.

    If you are not using an original but a clone like me or you are not sure you must find the VID and PID yourself. This can be done by

    1. windows key + x and select device manager

    2.go to ports

    3.right click your device and select properties

    4. go to the details tab

    5. in the property selection area click hardware lds

    6. now you will see your VID and PID

    After this everything is ready. You can feel free to make any improvements to the code which it probably can use because this is my first c# application. If you are done with all the modifications press the green arrow in the top center of visual studio to run the app. (the CortanaRoom app will still do nothing because we first need to make the hardware!)

  • 3
    Step 3
    Step 3: Setting up the Arduino.

    Set up the arduino

    Now you have CortanaRoom set up nothing will happen when you press a button. We first need to program an arduino with the Standard Firmata library to make it talk with the CortanaRoom application. To do this,

    1. open the arduino ide

    2. go to file

    3. go to examples

    4. go to Firmata

    5. select StandardFirmata

    6. Click the upload button and you are done.

View all 5 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates