We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
Salim Benbouziyane · 395.8K views · 17.3K likes
Analysis Summary
Worth Noting
Positive elements
- This video provides genuine technical value by documenting a complex ESP32 project, including specific workarounds for iOS Bluetooth limitations and custom silicone molding.
Influence Dimensions
How are these scored?About this analysis
Knowing about these techniques makes them visible, not powerless. The ones that work best on you are the ones that match beliefs you already hold.
This analysis is a tool for your own thinking — what you do with it is up to you.
Transcript
sponsored by brilliant more on them later do you ever go to work on something only to find yourself hours later scrolling or watching random research videos well that's what happens a lot of the times I try to work on my project something always throws me off track even when I remember to said do not disturb on my phone I still managed to distract myself I needed to find a solution and that's when I stumbled on time shei a Pomodoro based Gadget that promises to block digital distractions and help you focus it sounded like exactly what I needed to try but unfortunately despite a successful crowdfunding campaign the startup folded leaving many disappointed backers empty-handed so I thought like this commentary how hard could it be to make something like this myself and that's what I exactly did and you can too stick around and I'll show you how I made what I call the focus dial let's dive [Music] in first things first let's define design goals and few constraints I like the form factor of the time sheet device so I'm keeping the LD indicator the screen in the midd and the glass face but there is something that drives me nuts it's a round device with the timer in the middle yet you can't turn it to interact with the features apparently you'll have to use the companion app as far as I understand that's no for me so for my version I'll definitely include additional input like an encoder along with the main button next I want this device to seamlessly set a focus mode on my phone supressing all notifications at the start and reverting back when the timer ends I will even take it further and during those sessions I want to block distracting websites and apps at a network level for all my devices maybe this seems like Overkill but knowing how easily I get sidetracked I'd rather go all in for 2 hours than get little to nothing done to help me get in the zone faster and build a habit out of this I'm thinking of creating a consistent lighting scene in my home automation that triggers each time I push start lastly I want to build this out of easy to find off-the-shelf modules no custom pcbs no fancy parts this is enough of a side quest as it is and I don't want to complicate it further so with all that in mind we can get started on the Prototype I put together this breadboard using an esp32 from Ada fruit paired with this led ring a simple olid module and an encoder with a switch for input the goal here is to validate my ideas and get at least 80% of the features working before moving forward let's get started with an easy one to get the bow rolling as I mentioned before I wanted to create a repeatable home automation scene and set up some lights as indicators for people around me so they know I'm trying to get work done to achieve this I'm using a simple web hook automation that ESP will trigger in home assistant to indicate the start and end of each timer I added a notification and tied it to the button press on the encoder to test [Music] it next up was blocking distracting apps and websit at a network level I'll show you how I'm doing this for myself but please keep in mind that you'll need to adapt this to your own setup I thought that it would be a good idea to have home assistant control is from the same automation endpoint so if you don't want or can't configure figure this in a firewall you could use something like py hole or adg guard to do a DNS block instead in my case I'm using a udm pro and I recently discovered the new UniFi traffic rules that let you set policies and restrictions for specific apps or groups without having to manually enter them for each thing like I used to do before but I needed a way for home assistant to control this and at the time this wasn't possible through the regular UniFi integration so I decided to use the simple bash script to do this and have home assistant control it I found someone on GitHub who had solved a similar problem though their script controlled classic firewall rules not the new traffic ones after beginning to the UniFi API documentation and examining some Network queries I found the right end points and modifi the script to loging into the console retrieve all the rules and enable or disable the specific one then I added this to the Automation and tested [Music] it later while working on this video I updated home assistant and noticed that the UniFi integration had added this functionality so you have a simple switch entity to toggle the traffic rules on and off and I totally didn't waste 3 hours on that script for no reason at all this brings us to the third important feature setting up Focus mode on the phone seamlessly I'll be doing this for an iPhone but the process should be somewhat similar or even easier on Android using apps like Tasker what we need to accomplish is once I hit the button on the device the phone should activate a special the Not Disturb mode and once the timer is up it should rever it back in iOS this can be done through something called shortcuts I created a focus mode to suppress all notification and added this to two series shortcuts that toggle this mode dim the display and change the home screen layout now we just need an effective way to trigger these shortcuts on the phone for each session from home assistant we can trigger a series shortcuts on the iPhone using push notifications according to the documentation but while this is easy to implement it has a major flaw it requires you to tap the notification to continue before the shortcut runs I know this might not seem like a big deal but for me if I have to push the button on the device and remember to tap the notification on the phone I might as well just do it manually this eventually will be enough to deter me from using this all together I went back to look for a solution and here where things will get bit junky let me explain basically the only way to run a personal automation without confirmation iOS is to use certain system triggers but none of these made sense for my application except maybe Bluetooth I set this up using my airpods as a test and it worked when the device connects the shortcut runs activates the focus mode dims the display and so on when it disconnects it revers back using the second shortcut now I just need to replicate this with the es except it did not work at all I tried emulating various devices like keyboard mouse media controllers but none of them appeared in that list even though they showed up and were recognized in the Bluetooth pairing I almost abandoned this idea then I realized all the devices in the list are audio Sy like speakers and headphones that's why it worked with my airpods but not with the ESP Apple why this makes no sense but at least now I knew the reason so to fake an audio sync I use this library that makes it super easy to set up Bluetooth audio but I had a different problem I started this prototype using the S3 or C3 which like most of the ESB lineup supports only modern BL standard not the Bluetooth classic that we need for audio streaming luckily adaf fruit also makes the ESP peod that supports Bluetooth classic in the same form factor I swapped them out and now we have a fake AIO sync that spins entire Bluetooth stack to only connect and disconnect from the phone this triggers the personal automation without any extra intervention and that's what I mean by the Jank but hey it [Music] works now that we have all the main features working I put together a display control to manage and update all the uis we need for different states I used this cool tool I found recently called lupaca to help me design the graphics I'll link it down below I also created another controller for the LED indicator to hinder all the animations and reuse them I may go into more details later but for now the Prototype is Advanced enough to move on to the mechanical design since I'm using off-the-shelf Parts I need to account for all the limitations they bring so I started by arranging the components in a configuration that made sense and tried to replicate some of the elements from the time sheet product right away we can notice a problem the olid module is partially covering the LEDs to fix this I'll need to modify it a bit by literally cutting Corners since the top part will make the face of the product I need a durable transparent material for the surface this is where you'll press to start and should be able to see through the interface like the original device I went on Amazon and found these Beaker covers made out of glass about 50 mm in diameter and they are very close to the dimension of the ledd Ring perfect I added this to the mockup assembly along with the ESP and now the only thing missing is the input components so like the Prototype we need an encoder in a switch the problem is I can mount the top face assembly on the encoder since it's the moving part and if I flip it to fix that I run into other issues with es and the height of the entire thing what I need is to be able to rotate only a ring around the device while still be able to run wires through it so I went on theik Kei and found a Hol shating coder ring that's the closest match to our outer Dimension around 56 mm for the Switch I'll be using a simple push button mounted upside down with all the modules arranged I started modeling the enclosure around them as tightly packed as possible and here is what I came up with the face piece holds the display in the center and these buffles are meant to separate the L these to avoid any light spill and create Ridge to hold the lens I later put a diffuser in this channel to have a smoother light ring next we have this Holo stem that will be the rotational axis for the encoder and will also have wires running through it to connect everything to the microcontroller after that I added a little platform that center for the button and three Springs to support the assembly and provide a stiffer click I did a few fdm prints to test a few things especially the top shell that threads on the face of the [Music] device after adjusting few tances and iterating a couple of times I felt it was dialed enough so I send the design over to the resin printer [Music] after curing the parts I sended off the support marks and went over the visible surfaces with a th000 grit sandpaper to prep them for the clear [Music] coat the parts turned out great one thing I also printed is this mold for the diffuser while I could have simply printed it or used the popular material for light diffusion like evf or even parment baking paper I thought I'll try making a custom one using two parts silicone for molds the silicone I have is already this translucent milky color which is a great start but since the diffuser can't be too thick I need something else to refract the light more to do that I added a bit of titanium dioxide very popular in cheap white [Music] pigments I think this third one looks the best so far it looks almost like a real factory diffuser another thing I wanted to address before assembly is the Glass Lens this is purely aesthetic but I want it to hide the edges of the OLED module and the LED diffuser when it's not on I want the lens to be completely black and only let the light shine through to achieve that I'll use the same stuff they use to Ting car windows you can get this in film form pretty cheap or even a spray can I cleaned the inside surface and applied it being careful with the bubbles you can also use a bit of heat around the edges to help it come form [Music] it's time to put everything together starting with the screen I desoldered the pins that came with it and trimmed the corners to make it fit in the face piece next I soldered some very thin gauge wire to the four pads and added the back support with a bit of black tape this helps keep it in place and prevent the light bleed from behind the screen then I placed the LED ring seated it properly and soldered wires to it as well to finish this part of the face assembly I added the central stem threaded The Wire through the mdle and secured it to the face with some self tapping screws now let's deal with the encoder ring there are some ground leads to trim and three main pins to bend before soldering more wires I isolated them using some heat shrink tubing and once that's done it snaps into the bottom of closure cap with the wires sticking out from this opening I then installed the central ring the bearings and previously assembled face few screws later and we have the entire top assembly ready for the next step after placing the bottom on the tiny platform and wrestling the rest of the wires into place I was ready to close off this [Music] section this prevents the switch from moving and keeps the wires from interfering with the rest of the assembly to close the bottom I added three compression springs and sealed it with the bottom piece all what left now is to add the lens and screw on the face rim and here are the Final Shots [Music] [Music] a [Music] [Music] now that you've seen what it looks like I want to walk you through how it works and how the code is set up but before we do that I want to address a question that I get all the time on this channel how do I get started building skills for project like these for me the best way to learn is through Discovery and figuring things out as they encounter them as for resources I'd recommend that's where today's sponsor brilliant comes in brilliant is a platform where you learn by doing offering thousands of interactive lessons and math data analysis programming and AI you can build valuable Knowledge from the ground up in just few minutes a day their interactive problems let you experiment with Concepts making what you learn stick far better than passively absorbing information what I appreciate about brilliant is their bite-sized lessons help build in lasting habits just like what I'm trying to do with the focus style lately whenever I had few spare minutes I've been trying to solidify some foundational math concepts that I didn't fully grasp before seeing these Concepts come to life through interactive lessons make learning both enjoyable and even more effective in my opinion if you're interested in learning new things and building your skills Arch checken out brilliant to try everything they have to offer free for full 30 days visit brilliant.org Salim or scan the QR code on screen I will also leave a link for you in the description to get 20% off of the premium annual subscription thanks to brilliant for making this video possible now let's get back to the project after the splash screen the device checks for previe settings if non found it transition to the provision State here the ESP serves the page in AP mode so so you can give it to Wi-Fi the web hook URL and pair it to Bluetooth if you want to use the junky trigger once provisioning is complete we transition back to the idle State indicated by the slow breathing animation to adjust the session duration you can use the encoder ring and save your setting by pressing once on the main button after a few minutes of inactivity the device enters the Sleep state where it turns off the LED and screen and any input waks it back up to idle where you can start a session by pressing once on the main button when the timer starts the network controller initiate both the web hook and Bluetooth tasks at the same time and start the countdown using this decaying animation to represent the remainder of the duration you can pause the timer by pressing once or cancel it all together by pressing twice holding down the main button for a few seconds prints out the reset state that allows you to erase everything and Trigger provisioning again I've tried to keep the project organized and mod derer for easy customization but I'm sure there are many ways to improve it I won't go in all the details here but you can check out the code in the link below along with the files and build instructions as usual to wrap up here are a few mistakes and things to improve for next time first I underestimated the space needed for wiring and this made the assembly somewhat challenging again I said this exact same thing last time but some of these parts are very thin and this can lead to potential print issues and blemishes on the surface in the pursuit of replicating some of the features from the commercial product I made the assembly more complicated than it should if you prefer something simpler you can use a regular encoder with the exact same prototype we did earlier and just make a basic enclosure for it despite all these challenges it was a very valuable learning experience I had a lot of fun making this if you're interested in a well-designed smart project check out this one by Scott it uses a brushless gimbal motor and let you dynamically program the detent and haptic feedback very cool that's it for this one thanks again to brilliant for sponsoring the video and as always thank you for watching I will see you in the next one [Music]
Video description
Head to https://brilliant.org/Salim To Try Brilliant Free for 30 days and Get 20% off an annual premium subscription. I got tired of constant distractions, So I built the Focus Dial—a DIY take on the failed TimeChi crowdfunding project. It helps me work in time blocks by activating a Do Not Disturb mode on my phone and integrates with Home Assistant via webhook triggers to set lighting scenes and block distracting apps at the network level during focus sessions. Join me as I take you through the entire process, from design to assembly, sharing what I learned along the way. 👋 Follow me: https://linktr.ee/salimbenbouz ⚡️ Project links: Github: https://github.com/sb-ocr/focus-dial Instructables: https://www.instructables.com/Focus-Dial-a-Digital-Distraction-Blocker 🔗 Projects mentioned Graphics for Embedded : https://lopaka.app @scottbez1 SmartKnob Project: https://www.youtube.com/watch?v=ip641WmY4pA _______________________ ⚙️ Bambu Lab 3D Printers: Bambu Lab A1 https://bit.ly/4gwNFhK Bambu Lab P1S-Combo https://bit.ly/3VW4QBg Bambu Lab X1-Carbon https://bit.ly/3VTKfxx Bambu Filaments https://bit.ly/41RpVRe 🖥️ Desk gear: Grovemade Premium Desk Accessories 🍃 Get 10% off using code SALIM10 → https://bit.ly/grovemade-accessories 🛠 Tools: Autodesk Fusion 360: https://bit.ly/49dQyQN Soldering station: https://geni.us/16zcw5 iFixit Driver Kit: https://geni.us/pE8dvKd Magnetic Helping Hand: https://geni.us/qmbA3W Digital Microscope: https://geni.us/OvfXE Oscilloscope: https://geni.us/rHzAS8 🎬Video gear: Sigma 18-35mm f/1.8 DC Art Lens: https://geni.us/43RyE 90cm Octagonal Softbox: https://geni.us/tXzLg2U Motorized Camera Slider: https://geni.us/CKpHVYp Aputure Amaran 100D Light: https://geni.us/DitmF6 Aputure Amaran PT1C Tube Light: https://geni.us/zcYT Heavy Duty Light Stand with Casters: https://geni.us/W3aZy4Z RØDE VideoMic GO II Microphone: https://geni.us/3gEQb4 RØDE Wireless GO II Microphones: https://geni.us/HTWPS 🎧 Music: Epidemic Sound https://share.epidemicsound.com/cp32b6 _______________________ 00:00 Intro 00:50 Design Goals and Features 02:00 Prototype 07:05 Mechanical Design 08:55 Fabrication 11:30 Assembly 14:20 Sponsor 15:20 Usage 16:30 Mistakes and Possible Improvements 17:08 Outro Affiliate links may be included in this page. I may receive a small commission at no additional cost to you. #diy #focus #3dprinting #pomodoro