I really wanted to use puppeteer (controls pages on a laptop) in my project and I was looking at my infrared remote, so I decided to combine them together and use the infrared remote to control netflix
What it does
You click buttons on the remote that are signaled to the Arduino and then the cloud and then back to my laptop. Based on what was signaled, different functions are allowed when you control Netflix. The laptop is able to open Netflix, login (credentials need to be coded in), and a movie can be played.
How I built it
- IR remote button signals are received by the IR receiver
- IR receiver sends the button code to the Arduino UNO
- Arduino UNO uses serial communication (with TX and RX pins) to send button code to MKR1010
- MKR1010 communicates the button codes to AWS IOT-Core using certificates for secure communication
- AWS IOT triggers a lambda function and sends the button codes there
- AWS Lambda creates a new row on the DynamoDB table with the key attribute as the time and the other attribute as the button code
- AWS Appsync is subscribed to changes on the DynamoDB table
- Whenever Appysync notices a change, it informs the React.js (client-side) of my project. This was built using AWS Amplify too.
- Client sends the button code to the Node.js side using an API that the Node.js (back end) created
- Depending on the button code, puppeteer will open Netflix on the chromium browser, log in, click the profile, or click a movie to play. More functions could be added easily since there are so many buttons on the remote.
Challenges I ran into
I couldn't find any infrared libraries that were compatible with my infrared remote and the MKR1010, so I was forced to use the Arduino UNO to receive signals and then communicate the data to the Arduino MKR1010. It was my first time using infrared and serial communication, so that took like 5 hours to figure out.
Also, it was my first time using AWS IOT and using communication between AWS Lambda, IOT, and and DynamoDB. That also took a long time to figure out, but I was eventually able to do it!
Accomplishments that I'm proud of
I finally figured out how to use AWS IOT, so I look forward to using it in more project to merge my hardware and software knowledge :).
What I learned
I learned how to use infrared, serial communication, AWS IOT, and communication between multiple AWS services.
What's next for remote-netflix
Maybe add more functionality to the remote?