Skip to content

Latest commit

 

History

History
188 lines (95 loc) · 8.77 KB

README.md

File metadata and controls

188 lines (95 loc) · 8.77 KB

NodeSmartHome

NodeSmartHome is a project for integrating smart devices in your home using NodeMCU, an ESP8266-based microcontroller board. With NodifyHome, you can control and automate various smart devices such as lights, switches, thermostats, and sensors, and integrate them into a single smart home system that can be controlled from anywhere.

Software Requirements

  • Arduino IDE (Version- 1.8.29)
  • NodeMCU integration to Arduino IDE (Version- 2.7.3)
  • MIT AI2 Companion Android App from Google Playstore

Hardware Requirements

  • NodeMCU ESP8266 Wifi Module
  • Relay Module (Optional)
  • 4 Loads (LED Bulbs in this case)
  • Jumpers

Steps to set up the project:

  • Installation of Arduino IDE

image

2. Click on Software tab.

image

3. Scroll down to Downloads.

image

4. Download the .exe file according to your Operatng System. I have got "Windows 10 and newer, 64 bits" for my system.

image

  • ESP8266 add-on in Arduino IDE

1. Go to the Arduino IDE and on the tabs listed on the top ribbon, click on File > Preferences.

image

2. Enter https://arduino.esp8266.com/stable/package_esp8266com_index.json into the "Additional boards Manager URLs" field as shown below & click OK.

image

3. Go to Tools > Boards > Boards Manager...

image

4. Search for ESP8266 and install version 2.7.3

image

  • Installation of Firebase Library

image

2. In the Repository, click on Code then click on Download ZIP

image

3. In Arduino IDE click on the Sketch tab listed on the top ribbon, click on Include Library > Add .ZIP Library...

image

4. Go to the ZIP folder you just downloaded, Select & click Open

image

FirebaseArduino now depends on ArduinoJson library

  • Installation of Arduino Json Library(version-5.13.2)

1. In Arduino IDE click on the Sketch tab listed on the top ribbon, click on Include Library > Manage Library

image

2. Search for ArduinoJson by Benoit and install version 5.13.2

image

  • Firebase Account Creation and setting up the project

image

3. Choose Default Account on Firbase & click on Create Project.

image

image

4. From the left nav bar, go to Build > Realtime Database > Create Database

image

5. Select locked mode & click on Enable as rules are already set & third-party cannot read/write on our data.

image

6. In the Realtime Database you just created, go to Rules > Edit rules to set the read and write permissions to true. Click Publish once you're done.

image

7. Go to Data tab & copy the Reference URL from top panel. Save this in Notepad.

image

8. Open the file 4relay_mit.ino & paste the link copied in the last step (w/o https) in the third line as shown.

image

9. Go to the Firebase Project & head on to the Settings > Project Settings > Service accounts > Database secrets. Copy the secret key.

image

image

10. Go to Arduino IDE & paste the secret key into line 4 of 4relay_mit.ino as shown.

image

11. Write the name of your WiFi & password in the third & fourth line of 4relay_mit.ino.

12. Connect LEDs on indicated pins (ex.- D1, D2, D5, D6) or connect relay input to the pins.

image

image

14. Click on Create Apps and Login with your mail. Go to Projects > Import Project (.aia) from my computer and upload smart home app.aia

image

15. After the App is loaded, click on FirebaseDB1 and on right panel, paste your secret key in Firebase Token field and Reference URL in Firebase URL fields. Set bucket value to NULL.

image

16. Click on Connect > AI Companion

image

17. Open the MIT AI Copanion App in your Smart Phone. You'll see a Smart Home App once the QR is scanned successfully.

image

image

  • Updation of Arduino Firebase Library Fingerprint

1. Go to the path where the FirebaseArduino Library is installed. Now go to firebase-arduino-master > src & open FirebaseHttpClient.h in Notepad.

image

image

2. Now, we will change Firebase Fingerprint

image

3. Go to https://www.grc.com/fingerprints.htm & scroll down to paste the Firebase URL & click on Fingerprint Site.

image

image

4. Copy the generated Key & replace in the notepad as shown & Save the changes. Close the Arduino IDE.

image

image

5. TA-DAAAA! The SSL security is now configured & start connecting the Board to see the project working!!!

Project Demo Video

VID20230228170042.mp4