Home > Projects > LCD Projects > Laziness Monitor

Laziness Monitor

Summary of Laziness Monitor


This project builds an affordable "Laziness Monitor" using an Adafruit Circuit Playground Express to track TV watching time. It sends light, sound, and phone notifications after set intervals and can eventually mute or turn off the TV via IR signals. The system integrates Blynk for webhooks, Integromat for logic triggers, and a custom Arduino code uploaded to the board, allowing users to customize time thresholds and notification styles easily.

Parts used in the Laziness Monitor:

  • Adafruit Circuit Playground Express
  • TV (Samsung TV used)
  • Blynk App
  • Integromat App
  • Arduino IDE

Build an affordable monitoring setup!
This project will help you easily get indications on how much time your are sitting in the couch watching TV.

This project will have time intervals in which you will get light indications from the board after X time has passed, sound indications, phone notifications and eventually when time has arrived it will mute your TV and turn it OFF.
I will show you how to setup the basic scenarios I think are useful and from there feel free to play around with the stages and time intervals as everything is easily configurable to your needs.

Supplies

Step 1: General Flow Overview

First, we will understand how the flow of this project will work. We will need to:

  1. Create a Webhook in BLYNK app in order to trigger HTTP Requests to Integromat.
  2. Create button trigger in Integromat app.
  3. Create the scenarios in Integromat which will handle the custom webhook and trigger the HTTP requests to our CPX board.
  4. Configure the code to our needs (if necessary).

Step 2: Create Webhook in BLYNK App

We will need to download the app from Google\App store.
Once downloaded we create a new project. In the project settings we will send the AUTH TOKEN to our mail (we will need it in the futher). Next step, we will add the Webhook in our project. We will see the window popup as shown above. In the webhook settings, there is a URL field where we will write the URL we would like to be triggered.
There is an option to send additional values in the URL, it is done as follow:
`https:// hook.integromat.com/XXXXXXXXXXXXXXXXXXXXX…myParam=/ pin/`

Step 3: Create Button Trigger in Integromat App

Next, we will create a button trigger in Integromat App.

The button will trigger the board to move to Stage1 (regardless the current State). This will basically add more time to watch TV:)
Download the Integromat app, and in the Buttons section click on the ‘+’. We will give the button a name and an ID that latter on we will use the same ID in the Integromat scenario to trigger the function.
Once finished click done.

Step 4: Create Scenarios in Integromat

Now we will create the scenarios in Integromat in order to handle the custom Webhook from the board, button trigger and HTTP requests to the board.

  1. Create an account in Integromat
  2. Go to ‘Create a new scenario’
  3. Add the service you would like and configure.


For example for the HTTP request to the board from the button we created we will add the services: ‘HTTP Request’ and ‘Apple IOS – Watch Button’. Then we will need to configure the services as in the pictures.

In the Apple IOS service, we will choose our device that we added and give the button id from the previous step.
In the HTTP Request service, we will provide the URL we would like to use:
http://SERVER-IP/AUTHENTICAN-TOKEN/update/V3(PIN WE WRITE)?
The authentication code is the one we got from the previous steps, and we can send additional values to the board if we wish to.

Step 5: Configure and Upload the Code

Last step will be to adjust the code provided here: https://pastebin.com/MrPFbWji.
Adjustments needed:

  1. auth – Insert you Authentication code from previous steps
  2. ssid – Insert your Wifi’s network name
  3. pass – Insert your Wifi’s password
  4. TV NECx protocol for IR – If you have a Samsung TV then it is alraedy set up. If not, you will need to find the right protocal commands for your TV brand and paste them there.

Optional:

  1. oneMinuteInterval – Currently configured to 60000 which is 1 minute in miliseconds
  2. ledPin – Currently 13 which is one of the leds on the board.
  3. You could play with the rest of the configuration (tones, colors, music, etc…).

Finally upload the code via Arduino and enjoy :)!!!

Source: Laziness Monitor

Quick Solutions to Questions related to Laziness Monitor:

  • How do I trigger HTTP requests to the CPX board?
    Create a Webhook in the Blynk app and a button trigger in the Integromat app to handle the flow.
  • Can I customize the time intervals for notifications?
    Yes, you can adjust settings like oneMinuteInterval in the code to change how often indications occur.
  • Does this project work with non-Samsung TVs?
    Yes, but you must find the correct NECx protocol commands for your specific TV brand and paste them into the code.
  • What is the best way to send phone notifications?
    The setup uses the Apple IOS service within Integromat linked to your device to send notifications.
  • How do I configure the authentication code?
    Send the AUTH TOKEN from the Blynk project settings to your email and insert it into the auth section of the code.
  • What happens when the time interval arrives?
    The system provides light and sound indications and can eventually mute your TV and turn it OFF.
  • Can I change the LED pin used for indicators?
    Yes, you can modify the ledPin variable in the configuration to use different LEDs on the board.
  • Where can I find the code for this project?
    The code is available at the provided Pastebin link and requires adjustments for your network and TV.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top