Differences

This shows you the differences between two versions of the page.

Link to this comparison view

iothings:proiecte:2022:smart-remote [2023/01/19 20:21]
cristina.iordache98 [SinricPro utilization]
iothings:proiecte:2022:smart-remote [2023/01/20 02:47] (current)
cristina.iordache98 [Demo]
Line 16: Line 16:
  
 The project has the following functionalities: ​ The project has the following functionalities: ​
-  - when a command is issued through any google device (like //"Hey Google, turn on the air conditioning"//​), ​the system will the system will execute the command on the AC device.+  - when a command is issued through any google device (like //"Hey Google, turn on the air conditioning"//​),​ the system will execute the command on the AC device.
   - the system will also intercept commands from the regular IR remote control and update the status in the Cloud.   - the system will also intercept commands from the regular IR remote control and update the status in the Cloud.
   - the mode of the AC device will be set automatically depending on the target temperature and the current temperature and humidity in the room.   - the mode of the AC device will be set automatically depending on the target temperature and the current temperature and humidity in the room.
Line 65: Line 65:
  
  
-The execution flow in diagram ​is presented in the diagram below.+The execution flow is presented in the diagram below.
    
 {{:​iothings:​proiecte:​2022:​software-flow-smart-remote.drawio.png?​600|}} {{:​iothings:​proiecte:​2022:​software-flow-smart-remote.drawio.png?​600|}}
Line 83: Line 83:
 {{:​iothings:​proiecte:​2022:​sinric-choose-device.png?​700|}} {{:​iothings:​proiecte:​2022:​sinric-choose-device.png?​700|}}
  
-After completing all the tabs, the device will be created and visible in the platform and an key will be generated. A key that will be used from the program to update the data in the cloud.+After completing all the tabs, the device will be created and visible in the platform and key will be generated. A key that will be used from the program to update the data in the cloud. ​Also after the account was create an //APP_KEY// and //​APP_SECRET//​ are created in order to connect to the platform from the program.  
 + 
 +  #define APP_KEY "​xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"​  
 +  #define APP_SECRET "​xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"​  
 +  #define DEVICE_ID "​63bafbf161ff9a367127b578"​ ''​ 
 + 
 + 
 +==== Google Home app ==== 
 + 
 +In order to connect a Google device with SinricPro platform, download the //Google Home// application. After that, select the "​+"​ button from the left corner and choose //Set up a device//.  
 + 
 +{{:​iothings:​proiecte:​2022:​google-home-app1.jpeg?​200|}} 
 + 
 + 
 +Next choose //Works with Google// and there search for the platform //​SinricPro//,​ in this case. 
 + 
 +{{:​iothings:​proiecte:​2022:​google-home-app2.jpeg?​200|}} 
 + 
 +After this the connection is established. 
 + 
 ==== ISSUES ==== ==== ISSUES ====
   * **Working with tasks:** In initial implementation,​ I tried to make use of both cores available on the ESP32 Microcontroller. The flow was designed to have one core that is always listening for commands sent by Google via SInricPro and the other core was designed to receive the IR signal from the remote controller and to send the commands to the AC. Searching for a solution, implementing tasks seemed to be a good approach. For this, two task were created, each one running on different a core. Each task had a specific function, in my case //​ListenToGoogle//​ and //​RemoteController//​. The core that was running //​ListenToGoogle//​ was working correctly, but the other task had an issue. Every time a command was sent to AC, the command was not received correctly and I could not identify why. But in my opinion the problem could be because the timers that were shared by the two cores. The solution was to move all the functionality to a single core.   * **Working with tasks:** In initial implementation,​ I tried to make use of both cores available on the ESP32 Microcontroller. The flow was designed to have one core that is always listening for commands sent by Google via SInricPro and the other core was designed to receive the IR signal from the remote controller and to send the commands to the AC. Searching for a solution, implementing tasks seemed to be a good approach. For this, two task were created, each one running on different a core. Each task had a specific function, in my case //​ListenToGoogle//​ and //​RemoteController//​. The core that was running //​ListenToGoogle//​ was working correctly, but the other task had an issue. Every time a command was sent to AC, the command was not received correctly and I could not identify why. But in my opinion the problem could be because the timers that were shared by the two cores. The solution was to move all the functionality to a single core.
Line 89: Line 109:
 ===== Demo =====  ===== Demo ===== 
  
 +[[https://​drive.google.com/​file/​d/​1P1UXjPX3kqVBHlYKMDNSrSa3bfyw2fs4/​view?​usp=share_link|Video File]]
 +
 +===== Conclusions ===== 
 +The development of this project was interesting. Because my air conditioner is not smart, now I can control it using Google Home app and for the hot summer days this will be useful. ​
 +
 +There are a lot of useful libraries developed that can be used in projects like these. The library that deals with the signal received and sent to the AC is up to date and has a wide coverage when it comes to air conditioner manufacturers. This project works for only one type of air conditioner but can be easily changed depending of the air conditioner type.
  
 ===== Resources ===== ===== Resources =====
Line 101: Line 127:
   * https://​www.instructables.com/​Arduino-Smart-Home-With-Alexa-Google-Assistant-Usi/​   * https://​www.instructables.com/​Arduino-Smart-Home-With-Alexa-Google-Assistant-Usi/​
   * https://​sinric.pro/​   * https://​sinric.pro/​
 +
 +
iothings/proiecte/2022/smart-remote.1674152465.txt.gz · Last modified: 2023/01/19 20:21 by cristina.iordache98
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0