[{"data":1,"prerenderedAt":426},["ShallowReactive",2],{"post-control-reolink-nvr-esp32-en":3,"related-posts-control-reolink-nvr-esp32-en":391,"related-categories-control-reolink-nvr-esp32-en":409,"blog-project-detail-card-gizmo-reolink-switch-en":418},{"id":4,"title":5,"author":6,"authorImageUrl":7,"authorUrl":8,"body":9,"categorySlug":51,"categoryText":31,"dateModified":360,"datePublished":360,"description":361,"extension":362,"faqs":363,"image":382,"language":383,"meta":384,"navigation":385,"path":386,"seo":387,"sitemap":388,"stem":389,"__hash__":390},"blog\u002Fblog\u002Fcontrol-reolink-nvr-esp32.md","How to Control a Reolink NVR from an ESP32","Bruma","\u002Fimages\u002Fauthors\u002Fbruma.jpg","https:\u002F\u002Fx.com\u002Fbrumaombra",{"type":10,"value":11,"toc":330},"minimark",[12,17,21,24,33,40,45,48,52,54,58,61,66,69,73,86,89,92,99,103,106,111,114,118,121,124,128,131,141,145,148,151,155,158,161,165,169,172,176,180,183,186,190,203,207,210,214,217,220,224,227,231,234,237,243,246,250,253,257,260,264,267,270,273,277,281,284,288,291,295,298,302,305,308,319,322,324],[13,14,16],"h2",{"id":15},"introduction","Introduction",[18,19,20],"p",{},"If you want to control a Reolink NVR from an ESP32, the technical part is not the real obstacle. The real challenge is designing the workflow so the device feels trustworthy in daily use.",[18,22,23],{},"Sending an HTTPS request from an ESP32 is straightforward. Building a small hardware controller that can mute notifications, pause recording, show state clearly, survive network hiccups, and restore the original NVR behavior automatically is where the project becomes useful.",[18,25,26,27,32],{},"That is exactly the pattern behind ",[28,29,31],"nuxt-link-locale",{"to":30},"\u002Fprojects\u002Fgizmo-reolink-switch","Gizmo Reolink Switch",": a dedicated one-button ESP32 controller for a very specific home-security problem. Instead of opening the Reolink app every time you leave home, the device handles a short quiet-exit flow locally.",[18,34,35,39],{},[36,37,38],"strong",{},"TL;DR:"," To control a Reolink NVR from an ESP32, you need a WiFi-connected ESP32, an authenticated HTTPS request flow, a clear local interface, and a safe restore strategy so the automation does not leave your NVR in the wrong state.",[41,42],"blog-list",{":items":43,"variant":44},"[\"The ESP32 can talk directly to a Reolink NVR over WiFi\",\"The real challenge is state management, not just sending a request\",\"A button, buzzer, and small LCD make the controller much more usable\",\"Automatic restore is what turns a prototype into a practical device\"]","checkmark",[46,47],"hr",{},[49,50],"project-detail-card",{"project-slug":51},"gizmo-reolink-switch",[46,53],{},[13,55,57],{"id":56},"what-you-are-actually-building","What You Are Actually Building",[18,59,60],{},"At a high level, this is not just an ESP32 making a web request. It is a small single-purpose appliance with four responsibilities:",[62,63],"blog-table",{":headers":64,":rows":65},"[\"Layer\",\"What it does\",\"Why it matters\"]","[[\"Input\",\"Reads a physical button or menu action\",\"The user needs a fast local trigger\"],[\"Feedback\",\"Shows status on an LCD and plays buzzer cues\",\"The device must communicate what it is doing without ambiguity\"],[\"Network control\",\"Authenticates with the Reolink NVR and sends state changes\",\"This is the actual integration layer\"],[\"Restore logic\",\"Returns the NVR to its previous state after the timer ends or is cancelled\",\"Without this, the device is not reliable enough for daily use\"]]",[18,67,68],{},"That last layer is the one most quick tutorials skip. They focus on proving that the ESP32 can hit an endpoint. The useful milestone is preserving the original state, changing it deliberately, and restoring it predictably.",[13,70,72],{"id":71},"why-an-esp32-is-a-good-fit","Why an ESP32 Is a Good Fit",[18,74,75,76,80,81,85],{},"The ",[28,77,79],{"to":78},"\u002Fblog\u002Fwhat-is-the-esp32","ESP32"," is a strong fit for this kind of hardware control because it gives you WiFi, enough processing headroom for TLS and JSON handling, and enough GPIO to build a comfortable local interface. For this job, you do not need a Linux board or a full application stack. If you want a refresher on that distinction, see ",[28,82,84],{"to":83},"\u002Fblog\u002Fwhat-is-a-microcontroller","What is a microcontroller?",".",[18,87,88],{},"An ESP32 also gives you freedom to make the controller feel physical and immediate:",[41,90],{":items":91,"variant":44},"[\"A button for short-press and long-press actions\",\"An I2C LCD for clear state and countdown screens\",\"A buzzer for confirmation and warning cues\",\"WiFi for direct NVR communication without a second gateway\"]",[18,93,94,95,85],{},"Could you build a similar device with an ESP8266? Possibly. But this is the kind of project where the ESP32's extra headroom and broader hardware flexibility are welcome, as covered in ",[28,96,98],{"to":97},"\u002Fblog\u002Fesp32-vs-esp8266","ESP32 vs ESP8266",[13,100,102],{"id":101},"the-core-control-flow","The Core Control Flow",[18,104,105],{},"The cleanest way to think about the project is as a reversible control loop.",[107,108,110],"h3",{"id":109},"step-1-trigger-a-local-action","Step 1: Trigger a local action",[18,112,113],{},"The user presses a physical button to choose a duration or start quiet mode. In the Gizmo Reolink Switch pattern, a short press cycles through durations and a long press confirms the action.",[107,115,117],{"id":116},"step-2-capture-the-current-nvr-state","Step 2: Capture the current NVR state",[18,119,120],{},"Before changing anything, the firmware should discover the current monitoring state and keep enough information to restore it later. This is the part that gets overlooked most often.",[18,122,123],{},"If you skip state capture and just blast a hardcoded \"mute\" request followed later by a hardcoded \"unmute\" request, you risk restoring the wrong behavior. A good controller treats the NVR like a stateful system, not a light switch.",[107,125,127],{"id":126},"step-3-authenticate-and-send-the-api-calls","Step 3: Authenticate and send the API calls",[18,129,130],{},"Once the user confirms the action, the ESP32 connects over WiFi and authenticates with the Reolink NVR. From there, the firmware can discover active channels and send the right requests to disable notifications and recording for the quiet-exit window.",[18,132,133,134,85],{},"This is where HTTPS handling matters. Espressif's HTTP client for ESP-IDF supports authenticated HTTP and HTTPS request flows, connection reuse, response handling, and configurable timeouts. See the official ESP HTTP client docs for the underlying request model: ",[135,136,140],"a",{"href":137,"rel":138},"https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesp-idf\u002Fen\u002Fstable\u002Fesp32\u002Fapi-reference\u002Fprotocols\u002Fesp_http_client.html",[139],"nofollow","ESP HTTP Client",[107,142,144],{"id":143},"step-4-maintain-clear-user-feedback","Step 4: Maintain clear user feedback",[18,146,147],{},"While quiet mode is running, the device needs to keep the user informed locally. An LCD is ideal for this because it can show a countdown, current mode, restore state, and basic errors without needing a phone or browser.",[18,149,150],{},"A buzzer helps because it removes the need to stare at the display constantly. A short confirmation beep, a warning near the end, and a completion tone are enough.",[107,152,154],{"id":153},"step-5-restore-the-original-state","Step 5: Restore the original state",[18,156,157],{},"When the timer ends or the user cancels it, the firmware reapplies the saved monitoring state. This is the real finish line of the workflow.",[18,159,160],{},"If the device fails here, the automation becomes risky. That is why the restore path deserves as much attention as the initial mute path.",[41,162],{":items":163,"variant":164},"[\"Trigger the action from a physical control\",\"Read and preserve the current NVR state\",\"Send authenticated API requests to apply the temporary change\",\"Keep the user informed through local feedback\",\"Restore the original state automatically\"]","numbered",[13,166,168],{"id":167},"hardware-you-actually-need","Hardware You Actually Need",[18,170,171],{},"You do not need much hardware to prove the concept, but you do need enough local feedback to make the device pleasant to use.",[62,173],{":headers":174,":rows":175},"[\"Part\",\"Purpose\",\"Recommended?\",\"Notes\"]","[[\"ESP32 development board\",\"Runs the firmware and WiFi stack\",\"Required\",\"USB-C boards are easier to live with\"],[\"Reolink NVR on the same network\",\"Target device for control\",\"Required\",\"Stable local reachability matters more than internet access\"],[\"Push button\",\"Starts and confirms actions\",\"Required\",\"One button is enough for a compact workflow\"],[\"16x2 I2C LCD\",\"Displays countdown and status\",\"Strongly recommended\",\"Much clearer than relying on serial logs\"],[\"Buzzer\",\"Provides immediate audible feedback\",\"Strongly recommended\",\"Useful for confirmation, warning, and completion\"]]",[13,177,179],{"id":178},"firmware-architecture-that-keeps-the-project-manageable","Firmware Architecture That Keeps the Project Manageable",[18,181,182],{},"One of the easiest mistakes in embedded projects like this is stuffing everything into one file. A controller that handles inputs, timer rules, LCD output, WiFi, and API calls will turn messy fast if the firmware is not separated into focused modules.",[18,184,185],{},"A cleaner layout looks like this:",[41,187],{":items":188,"variant":189},"[\"Button module for short-press, long-press, and debounce logic\",\"Menu or timer module for duration selection and countdown state\",\"Display module for LCD screens and message formatting\",\"Buzzer module for tones and timing patterns\",\"WiFi module for connection and retry management\",\"Reolink module for authentication, channel discovery, mute, and restore\"]","circle",[18,191,192,193,197,198,85],{},"That modular split is one reason PlatformIO is such a good fit here. Once a project has multiple source files, secrets, and libraries, a structured workflow helps a lot more than a single-sketch setup. If you want the broader comparison, see ",[28,194,196],{"to":195},"\u002Fblog\u002Farduino-ide-vs-platformio-for-esp32","Arduino IDE vs PlatformIO for ESP32",". For the actual CLI and project workflow, the PlatformIO documentation is the canonical reference: ",[135,199,202],{"href":200,"rel":201},"https:\u002F\u002Fdocs.platformio.org\u002Fen\u002Flatest\u002Fcore\u002Fuserguide\u002Findex.html",[139],"PlatformIO Core CLI Guide",[13,204,206],{"id":205},"the-reolink-side-what-the-esp32-has-to-do","The Reolink Side: What the ESP32 Has to Do",[18,208,209],{},"From the ESP32's perspective, controlling a Reolink NVR is a network integration problem with three concerns.",[107,211,213],{"id":212},"authentication","Authentication",[18,215,216],{},"The firmware needs credentials and a repeatable login flow. In practice, this means storing the NVR host, username, and password in a local config layer rather than hardcoding them directly in the application logic.",[18,218,219],{},"For a PlatformIO-based workflow, a separate secrets file is a sensible approach because it keeps credentials out of the main source tree while still letting the firmware compile with build-time configuration.",[107,221,223],{"id":222},"channel-discovery","Channel discovery",[18,225,226],{},"A better controller should detect which channels are active and apply the state change only where appropriate.",[107,228,230],{"id":229},"reversible-updates","Reversible updates",[18,232,233],{},"This is the important part: the firmware should record what it changed so it can undo only those changes later. That is safer than applying a naive global restore.",[18,235,236],{},"Here is the original framework worth keeping in mind for this class of project:",[238,239,240],"blockquote",{},[18,241,242],{},"The best ESP32-to-NVR controller is not the one that can disable recording fastest. It is the one that can explain its current state clearly and restore the exact previous state without surprises.",[18,244,245],{},"That is the standard to design against.",[13,247,249],{"id":248},"common-failure-modes-and-how-to-design-around-them","Common Failure Modes and How to Design Around Them",[18,251,252],{},"A lot of practical value in this project comes from handling failure modes before they happen.",[62,254],{":headers":255,":rows":256},"[\"Failure mode\",\"What goes wrong\",\"Better design choice\"]","[[\"WiFi is unavailable\",\"Mute action starts but the NVR never changes state\",\"Block the action early and show a clear local error\"],[\"Credentials are wrong\",\"Authentication fails and the device feels broken\",\"Validate configuration and keep serial logs available for troubleshooting\"],[\"State is not captured first\",\"Restore action puts the NVR in the wrong mode\",\"Always read current state before writing a new one\"],[\"The timer ends during a network issue\",\"Restore does not happen on time\",\"Retry restore and keep the user informed on the display\"],[\"The UI is too vague\",\"User does not trust what the device just did\",\"Use explicit LCD messages and audible cues for every key transition\"]]",[18,258,259],{},"This is also why a plain browser dashboard is not always the best answer. A web UI is useful for configuration, but a physical controller is better for immediate, repeated actions.",[13,261,263],{"id":262},"a-practical-build-plan","A Practical Build Plan",[18,265,266],{},"If you want to build your own version, do it in stages.",[41,268],{":items":269,"variant":164},"[\"Start with WiFi connection and basic serial logs\",\"Add a button and verify short-press and long-press behavior\",\"Implement login to the Reolink NVR and verify a simple authenticated request\",\"Add state readback before any mute action\",\"Apply the temporary mute or recording change\",\"Add restore logic and test cancellation as well as timer completion\",\"Only then add the LCD and buzzer polish layer\"]",[18,271,272],{},"That order matters. Most embedded integration bugs live in setup, network, and state assumptions.",[13,274,276],{"id":275},"security-and-reliability-notes","Security and Reliability Notes",[107,278,280],{"id":279},"use-https-when-possible","Use HTTPS when possible",[18,282,283],{},"If the NVR supports secure communication, use it. The ESP32 is capable of HTTPS, but you need to think about certificate handling, timeouts, and memory usage. Espressif's documentation is worth reading here because the HTTP client details affect real-world reliability, especially around authentication and TLS behavior.",[107,285,287],{"id":286},"keep-secrets-out-of-the-main-source","Keep secrets out of the main source",[18,289,290],{},"A local secrets file is a cleaner default than scattering credentials across source files. It is easier to reason about, easier to document, and much safer if the repository is public.",[107,292,294],{"id":293},"treat-restore-as-a-first-class-feature","Treat restore as a first-class feature",[18,296,297],{},"A lot of hobby automation writes the \"turn off\" path first and hopes the recovery path will be easy later. That is backwards.",[13,299,301],{"id":300},"final-thoughts","Final Thoughts",[18,303,304],{},"Controlling a Reolink NVR from an ESP32 is doable. The part that deserves real engineering attention is the workflow around the network call: capturing state, changing it deliberately, communicating it clearly, and restoring it safely.",[18,306,307],{},"The most useful version of this project is not \"ESP32 sends API request.\" It is \"ESP32 becomes a dependable physical controller for a repetitive home-security action.\"",[18,309,310,311,313,314,318],{},"If you want to see that pattern applied in a real build, start with ",[28,312,31],{"to":30},". Then browse the broader ",[28,315,317],{"to":316},"\u002Fprojects","OpenGizmo projects"," for more examples of small ESP32 devices built around practical workflows.",[18,320,321],{},"Controlling a Reolink NVR from an ESP32 is absolutely doable, and the hardware side is simpler than many people expect. The part that deserves real engineering attention is the workflow around the network call: capturing state, changing it deliberately, communicating it clearly, and restoring it safely.",[18,323,307],{},[18,325,310,326,313,328,318],{},[28,327,31],{"to":30},[28,329,317],{"to":316},{"title":331,"searchDepth":332,"depth":332,"links":333},"",2,[334,335,336,337,345,346,347,352,353,354,359],{"id":15,"depth":332,"text":16},{"id":56,"depth":332,"text":57},{"id":71,"depth":332,"text":72},{"id":101,"depth":332,"text":102,"children":338},[339,341,342,343,344],{"id":109,"depth":340,"text":110},3,{"id":116,"depth":340,"text":117},{"id":126,"depth":340,"text":127},{"id":143,"depth":340,"text":144},{"id":153,"depth":340,"text":154},{"id":167,"depth":332,"text":168},{"id":178,"depth":332,"text":179},{"id":205,"depth":332,"text":206,"children":348},[349,350,351],{"id":212,"depth":340,"text":213},{"id":222,"depth":340,"text":223},{"id":229,"depth":340,"text":230},{"id":248,"depth":332,"text":249},{"id":262,"depth":332,"text":263},{"id":275,"depth":332,"text":276,"children":355},[356,357,358],{"id":279,"depth":340,"text":280},{"id":286,"depth":340,"text":287},{"id":293,"depth":340,"text":294},{"id":300,"depth":332,"text":301},"2026-06-27T00:00:00Z","Learn how to control a Reolink NVR from an ESP32 using WiFi, HTTPS requests, a simple local interface, and a safe state-restore workflow.","md",[364,367,370,373,376,379],{"question":365,"answer":366},"Can an ESP32 control a Reolink NVR?","Yes. An ESP32 can control a Reolink NVR over WiFi by sending authenticated HTTPS API requests to change notification and recording settings, then restore them later.",{"question":368,"answer":369},"Do you need Home Assistant to control a Reolink NVR from an ESP32?","No. Home Assistant can be useful, but it is not required. A standalone ESP32 can talk directly to the Reolink NVR if you handle login, request flow, and state restoration in firmware.",{"question":371,"answer":372},"What is the hardest part of controlling a Reolink NVR from an ESP32?","The hardest part is not the button or display. It is managing authentication, network reliability, and restoring the original NVR state safely when the timer ends or is cancelled.",{"question":374,"answer":375},"Should an ESP32 use HTTP or HTTPS for a Reolink NVR?","HTTPS is the safer default because you are sending credentials and state-changing commands across the network. On ESP32, this means handling TLS and request reliability carefully.",{"question":377,"answer":378},"What hardware do you need for a Reolink NVR ESP32 controller?","At minimum, you need an ESP32, a WiFi connection to the same network as the NVR, and some local interface such as a button. An LCD and buzzer make the device much easier to use.",{"question":380,"answer":381},"Why use a physical ESP32 switch instead of just opening the Reolink app?","A physical switch is faster and more predictable for repetitive tasks like leaving home. One button press can trigger a timed mute flow without opening an app or navigating menus.","\u002Fimages\u002Fblog\u002Fcontrol-reolink-nvr-esp32.png","en",{},true,"\u002Fblog\u002Fcontrol-reolink-nvr-esp32",{"title":5,"description":361},{"loc":386},"blog\u002Fcontrol-reolink-nvr-esp32","Y5pJRg8s3_Y5cQTx3f7ZPwGNAliKbGoHokA4coE8tiI",[392,397,401,404],{"title":393,"description":394,"image":395,"categoryText":396,"path":83},"What is a Microcontroller?","A microcontroller is a compact chip that combines a CPU, memory, and programmable I\u002FO pins in one package, designed to run firmware and control hardware directly.","\u002Fimages\u002Fblog\u002Fwhat-is-a-microcontroller.png","Guides",{"title":398,"description":399,"image":400,"categoryText":396,"path":78},"What is the ESP32?","The ESP32 is a low-cost microcontroller from Espressif that combines WiFi, Bluetooth, GPIO, and enough processing power to build practical connected devices.","\u002Fimages\u002Fblog\u002Fwhat-is-the-esp32.png",{"title":196,"description":402,"image":403,"categoryText":396,"path":195},"Arduino IDE is still a valid starting point for beginners, but PlatformIO is usually the better and more modern choice for ESP32 projects because it scales better, organizes code more cleanly, and fits real project workflows more naturally.","\u002Fimages\u002Fblog\u002Farduino-ide-vs-platformio-for-esp32.png",{"title":405,"description":406,"image":407,"categoryText":396,"path":408},"What is OpenGizmo?","OpenGizmo is an ESP32-focused site for practical open-source gadgets, build pages, and maker notes that explain how the devices actually work.","\u002Fimages\u002Fblog\u002Fwhat-is-open-gizmo.png","\u002Fblog\u002Fwhat-is-opengizmo",[410,413],{"name":396,"slug":411,"count":412,"image":403},"guides",5,{"name":414,"slug":415,"count":416,"image":417},"Gizmo Ticker","gizmo-ticker",1,"\u002Fimages\u002Fblog\u002Fhow-to-build-a-crypto-ticker-with-esp32-and-max7219.png",{"title":31,"badge":419,"description":420,"path":30,"cardIcon":421,"highlights":422},"Open-source ESP32 + Reolink project","An ESP32-powered quiet-exit switch that uses a button, buzzer, 16x2 I2C LCD, and WiFi connection to temporarily mute Reolink NVR notifications and recording.","CctvCameraIcon",[423,424,425],"Quiet-exit timer","16x2 LCD interface","Direct Reolink API control",1783247625277]