<?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: Pius Oblie</title>
    <description>The latest articles on DEV Community by Pius Oblie (@piusoblie).</description>
    <link>https://dev.to/piusoblie</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%2F1722658%2F16287188-c6d8-4e28-9514-365c451b3a41.jpg</url>
      <title>DEV Community: Pius Oblie</title>
      <link>https://dev.to/piusoblie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/piusoblie"/>
    <language>en</language>
    <item>
      <title>Cinderella is in Good Hands — Building an Agentic IoT System with Gemma 4 and ASHA</title>
      <dc:creator>Pius Oblie</dc:creator>
      <pubDate>Fri, 15 May 2026 11:41:22 +0000</pubDate>
      <link>https://dev.to/piusoblie/cinderella-is-in-good-hands-building-an-agentic-iot-system-with-gemma-4-and-asha-10dn</link>
      <guid>https://dev.to/piusoblie/cinderella-is-in-good-hands-building-an-agentic-iot-system-with-gemma-4-and-asha-10dn</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/google-gemma-2026-05-06"&gt;Gemma 4 Challenge: Build with Gemma 4&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Most IoT systems are rigid. You configure them once, they do one thing for the rest of their lives, and changing anything requires rewriting code or a touching dashboard. Adding AI usually means expensive cloud inference with unpredictable latency and cost(or you have to fight between engineering cost vs api cost).&lt;/p&gt;

&lt;p&gt;ASHA is a project I have been building that tries to fix this. An ecosystem that gives AI models a natural language interface to the physical world. For this hackathon, I wanted to answer one question: can Gemma 4(a small open weight model) actually run an IoT system?&lt;/p&gt;

&lt;p&gt;The subject: Cinderella. My house plant.&lt;br&gt;
The hardware setup was deliberately cheap. An ESP32 WROOM (520KB RAM, 4MB flash), a water level sensor, a PWM light strip, and a buzzer. Total cost: under $25. The ASHA library registers all of this with the agent in about 15 lines of code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;ASHA.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;&lt;span class="n"&gt;ASHA&lt;/span&gt; &lt;span class="n"&gt;asha&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="n"&gt;asha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;asha_wifi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;begin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"mywifi"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"mypassword"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;asha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;asha_devices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;addDevice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="n"&gt;asha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;genericDev&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DeviceCategory&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Sensor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Cinderella's water sensor"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BusType&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Analog&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;34&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;asha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;asha_devices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;addDevice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="n"&gt;asha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;genericDev&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DeviceCategory&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Actuator&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Cinderella's Light"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BusType&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;PWM&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;asha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;asha_devices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;addDevice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="n"&gt;asha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;genericDev&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DeviceCategory&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Actuator&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Cinderella's buzzer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BusType&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;PWM&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;asha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;init&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"myashaID"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;loop&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="n"&gt;asha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;run&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;p&gt;From there, Gemma 4 should know what hardware exists and can call it as tools. ASHA handles the translation layer. More details in the repo below.&lt;/p&gt;

&lt;p&gt;The interface: WhatsApp. No app, no dashboard, no configuration file. Just a conversation.&lt;br&gt;
I can tell Cinderella's agent to turn on her light, check her water level, play a song on her buzzer, or set up a full autonomous care schedule, all from a single message. When I am away, the agent holds the fort and can even create realtimed embedded task.&lt;/p&gt;

&lt;p&gt;The most surprising moment came when I deliberately shut down the microcontroller and asked for a sensor reading. The model did not hallucinate a result. It correctly interpreted the tool timeout as an error and reported it honestly. For a small parameter model handling real hardware, that matters a lot.&lt;br&gt;
The experience was something else. Watching a free open model understand "Cinderella is sensitive, dim her light to 30% at noon to save electricity" and then actually do it felt like something you'd see in sci-fi.&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/uEqSVSws0tc"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Stass client- this allows you to connect Gemma4 to an mcp server and communicate over whatsapp
&lt;/h3&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/pius-code" rel="noopener noreferrer"&gt;
        pius-code
      &lt;/a&gt; / &lt;a href="https://github.com/pius-code/stass_client-2.0" rel="noopener noreferrer"&gt;
        stass_client-2.0
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;stass_client 2.0&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;An unofficial WhatsApp client that lets you connect MCP (Model Context Protocol) tools to an LLM and interact with it over WhatsApp.&lt;/p&gt;

&lt;p&gt;The difference between 1.0 and 2.0 is that 2.0 has explicit support for MCP clients, while 1.0 relied on the LLM provider's built-in MCP server support. This version also handles MCP OAuth authentication.&lt;/p&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Getting Started&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;1. Install dependencies&lt;/h3&gt;
&lt;/div&gt;

&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;npm install&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;2. Set up environment variables&lt;/h3&gt;

&lt;/div&gt;

&lt;p&gt;Copy &lt;code&gt;.env.example&lt;/code&gt; to &lt;code&gt;.env&lt;/code&gt; and fill in your keys:&lt;/p&gt;

&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;cp .env.example .env&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;3. Configure your allowed WhatsApp number&lt;/h3&gt;

&lt;/div&gt;

&lt;p&gt;In &lt;code&gt;main.ts&lt;/code&gt;, replace &lt;code&gt;"exampleID@lid"&lt;/code&gt; with your own WhatsApp ID. Every incoming message prints its ID to the console, so you can just copy it from there. You can also remove the &lt;code&gt;if&lt;/code&gt; check entirely to allow anyone to use the bot — just be careful about costs if you're on a paid model.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;4. Set your MCP server URL&lt;/h3&gt;

&lt;/div&gt;

&lt;p&gt;Set &lt;code&gt;MCP_URL&lt;/code&gt; in…&lt;/p&gt;
&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/pius-code/stass_client-2.0" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;h3&gt;
  
  
  ashaBackend - this is where the the mcp tools live and how the devices are stored and fetched to the LLM
&lt;/h3&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/pius-code" rel="noopener noreferrer"&gt;
        pius-code
      &lt;/a&gt; / &lt;a href="https://github.com/pius-code/ashaBackend" rel="noopener noreferrer"&gt;
        ashaBackend
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;this project is in the development phase and not ready for production yet&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Asha Backend&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;The backend for &lt;strong&gt;Asha&lt;/strong&gt; — a framework that lets your hardware talk to AI.&lt;/p&gt;
&lt;p&gt;Asha connects IoT devices and LLM via MQTT, exposing an MCP (Model Context Protocol) server so an AI agent can directly control and monitor your hardware through natural conversation.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Prerequisites&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Make sure you have &lt;a href="https://docs.astral.sh/uv/" rel="nofollow noopener noreferrer"&gt;uv&lt;/a&gt; installed:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;pip install uv&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Setup&lt;/h2&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Clone the repo and install dependencies:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;uv sync&lt;/pre&gt;

&lt;/div&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Copy &lt;code&gt;.env.example&lt;/code&gt; to &lt;code&gt;.env&lt;/code&gt; and fill in your values:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;cp .env.example .env&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Required environment variables:&lt;/p&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Variable&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MONGO_URL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;MongoDB connection string&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;JWT_SECRET_KEY&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Secret for signing JWT tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;JWT_ALGORITHM&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;JWT algorithm (e.g. &lt;code&gt;HS256&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ACCESS_TOKEN_EXPIRE_MINUTES&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Token expiry duration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;FRONTEND_URL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;CORS origin (default: &lt;code&gt;http://localhost:3000&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ENV&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Set to &lt;code&gt;development&lt;/code&gt; to enable Swagger docs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Running&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Full server (REST API + MCP agent)&lt;/h3&gt;

&lt;/div&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;uv run main.py&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Starts the FastAPI backend and MCP server together on port &lt;strong&gt;8080&lt;/strong&gt;…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/pius-code/ashaBackend" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  ashaBridge - the ashabridge is the link between a microcontroller and the AI.
&lt;/h3&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/pius-code" rel="noopener noreferrer"&gt;
        pius-code
      &lt;/a&gt; / &lt;a href="https://github.com/pius-code/ASHABridge" rel="noopener noreferrer"&gt;
        ASHABridge
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;ASHABridge&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;ASHABridge&lt;/strong&gt; is a microcontroller firmware library that connects IoT hardware to an AI agent via MQTT. The agent can control pins, run batch sequences, and execute real-time Lua scripts on the device — all without reflashing.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Development Phase Notice&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This project is actively under development. It works for most common use cases (digital control, PWM, analog sensing, I2C, SPI, UART, Lua scripting), but some features are still in progress. You are welcome to test it, open issues, and contribute. See the &lt;a href="https://github.com/pius-code/ASHABridge#to-do" rel="noopener noreferrer"&gt;To-Do&lt;/a&gt; section for what is planned next.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Platform Support&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ESP32&lt;/td&gt;
&lt;td&gt;Supported&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Raspberry Pi&lt;/td&gt;
&lt;td&gt;In progress&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Arduino&lt;/td&gt;
&lt;td&gt;In progress&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Quick Start&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;1. Install dependencies&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;This project uses &lt;a href="https://platformio.org/" rel="nofollow noopener noreferrer"&gt;PlatformIO&lt;/a&gt;. Dependencies are declared in &lt;code&gt;platformio.ini&lt;/code&gt; and installed automatically on first build.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;2. Configure credentials&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;Before building, open the following files and replace the placeholder values:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;src/main.cpp&lt;/code&gt;&lt;/strong&gt; — your WiFi credentials and ASHA device ID:&lt;/p&gt;
&lt;div class="highlight highlight-source-c++ notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;const&lt;/span&gt; &lt;span class="pl-k"&gt;char&lt;/span&gt;* ssid&lt;/pre&gt;…
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/pius-code/ASHABridge" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Used Gemma 4
&lt;/h2&gt;

&lt;p&gt;The reason Gemma 4 matters for IoT is simple. It is an open weight model that can handle agentic tasks . For embedded systems running 24/7, API costs are not just inconvenient, they are a dealbreaker. Gemma 4 can remove this entirely.&lt;br&gt;
I started with Gemma 4 E2B running locally on my laptop. 16GB RAM, 1.6GHz CPU, no GPU. The model ran. A command like "turn on Cinderella's light" took almost 2 minutes to execute. Slow, but not useless. If you tell an agent to turn on a light at 6am and it turns on at 6:02am, nobody is upset. For scheduled and automated tasks, local inference on commodity hardware is already viable. This completely eliminates API costs and with appropriate hardware, the latency shrinks to near zero.&lt;br&gt;
I then switched to Gemma 4 26B and 31B via OpenRouter's free tier. Both performed well. They followed the system prompt, called the right tools in the right order, held context across long conversations, and adapted their conversation style to match how the user was speaking. That last one was interesting. Nobody programmed that behavior. The models just picked it up naturally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How ASHA connects to Gemma 4 technically&lt;/strong&gt;&lt;br&gt;
ASHA exposes hardware ports as MCP tools. Each device registers its GPIO pin, bus type (Analog, PWM, I2C, UART) and a natural language description(check code example above). Gemma 4 reads the tool descriptions and decides which one to call and when.&lt;/p&gt;

&lt;p&gt;For example, given the command "read her water level", Gemma executes the publish tool on the ASHA server with the correct parameters. Under the hood ASHA uses MQTT to execute the command on the ESP32 and sends the response back to Gemma. Gemma 4 26B and 31B consistently confirmed the bus type before calling a tool, every single time.&lt;br&gt;
I also never taught Gemma how to interpret sensor results. It figured that out by itself, correctly mapping raw analog readings to real world plant states. That tells you something about how well these models understand physical systems, a near perfect fit for IoT solutions. You probably don't need to finetune.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Proactiveness&lt;/strong&gt;&lt;br&gt;
Gemma 4 31B stood out here. When I told it I was leaving and asked for its plan, it did not wait for instructions. It proposed a full care schedule, identified that it had no way to water Cinderella directly, and suggested using the buzzer to alert someone nearby as a workaround. The model found a solution within its hardware constraints without being asked. For IoT that is huge. When a device is out of reach or a component is faulty, you want an agent that adapts, not one that fails silently.&lt;br&gt;
Scheduled workflows and real time conditions&lt;br&gt;
When given time based instructions, Gemma 4 always got the timing right. It understood real time constraints, calculated durations correctly ("it is currently 5:43pm, so the light turns on in 2 minutes"), and executed tasks the way an engineer would think about them. Not just executing commands but reasoning about when and why.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What this unlocks&lt;/strong&gt;&lt;br&gt;
This combination of Gemma 4 and ASHA proves something important. You can isolate an IoT device, give it a Gemma 4 brain, and ask it to run forever. It will manage itself, notify you only when something is beyond its capabilities, and handle everything else autonomously. No rigid rule sets. No hardcoded edge cases. Just a model that understands the physical world and acts on it.&lt;br&gt;
The applications are not small. Farm monitoring, hospital equipment, power plants, smart homes, industrial systems, drones. Anywhere an embedded IoT solution is needed, this stack can go. And it is already here.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>gemmachallenge</category>
      <category>gemma</category>
    </item>
  </channel>
</rss>
