<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sakib Mahmud</title>
    <description>The latest articles on DEV Community by Sakib Mahmud (@sigmakib2).</description>
    <link>https://dev.to/sigmakib2</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F610625%2Ffbeb34b1-9a62-46fb-b5d4-eb747c94d637.jpeg</url>
      <title>DEV Community: Sakib Mahmud</title>
      <link>https://dev.to/sigmakib2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sigmakib2"/>
    <language>en</language>
    <item>
      <title>HonoSphere - A Temperature and Humidity Monitoring IoT Project Using ESP32 and Cloudflare Workers</title>
      <dc:creator>Sakib Mahmud</dc:creator>
      <pubDate>Sun, 16 Mar 2025 08:30:53 +0000</pubDate>
      <link>https://dev.to/sigmakib2/honosphere-a-temperature-and-humidity-monitoring-iot-project-using-esp32-and-cloudflare-workers-2ckk</link>
      <guid>https://dev.to/sigmakib2/honosphere-a-temperature-and-humidity-monitoring-iot-project-using-esp32-and-cloudflare-workers-2ckk</guid>
      <description>&lt;p&gt;Hey everyone! Today, I’m thrilled to introduce &lt;strong&gt;HonoSphere&lt;/strong&gt; – an IoT project that combines an ESP32 microcontroller, environmental sensors, and the magic of Cloudflare Workers to deliver real-time environmental monitoring. In this post, I'll dive into how Cloudflare Workers make HonoSphere free and cost-effective, and why this project is perfect for beginners looking to explore the world of IoT.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For the complete source code and more details, check out the &lt;a href="https://github.com/Sigmakib2/HonoSphere" rel="noopener noreferrer"&gt;HonoSphere repository on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What is HonoSphere?&lt;/li&gt;
&lt;li&gt;Why Cloudflare Workers?&lt;/li&gt;
&lt;li&gt;Tech Stack Overview&lt;/li&gt;
&lt;li&gt;
Getting Started

&lt;ul&gt;
&lt;li&gt;Backend Setup&lt;/li&gt;
&lt;li&gt;ESP32 Firmware Setup&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Use Cases&lt;/li&gt;
&lt;li&gt;Future Upgrades &amp;amp; Attachables&lt;/li&gt;
&lt;li&gt;Wrapping Up&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  What is HonoSphere?
&lt;/h2&gt;

&lt;p&gt;HonoSphere is an innovative IoT project designed to monitor environmental conditions like temperature, humidity, heat index, mold risk, and vapor pressure deficit (VPD) in real-time. It uses an ESP32 and a DHT11 sensor to capture data, then sends this information to Cloudflare Workers where it’s processed and stored in a Cloudflare D1 Database. The data is finally visualized on a dynamic web dashboard built with HTML, Tailwind CSS, and Chart.js.&lt;/p&gt;




&lt;h2&gt;
  
  
  This Project is Useful For:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;IoT Enthusiasts &amp;amp; Beginners:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
An accessible project for anyone starting with IoT, ESP32 programming, and sensor integration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Smart Home Automation:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Enhance your smart home setup by monitoring and controlling temperature and humidity for optimal comfort.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Greenhouse &amp;amp; Agricultural Monitoring:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Keep your plants happy with real-time environmental data to adjust watering, ventilation, and heating systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Office Environment &amp;amp; Indoor Air Quality:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Maintain a healthy workspace by tracking and managing indoor climate conditions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Personal Weather Stations:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Create your own remote weather station to gather local climate data for personal use or community sharing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Educational Projects:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
A practical project for learning about sensor networks, cloud computing, and real-time data visualization.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Cloudflare Workers?
&lt;/h2&gt;

&lt;p&gt;One of the standout features of HonoSphere is its use of &lt;strong&gt;Cloudflare Workers&lt;/strong&gt;. Here’s why they make this project an ideal choice for beginners and budget-conscious makers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Free Tier and Cost-Effectiveness:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Cloudflare Workers offer a generous free tier, allowing you to run your code at the edge without incurring hefty costs. This means you can deploy your IoT project without worrying about monthly fees or scaling issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ease of Deployment:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Cloudflare Workers simplify the deployment process. With just a few commands and minimal configuration, you can get your backend up and running in minutes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Low Maintenance:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Since Cloudflare Workers are serverless, there’s no need to manage servers or worry about infrastructure. This leaves you free to focus on building and improving your IoT project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Edge Computing Benefits:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
By running your code on Cloudflare’s global network, you benefit from low latency and high performance, ensuring your IoT data is processed quickly and reliably no matter where you are.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Beginner-Friendly Environment:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The developer tools, documentation, and community support make Cloudflare Workers a great entry point for those new to serverless computing and IoT projects.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Tech Stack Overview
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Backend
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hono.js:&lt;/strong&gt; A fast API framework that powers our endpoints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloudflare Workers:&lt;/strong&gt; Serverless computing that makes deployment free and easy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;D1 Database:&lt;/strong&gt; A cloud-based SQL database from Cloudflare for storing sensor data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Frontend
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTML &amp;amp; Tailwind CSS:&lt;/strong&gt; For building a sleek, responsive dashboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chart.js &amp;amp; chartjs-plugin-zoom:&lt;/strong&gt; For interactive, eye-catching charts.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Hardware
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ESP32:&lt;/strong&gt; Your IoT microcontroller that connects to WiFi.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DHT11 Sensor:&lt;/strong&gt; Captures temperature and humidity data.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  HonoSphere Architecture
&lt;/h2&gt;

&lt;p&gt;Visualize the flow of your project with this neat diagram:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftgt7m5uevchz8vmw1xz3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftgt7m5uevchz8vmw1xz3.png" alt="HonoSphere Architecture" width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Installation &amp;amp; Setup
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Clone the Repository
&lt;/h3&gt;

&lt;p&gt;Kick things off by cloning the repository to your local machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Sigmakib2/HonoSphere.git
&lt;span class="nb"&gt;cd &lt;/span&gt;HonoSphere
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Backend Setup
&lt;/h3&gt;

&lt;p&gt;Get ready to deploy the magic on Cloudflare!&lt;/p&gt;

&lt;h4&gt;
  
  
  Cloudflare Workers Project
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Navigate and Install Dependencies:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Jump into the Cloudflare Workers folder and install the necessary packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;cd &lt;/span&gt;cloudflare_worker
   npm &lt;span class="nb"&gt;install
   &lt;/span&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Set Up Cloudflare D1 Database:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Follow the &lt;a href="https://developers.cloudflare.com/d1/" rel="noopener noreferrer"&gt;Cloudflare D1 documentation&lt;/a&gt; to configure your database. Below you can see this process:&lt;/p&gt;

&lt;h4&gt;
  
  
  Configure Wrangler
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Edit the &lt;code&gt;wrangler.jsonc&lt;/code&gt; File:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Update your configuration to connect to your D1 database and secure your endpoints with an API key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"d1_databases"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"binding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DB"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"database_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"honosphere"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"database_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Your-d1_databases-ID"&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"vars"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="nl"&gt;"AUTH_KEY"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"YOUR_SECURE_API_KEY"&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; The &lt;code&gt;AUTH_KEY&lt;/code&gt; is crucial—it's what keeps unauthorized users from writing data to your database!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Create &amp;amp; Configure the D1 Database
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Create the Database:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Execute this command to create a new database called &lt;code&gt;honosphere&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npx wrangler d1 create honosphere
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;(If you haven’t installed &lt;a href="https://developers.cloudflare.com/workers/wrangler/" rel="noopener noreferrer"&gt;Wrangler&lt;/a&gt; yet, run &lt;code&gt;npm install wrangler -g&lt;/code&gt;.)&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Set Up Your Database Table:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Run the schema file to create the necessary table:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npx wrangler d1 execute honosphere &lt;span class="nt"&gt;--remote&lt;/span&gt; &lt;span class="nt"&gt;--file&lt;/span&gt; db/schema.sql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Deploy Your Worker:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finally, deploy your Cloudflare Worker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm run deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once deployed, you’ll see an endpoint URL in your terminal like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   https://&amp;lt;your-project-name&amp;gt;.&amp;lt;your-worker-subdomain&amp;gt;.workers.dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  ESP32 Firmware Setup
&lt;/h3&gt;

&lt;p&gt;Let’s power up the ESP32!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📐 Connection Diagram&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxz42p6he4c99221qky1n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxz42p6he4c99221qky1n.png" alt="HonoSphere Connection Diagram" width="800" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2htz3oq7xho7899mevv1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2htz3oq7xho7899mevv1.jpg" alt="HonoSphere Connection Diagram Breadboard" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow the Connection Diagram to connect the ESP32 and DHT11 sensor.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Navigate to the Firmware Directory:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;cd &lt;/span&gt;esp32_firmware/sketch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Edit the &lt;code&gt;sketch.ino&lt;/code&gt; File:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Open the file in the Arduino IDE (or your favorite editor) and update these settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;   &lt;span class="c1"&gt;// Wi-Fi Credentials&lt;/span&gt;
   &lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;ssid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Your_Wifi_SSID_or_Visible_name"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Your_wifi_password"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

   &lt;span class="c1"&gt;// Cloudflare Worker URL&lt;/span&gt;
   &lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;serverURL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"https://cloudflare_worker.&amp;lt;your_worker_subdomain&amp;gt;.workers.dev/api/sensor"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

   &lt;span class="c1"&gt;// API Key (must match Cloudflare Workers AUTH_KEY)&lt;/span&gt;
   &lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;apiKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"YOUR_SECURE_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Upload the Firmware:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Compile and upload the sketch to your ESP32. Open the serial monitor and you should see messages like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Connecting to WiFi...
   Connected to WiFi ✅
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Watch It Work:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every 33 seconds, the onboard LED will blink to show that data is being sent. Check your Cloudflare D1 Database (under &lt;strong&gt;Storage &amp;amp; Databases → D1 SQL Database → honosphere → readings&lt;/strong&gt;) to see your data logged.&lt;/p&gt;




&lt;h2&gt;
  
  
  API Endpoints
&lt;/h2&gt;

&lt;p&gt;Your deployed Cloudflare Worker exposes the following API endpoints:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. POST &lt;code&gt;/api/sensor&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What It Does:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Accepts sensor data from the ESP32 and stores it in the database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How to Use It:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Headers:&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;x-api-key&lt;/code&gt;: Must match your &lt;code&gt;AUTH_KEY&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Body:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"temperature"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;23.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"humidity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Response:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Success:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"success"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Failure (e.g., if the API key is wrong):&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Unauthorized"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. GET &lt;code&gt;/api/readings&lt;/code&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What It Does:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Retrieves sensor readings, with optional filters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How to Use It:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Use query parameters such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;period&lt;/code&gt; (e.g., &lt;code&gt;'day'&lt;/code&gt;, &lt;code&gt;'week'&lt;/code&gt;, or &lt;code&gt;'month'&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;from&lt;/code&gt; and &lt;code&gt;to&lt;/code&gt; (custom timestamps in milliseconds)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;hours&lt;/code&gt; or &lt;code&gt;minutes&lt;/code&gt; (to get recent data)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Use one filter type per request.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  GET  https://&amp;lt;your-project-name&amp;gt;.&amp;lt;your-worker-subdomain&amp;gt;.workers.dev/api/readings?minutes&lt;span class="o"&gt;=&lt;/span&gt;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Response:&lt;/strong&gt;
Returns an array of sensor readings:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3652&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"temperature"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;33.9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"humidity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;48.9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"timestamp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1742109887052&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3651&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"temperature"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;33.9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"humidity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;48.9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"timestamp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1742109874901&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Error Handling:&lt;/strong&gt;
A 400 status code is returned for invalid parameters.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Dashboard
&lt;/h2&gt;

&lt;p&gt;The HonoSphere Dashboard is a slick web interface that visualizes your sensor data through interactive charts like line, bar, scatter, histogram, pie, and polar.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjydannbrba9jxlv9b47v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjydannbrba9jxlv9b47v.png" alt="HonoSphere Dashboard" width="800" height="645"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Dashboard Setup
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Navigate to the Dashboard Directory:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;cd &lt;/span&gt;dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Update the Endpoint URL:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the &lt;code&gt;index.html&lt;/code&gt; file, find the script block that constructs the API URL and update the placeholder with your Cloudflare Worker endpoint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;   &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fetchData&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;filter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;timeFilter&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
       &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;fromDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fromDate&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
       &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;toDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;toDate&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

       &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`https://cloudflare_worker.&amp;lt;Your_worker_subdomain&amp;gt;.workers.dev/api/readings?&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

       &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fromDate&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;toDate&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
           &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fromTimestamp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fromDate&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
           &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;toTimestamp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toDate&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
           &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`https://cloudflare_worker.&amp;lt;Your_worker_subdomain&amp;gt;.workers.dev/api/readings?from=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;fromTimestamp&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;amp;to=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;toTimestamp&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
       &lt;span class="p"&gt;}&lt;/span&gt;

       &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
           &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
           &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
           &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
           &lt;span class="nf"&gt;renderCharts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
       &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
           &lt;span class="nf"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Error fetching data: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
       &lt;span class="p"&gt;}&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Launch the Dashboard:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Open the &lt;code&gt;index.html&lt;/code&gt; file with a live server or your preferred method, and watch your data come to life in vibrant charts!&lt;/p&gt;

&lt;h3&gt;
  
  
  User Interaction Flow
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Select a Time Range:&lt;/strong&gt;
Choose a preset period (like last 1 minute, 1 hour, etc.) or set custom dates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Load Data:&lt;/strong&gt;
Click the &lt;strong&gt;Load Data&lt;/strong&gt; button to fetch sensor readings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visualize Charts:&lt;/strong&gt;
Your data is rendered in multiple charts—complete with zoom, pan, and full-screen features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full-Screen Mode:&lt;/strong&gt;
Use the full-screen button on any chart for a closer look, and exit full-screen easily.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Plugins in Action
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chart.js:&lt;/strong&gt; Creates interactive, dynamic charts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;chartjs-plugin-zoom:&lt;/strong&gt; Enables smooth zooming and panning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tailwind CSS:&lt;/strong&gt; Ensures your dashboard looks sharp and responsive.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Additional Information
&lt;/h2&gt;

&lt;p&gt;For a deeper dive, updates, or to contribute your own ideas, check out the &lt;a href="https://github.com/Sigmakib2/HonoSphere" rel="noopener noreferrer"&gt;HonoSphere GitHub repository&lt;/a&gt;. Enjoy exploring and monitoring your environment with HonoSphere—where tech meets nature in real-time!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdk52uyb7zt16frzituwi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdk52uyb7zt16frzituwi.jpg" alt="HonoSphere Connection Diagram Breadboard" width="800" height="1066"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd5wlufeckajnouupjd9n.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd5wlufeckajnouupjd9n.jpg" alt="HonoSphere Connection Diagram Breadboard" width="800" height="1066"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjush70kiped896lo2qoi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjush70kiped896lo2qoi.jpg" alt="HonoSphere Connection Diagram Breadboard" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Use Cases
&lt;/h2&gt;

&lt;p&gt;HonoSphere’s versatility opens up a range of practical applications:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Home Automation:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Monitor your home’s climate and trigger smart devices like HVAC systems based on real-time data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Greenhouse Management:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Keep your plants happy by tracking and adjusting temperature and humidity levels for optimal growth.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Office Environment Monitoring:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Maintain a healthy workspace by monitoring environmental conditions to reduce the risk of mold or discomfort.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Remote Weather Station:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Set up a personal weather station to collect and share local weather data with your community or for educational projects.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Future Upgrades &amp;amp; Attachables
&lt;/h2&gt;

&lt;p&gt;The journey doesn’t stop here! HonoSphere is designed to be expandable and upgradeable. Here are a few ideas for future enhancements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Additional Sensors:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Integrate air quality, light intensity, or CO₂ sensors for a more comprehensive environmental analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mobile App Integration:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Build a mobile app that delivers push notifications and real-time data visualization on the go.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Machine Learning Analytics:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Use machine learning to predict trends and automate alerts when environmental conditions hit critical thresholds.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automated Actuators:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Connect devices like fans, humidifiers, or dehumidifiers that automatically adjust based on sensor data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhanced Dashboard Features:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Expand your dashboard with custom reports, historical data analysis, and more detailed filtering options.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Community Data Sharing:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Create a platform for users to share and compare their environmental data, fostering a community of smart monitoring enthusiasts.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;HonoSphere is more than just an IoT project—it’s a gateway to exploring the fascinating world of environmental monitoring, powered by the cost-effective and beginner-friendly capabilities of Cloudflare Workers. Whether you’re a hobbyist or a seasoned developer, HonoSphere provides an accessible platform to learn, innovate, and experiment with IoT technologies without breaking the bank.&lt;/p&gt;

&lt;p&gt;For the full project details and source code, head over to the &lt;a href="https://github.com/Sigmakib2/HonoSphere" rel="noopener noreferrer"&gt;HonoSphere GitHub repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Happy coding, and here’s to building a smarter, more connected world!&lt;/p&gt;




</description>
    </item>
    <item>
      <title>Building Nirmol: A Bangla Offensive Language Detection API and Dataset</title>
      <dc:creator>Sakib Mahmud</dc:creator>
      <pubDate>Wed, 20 Mar 2024 14:53:52 +0000</pubDate>
      <link>https://dev.to/sigmakib2/building-nirmol-a-bangla-offensive-language-detection-api-and-dataset-3g9e</link>
      <guid>https://dev.to/sigmakib2/building-nirmol-a-bangla-offensive-language-detection-api-and-dataset-3g9e</guid>
      <description>&lt;p&gt;&lt;a href="https://nirmol.pages.dev/"&gt;Nirmol&lt;/a&gt; is a Bangla/Bengali/Banglish offensive/bad/slang words Detection API available on &lt;a href="https://github.com/Sigmakib2/Nirmol"&gt;GitHub&lt;/a&gt; as open source. Before Nirmal was created, there was no good API or any other solution to detect swearing or bad words in the Bengali language.&lt;/p&gt;

&lt;h2&gt;
  
  
  Motivation
&lt;/h2&gt;

&lt;p&gt;Although such API is available for English or other popular languages, I could not find any kind of solution for the Bengali language even after searching a lot. I needed such a solution mainly for the platform I'm working with other developers to build.&lt;/p&gt;

&lt;p&gt;In the platform, we are building, a Bengali-speaking person can fill in his/her data, and after publishing it can be seen by anyone on the internet. Many mischievous users use profanity which can cause considerable damage.&lt;/p&gt;

&lt;p&gt;My job was to design the whole system properly and find some microservices-based solutions for minor problems. Finally, I was able to create a solution to this problem myself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design and Development
&lt;/h2&gt;

&lt;p&gt;There can be several solutions to this problem like we can filter out Bengali words using artificial intelligence or we can create a collection where negative or bad words will be kept together to create a filter-out system.&lt;/p&gt;

&lt;p&gt;Since our entire platform is already very complex initially we don't have much competition power. So in that case we could not agree on using artificial intelligence. Besides, none of the existing Bengali artificial intelligence can properly detect Bangla bad words or swearing.&lt;/p&gt;

&lt;p&gt;I created a form and shared it with my friends and acquaintances through social media and collected a list of various commonly used Bengali bad words from them. Apart from that, I created a data set myself by combining different previously published datasets. It was not so easy to build my dataset.&lt;/p&gt;

&lt;p&gt;Then I generated a JSON file and wrote an Express JS app that gets words or sentences and then checks if that is in the JSON file or not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;You can download the dataset from the GitHub repository but here is the Direct dataset link. You can download and use this dataset for ML and AI model training.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nirmol API is based on:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Node.js&lt;/li&gt;
&lt;li&gt;Express.js&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;npm package used&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;body-parser&lt;/li&gt;
&lt;li&gt;cors&lt;/li&gt;
&lt;li&gt;fs&lt;/li&gt;
&lt;li&gt;nodemon&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Run Nirmol locally&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Step 1: Clone the Nirmol repository&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git clone https://github.com/Sigmakib2/Nirmol.git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Step 2: Go to the Nirmol directory&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd Nirmol&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Step 3: Install node modules&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Step 4: Start the project&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm start&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then, open your web browser and navigate to &lt;strong&gt;&lt;a href="http://localhost:3000"&gt;http://localhost:3000&lt;/a&gt;&lt;/strong&gt;, and you should see "Cannot GET /" displayed on the page. To test the API you have to enter something after the '/'. For example "&lt;a href="http://localhost:3000/hello"&gt;http://localhost:3000/hello&lt;/a&gt; world"&lt;/p&gt;

&lt;h2&gt;
  
  
  API Response
&lt;/h2&gt;

&lt;p&gt;The API endpoint analyzes a sentence for offensive/slang words and provides additional information about the sentence.&lt;/p&gt;

&lt;p&gt;For example here is a get request and response:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F266e3ficycao3wmv62pq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F266e3ficycao3wmv62pq.png" alt="Image description" width="539" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
  "bad_sentence": true,&lt;br&gt;
  "bad_word_list": [&lt;br&gt;
    "কুত্তা"&lt;br&gt;
  ],&lt;br&gt;
  "normal_words": [&lt;br&gt;
    "একটি",&lt;br&gt;
    "গালি",&lt;br&gt;
    "বা",&lt;br&gt;
    "খারাপ",&lt;br&gt;
    "শব্দ"&lt;br&gt;
  ],&lt;br&gt;
  "badness": "16.67%"&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can also use the POST method to get a response. This feature was added by Tasnim Anas.&lt;/p&gt;

&lt;p&gt;For POST request: the endpoint is "&lt;a href="http://localhost:3000/"&gt;http://localhost:3000/&lt;/a&gt;" and you have to send payload in the body like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
  "sentence": "Your sentence here..."&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here's what the response means:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;bad_sentence: Indicates whether the sentence contains any offensive/bad/slang words or not. This only returns boolean values.&lt;/li&gt;
&lt;li&gt;bad_word_list: Lists the offensive/bad/slang words found in the sentence.&lt;/li&gt;
&lt;li&gt;normal_words: Lists the words in the sentence that are considered normal or not offensive/bad/slang words.&lt;/li&gt;
&lt;li&gt;badness: Indicates the proportion of offensive/bad/slang words in the sentence.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Use Cases
&lt;/h2&gt;

&lt;p&gt;Here are some use cases of this API&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Content moderation: Bangla websites often host user-generated content such as comments, forum posts, or user profiles. This API can be integrated into these platforms to automatically detect and filter out inappropriate language, thus maintaining a clean and respectful environment for users.&lt;/li&gt;
&lt;li&gt;Social media platforms: Social media platforms that support Bangla language content can use this API to automatically flag or filter out offensive or inappropriate content in user posts, comments, and messages, helping to maintain a positive and safe community for users.&lt;/li&gt;
&lt;li&gt;E-commerce platforms: E-commerce websites serving the Bangla-speaking community can utilize this API to ensure that product reviews and comments remain free from offensive language, ensuring a positive shopping experience for customers.&lt;/li&gt;
&lt;li&gt;Educational platforms: Educational websites and software applications targeting Bangla-speaking users can use this API to monitor and filter user-generated content in discussion forums, chatrooms, or collaborative projects, promoting a respectful and constructive learning environment.&lt;/li&gt;
&lt;li&gt;Parental control software: Parental control software can leverage this API to monitor and filter out inappropriate content in Bangla language websites and applications, helping parents protect their children from exposure to harmful or offensive material online.&lt;/li&gt;
&lt;li&gt;Chat applications: Bangla language chat applications can integrate this API to automatically detect and filter out offensive language in user messages, helping to maintain a friendly and respectful communication environment among users.&lt;/li&gt;
&lt;li&gt;Customer support platforms: Customer support platforms serving Bangla-speaking customers can use this API to monitor and filter out abusive or inappropriate language in customer inquiries and support tickets, ensuring a professional and respectful interaction with users.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>api</category>
      <category>bangla</category>
      <category>nlp</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Change The Theme in Android Studio</title>
      <dc:creator>Sakib Mahmud</dc:creator>
      <pubDate>Thu, 08 Apr 2021 19:09:40 +0000</pubDate>
      <link>https://dev.to/sigmakib2/change-the-theme-in-android-studio-474</link>
      <guid>https://dev.to/sigmakib2/change-the-theme-in-android-studio-474</guid>
      <description>&lt;p&gt;After installing android studio for the first time, you will see the default theme. Which is white and the code is not easy to read. To enable the official dark theme on your android studio, follow the steps below:&lt;/p&gt;

&lt;p&gt;Step 1: Go to ‘File’ and from the drop-down menu click on ‘Settings’&lt;/p&gt;

&lt;p&gt;Step 2: Expand ‘Appearance &amp;amp; Behavior’ menu and click on ‘Appearance’&lt;/p&gt;

&lt;p&gt;Step 3: Expand ‘Theme’ section and select ‘Darcula’&lt;/p&gt;

&lt;p&gt;Step 4: Click on ‘Apply’ or ‘Ok’&lt;/p&gt;

&lt;p&gt;In this way, you can switch between any of those 3-official themes. Here IntelliJ is the light theme and Dracula is the dark theme. Read the &lt;a href="https://tech.pathgriho.com/2021/03/how-to-change-theme-android-studio.html"&gt;article&lt;/a&gt; about this&lt;/p&gt;

</description>
      <category>android</category>
    </item>
  </channel>
</rss>
