Ready to build this? Download the MQTTfy Android app to create MQTT, Bluetooth & Rest Client Dashboards and local Visual No-code automations directly from your smartphone.

Build a No-Code Remote Patient Monitoring (RPM) Gateway: BLE to REST on Android (Part 1)
The healthcare industry is currently undergoing one of the largest technological revolutions in modern history: Remote Patient Monitoring (RPM). Historically, if a patient with hypertension or diabetes needed their vitals monitored, they had to physically drive to a clinic, sit in a waiting room, and have a nurse manually record their blood pressure or glucose levels on a clipboard. Today, hospitals are desperately trying to shift this monitoring directly into the patient's living room. The strategy is brilliant: give the patient a Bluetooth Low Energy (BLE) blood pressure cuff and a BLE pulse oximeter, and have that data stream instantly to the doctor's Electronic Medical Record (EMR) system. But there is a massive engineering bottleneck. How do you get the data from the Bluetooth cuff into the hospital's secure cloud?For years, the answer was to spend hundreds of thousands of dollars paying a software firm to build a custom iOS and Android application. Patients had to download the app, pair their devices, keep the app open, and hope it didn't crash. If the hospital bought a different brand of blood pressure cuff the next year, the custom app had to be entirely re-written. In this massive three-part guide, we are going to obliterate that bottleneck. We will demonstrate how a standard, inexpensive Android tablet, running the MQTTfy application, can act as the ultimate, zero-code RPM Edge Gateway. We will show you how MQTTfy can natively scan standard BLE medical devices, format the data into secure JSON, fire a REST API POST directly to a hospital's EMR, and publish an MQTT alert to a family member's phone—all simultaneously, and all without writing a single line of custom application code. ---Chapter 1: The RPM Engineering Dilemma
To understand why MQTTfy is a paradigm shift for medical IoT, we must look at the traditional workflow of bridging BLE medical devices to the cloud. Medical devices (like the Omron Bluetooth Blood Pressure Monitor or the Nonin BLE Pulse Oximeter) broadcast their data using the Bluetooth Generic Attribute Profile (GATT). They are "dumb" sensors. They do not have Wi-Fi, and they cannot connect to the internet. The hospital's database (the EMR, like Epic or Cerner) lives on the internet and expects to receive highly structured, secure HTTP REST API payloads.The Traditional Approach: Custom Mobile Apps
Most healthcare providers attempt to bridge this gap by writing custom mobile apps. This is a nightmare for several reasons: 1. Development Cost: Building an app that handles background Bluetooth scanning across the fragmented Android ecosystem (Samsung, Pixel, Motorola) requires a highly specialized team of Kotlin/Java engineers. 2. Maintenance: Every time Android updates its permissions (e.g., location permissions for Bluetooth scanning), the app breaks and must be updated. 3. The User Experience: Elderly patients often struggle to pair Bluetooth devices manually, navigate complex app menus, and keep the app running in the background.The MQTTfy Edge Architecture
Instead of building a custom app from scratch, we use MQTTfy as a pre-compiled, highly robust automation engine. The patient is simply handed a cheap Android tablet that is permanently plugged into the wall in their living room. The tablet has the MQTTfy app running in "Persistent Background Mode." The patient never interacts with the tablet. When they put on their BLE blood pressure cuff and press the "Start" button, the cuff broadcasts the vitals via Bluetooth. The MQTTfy app, running silently in the background of the tablet, intercepts the BLE broadcast. Using its internal Visual Automation Engine, it decodes the blood pressure values, constructs a secure JSON payload, and instantly fires a REST API POST over Wi-Fi directly to the hospital's server. The patient did nothing but press a button on their cuff. The hospital received the data instantly. And the engineers wrote zero code. ---Chapter 2: HIPAA Compliance and Edge Security
When discussing healthcare data, the immediate question is always: Is this secure?If we were using standard consumer automation platforms (like Zapier, Make.com, or IFTTT) to route the data, the answer would be a resounding No. Routing sensitive Protected Health Information (PHI) through third-party automation clouds violates HIPAA (Health Insurance Portability and Accountability Act) compliance because you are exposing the patient's data to unauthorized servers. This is where the architectural brilliance of MQTTfy shines. MQTTfy runs the Visual Automation logic natively and locally on the Android device's CPU, keeping the operation entirely offline much like an offline No-Code AI ESP32 implementation. 1. The BLE data is intercepted locally on the tablet. 2. The logic rules (JSON formatting, data extraction) execute locally on the tablet. 3. The tablet's OS directly initiates a secure, TLS-encrypted (HTTPS) REST API connection to the hospital's secure server. At no point does the data touch a third-party automation cloud. The payload travels directly from the patient's living room to the doctor's database, utilizing the Android operating system's native, enterprise-grade cryptographic libraries (OpenSSL/BoringSSL) to ensure the REST and MQTT payloads are impenetrable. ---Chapter 3: The Hardware and Software Stack
To follow along with Part 2 and Part 3 of this definitive guide, you will need to assemble a basic RPM test bench. 1. The Gateway: Any modern Android smartphone or tablet. We highly recommend a device running Android 10 or higher for the best BLE background scanning stability. 2. The Software: The MQTTfy Android application. 3. The Sensor: A BLE-enabled medical device. For this tutorial, we will use a generic BLE Heart Rate Monitor (which uses the standard 16-bit Heart Rate UUID `0x180D`), but the exact same logic applies to blood pressure cuffs, thermometers, and weight scales. 4. The Destination (REST): A test REST API server. If you don't have access to an EMR, you can use a free service like `webhook.site` to verify that your JSON payloads are successfully arriving over HTTP. 5. The Destination (MQTT): A test Mosquitto MQTT broker (to simulate sending real-time alerts to a family member's dashboard). ---Chapter 4: The Logic Flow – Dual Protocol Routing
In the upcoming chapters, we are going to build a complex, dual-protocol routing system inside MQTTfy's visual canvas. Here is the engineering logic we must implement:1. The Trigger
The trigger is not time-based. A patient doesn't take their blood pressure every 5 minutes. The trigger is Event-Based. The automation flow will sit perfectly dormant, consuming almost zero battery, until the exact moment the BLE blood pressure cuff powers on and broadcasts its GATT characteristics.2. The Extraction
Medical BLE payloads are often complex hex strings. A single byte array might contain Systolic pressure, Diastolic pressure, Heart Rate, and a timestamp. MQTTfy's visual byte-decoder will slice this hex string and extract the specific variables we need.3. The Dual Dispatch (The Fork)
Once we have the clean data (e.g., `Heart Rate: 85 bpm`), the visual automation engine will fork into two parallel actions: - Branch A (The Doctor): We will build a complex JSON object containing the Patient ID and the vitals. We will dispatch this via a secure REST API POST to the hospital's EMR system. - Branch B (The Family): We will implement a Condition Node. If the heart rate is dangerously high (e.g., `> 120 bpm`), we will publish a high-priority MQTT alert to a private broker. A family member, using an MQTT dashboard on their phone, will receive an instant push notification that the patient needs assistance. ---Chapter 5: Why This Changes the Healthcare Industry
The cost to deploy a Remote Patient Monitoring system using the MQTTfy Edge Architecture is a fraction of traditional methods. Instead of paying massive software retainers, healthcare startups and local clinics can buy inexpensive Android tablets, lock them in "Kiosk Mode," install MQTTfy, and visually map their chosen BLE medical devices to their specific REST backends in a matter of hours. If they decide to switch from an Omron blood pressure cuff to a Welch Allyn cuff next year, they don't need to push an app update to the Google Play Store. The IT administrator simply opens MQTTfy, changes the BLE MAC address on the visual canvas, and hits save. The agility, security, and raw power of this zero-code architecture is unprecedented.Next Steps in Part 2
You now understand the massive market potential and the secure architecture of an Android-based RPM gateway. In Part 2: BLE Medical Device Integration, we will boot up the MQTTfy app and connect to our first medical device. We will explore the specific GATT structure of health sensors, learn how to extract vital signs from hexadecimal payloads using the visual decoder, and save our patient's data stream as a persistent background process. Get your Bluetooth sensors ready. We are about to build a life-saving automation system without writing a single line of code.(End of Part 1. Download Part 2 for the hands-on medical BLE configuration.)Build a No-Code Remote Patient Monitoring (RPM) Gateway: BLE to REST on Android (Part 2)
In Part 1 of this guide, we explored the massive structural shift happening in the healthcare industry: Remote Patient Monitoring (RPM). We established why building custom mobile apps to bridge Bluetooth medical devices to hospital databases is a costly, frustrating endeavor. Finally, we introduced the MQTTfy Android app as the ultimate Edge Gateway—a localized, zero-code automation engine that natively solves the HIPAA compliance dilemma by executing all logic securely on the edge, ensuring data safety just like Local RAG secures Smart Home data. Now, we move from theory into practice. In Part 2, we are going to configure the MQTTfy app to act as an aggressive, highly optimized medical BLE scanner. We will demonstrate how to intercept the broadcasts from standard medical sensors, dive into the GATT (Generic Attribute Profile) specifications for health devices, and extract vital signs from hexadecimal payloads using MQTTfy's visual decoder. And as always, we will achieve this without writing a single line of C++, Java, or Kotlin. ---Chapter 1: The Anatomy of a Medical BLE Device
Before we open the app, we must understand how medical Bluetooth devices talk. Unlike a wireless speaker that maintains a constant stream of audio data, a BLE medical device (like a blood pressure cuff or a pulse oximeter) is designed to save battery. It spends 99% of its life asleep. When a patient wraps the cuff around their arm and presses "Start," the device powers on, takes the reading, and instantly begins broadcasting a BLE "Advertisement" packet. It yells into the void: "I have new data!"The GATT Profile
If an Android phone connects to the device, they communicate using GATT. The Bluetooth Special Interest Group (SIG) has defined standardized UUIDs (Universally Unique Identifiers) for common medical devices. This means that a heart rate monitor from Brand A and Brand B likely use the exact same structural formatting. - Heart Rate Service UUID: `0x180D` - Blood Pressure Service UUID: `0x1810` - Health Thermometer Service UUID: `0x1809` - Pulse Oximeter Service UUID: `0x1822` Our goal is to configure MQTTfy to specifically listen for one of these UUIDs, connect, and extract the data sitting inside the underlying "Characteristics." ---Chapter 2: Configuring the MQTTfy BLE Scanner
Let's set up the Android tablet that will live in our patient's living room. Ensure the tablet has Bluetooth enabled, Location permissions granted (required by Android OS to scan for Bluetooth Low Energy devices), and is plugged into a wall charger. 1. Open the MQTTfy app. 2. Navigate to the BLE Devices tab. 3. Power on your medical device. For this tutorial, we will use a generic BLE Heart Rate Monitor (which is a fast, continuous data stream perfect for testing). 4. Tap Start Scan inside the MQTTfy app. The Android tablet's Bluetooth 5.0 antenna will sweep the room. Within seconds, the MAC address and name of your medical device (e.g., `HRM_Sensor_88`) will appear in the list.Connecting and Interrogating
1. Tap the device in the list. 2. MQTTfy initiates a secure BLE connection to the sensor and automatically negotiates the MTU (Maximum Transmission Unit). 3. The app will visually map out the device's entire GATT table on your screen. Scroll through the list of Services until you find the Heart Rate Service (`0x180D`). Beneath it, you will see the Heart Rate Measurement Characteristic (`0x2A37`). ---Chapter 3: Decoding the Hexadecimal Vital Signs
If you tap the Heart Rate Measurement Characteristic (`0x2A37`) and execute a manual Read (or wait for a Notify event, which is how heart rate monitors push live data), you will see a raw byte array appear on the screen, something like: `[0x16, 0x4B, 0x03, 0x00]` If you were writing a custom Android app in Kotlin, you would now have to write bitwise operators to parse this. According to the Bluetooth SIG specification for Heart Rate: - The first byte (`0x16`) is the "Flags" byte, telling you the format of the data. - The second byte (`0x4B`) is the actual heart rate if the flag specifies an 8-bit format. Hex `0x4B` is decimal `75` (75 beats per minute).The Zero-Code Visual Extractor
Writing byte-shifting logic is where most IoT developers give up. MQTTfy eliminates this completely. 1. In the MQTTfy interface, tap the Format dropdown next to the raw hex payload. 2. Because you are reading a standard medical UUID, MQTTfy may automatically offer a preset (e.g., `Format as Heart Rate`). 3. If it is a proprietary medical device with a custom data structure, you can select the Custom Byte Extractor tool. The visual interface allows you to select exactly which byte (e.g., Byte Index 1) you want to extract, and what format to convert it to (e.g., `Unsigned 8-bit Integer`). Once you verify that the number on your screen matches the number on the physical medical device (e.g., `75 bpm`), tap Save as Data Source. You have just successfully bridged a medical device to an Android OS. ---Chapter 4: Background Service Stability for RPM
A Remote Patient Monitoring system is useless if it fails the moment the patient switches apps or locks the tablet screen. The patient is not an IT administrator; they will not reopen the app if it crashes. We must configure MQTTfy to act as an unkillable, persistent background service. 1. Navigate to MQTTfy's Settings > Background Execution. 2. Enable Persistent Scanning (Foreground Service). 3. This is a critical step. Android’s aggressive battery optimization (Doze mode) loves to kill background BLE scanners. By declaring a Foreground Service (which places a persistent notification in the Android status bar), MQTTfy tells the OS: "This is a life-critical application. Do not kill it."4. Ensure you also go into your Android OS settings (Settings > Apps > MQTTfy > Battery) and set it to Unrestricted.Event-Driven vs. Polling
In our previous Smart Building tutorial, we set the scanner to poll the environmental sensors every 5 minutes. Medical devices operate differently. We want Event-Driven data. We want the automation to trigger only when the blood pressure cuff turns on and pushes a new reading. Ensure your BLE Data Source is set to Listen for Notifications / Indications rather than a strict polling interval. Now, MQTTfy will sit in a low-power, dormant state until the exact second the patient takes their vitals. ---Chapter 5: Ready for the Dispatch
Let's review our progress. The Android tablet is now a fully functional medical gateway. It is running silently in the background, aggressively listening for the patient's specific BLE medical device. When the device broadcasts, MQTTfy instantly connects, interrogates the GATT table, and visually decodes the complex hexadecimal byte array into a clean, precise vital sign (like `75 bpm` or `120/80 mmHg`). But currently, the data is just sitting inside the tablet's memory. The hospital hasn't received it, and the family hasn't been notified.Next Steps in Part 3
In Part 3: EMR REST Dispatch & MQTT Alerts, we will open MQTTfy's Visual Automation canvas and build the logic chain that will save lives. We will demonstrate how to format the vital signs into a highly secure, patient-identifiable JSON object. We will trigger an immediate, encrypted REST API POST to the hospital's Electronic Medical Record (EMR) server. Furthermore, we will build a visual condition node: if the vitals exceed a dangerous threshold, MQTTfy will simultaneously publish a high-priority MQTT payload to alert a family member's dashboard. Get ready to close the loop on the ultimate No-Code RPM Gateway.(End of Part 2. Download Part 3 for the REST API and MQTT visual chaining.)Build a No-Code Remote Patient Monitoring (RPM) Gateway: BLE to REST on Android (Part 3)
Welcome to the powerful conclusion of our Remote Patient Monitoring (RPM) guide. In Part 1, we tackled the immense engineering roadblock of bridging local Bluetooth medical devices to highly secure, cloud-based Electronic Medical Records (EMRs), emphasizing why MQTTfy’s localized Edge computing architecture easily satisfies HIPAA compliance. In Part 2, we configured our Android tablet to act as a relentless BLE scanner, capturing GATT broadcasts from medical sensors and visually translating complex hexadecimal payloads into readable vital signs. Now, we bring the entire system to life. In this final installment, we will open MQTTfy’s Visual Automation Engine. We will take the raw patient vitals sitting in the tablet's memory and securely dispatch them to the hospital's cloud API using a structured HTTP REST payload. Simultaneously, we will build a conditional safety net: if the patient's vitals fall into a critical zone, we will immediately trigger a high-priority MQTT alert to notify a family member. All of this complex, multi-protocol medical routing will be achieved visually, securely, and entirely without code. ---Chapter 1: Preparing the Secure JSON Payload
Hospitals do not accept raw, unformatted data. If an EMR system (like Epic, Cerner, or a custom clinical database) is going to ingest patient vitals, the data must be highly structured, identifiable, and sent via a secure HTTP POST request. Let's assume our hospital's REST API expects a JSON payload that looks like this: ```json { "patient_id": "PT-9945-X", "device_type": "heart_rate_monitor", "heart_rate": 85, "timestamp": "2026-09-04T10:00:00Z" } ``` Traditionally, constructing this string on Android requires writing a Kotlin data class and utilizing a serialization library like GSON or Moshi. With MQTTfy, we construct it visually.Building the JSON inside MQTTfy
1. Open the MQTTfy app and navigate to the Automations tab. 2. Tap Create New Flow. 3. Drag a Trigger Node onto the canvas. Set the trigger to BLE Data Received and select your Medical Device profile (e.g., the Heart Rate Monitor we configured in Part 2). 4. Drag a Modifier Node onto the canvas and connect it to the Trigger Node. Select the JSON Builder modifier. 5. In the visual configuration, create four keys to match the hospital's required schema: - Key: `"patient_id"` -> Value: `"PT-9945-X"` (Static String) - Key: `"device_type"` -> Value: `"heart_rate_monitor"` (Static String) - Key: `"heart_rate"` -> Value: `{{BLE_Payload}}` (Dynamic variable from the BLE scanner) - Key: `"timestamp"` -> Value: `{{System_Time_ISO8601}}` (Built-in MQTTfy dynamic variable) Our Android device has just seamlessly packaged the patient's vitals into a pristine, enterprise-ready JSON object. ---Chapter 2: The EMR Dispatch – Secure REST API Call
With our JSON perfectly formatted, we must now transmit it securely over the internet to the hospital. Because this is sensitive healthcare data, it cannot be routed through a middleman automation platform like Make.com. The connection must be a direct, TLS-encrypted tunnel from the patient's Android tablet to the hospital's server. MQTTfy's built-in REST API engine utilizes the Android OS's native cryptographic stack (BoringSSL), ensuring bank-level security. 1. Drag an Action Node onto the canvas and connect it to the output of your JSON Builder. 2. Tap the Action Node and select REST API Request. 3. Method: Select `POST`. 4. URL: Enter the hospital's secure ingestion endpoint (e.g., `https://api.hospital-emr.com/v1/vitals/ingest`). Notice the `https://`—MQTTfy fully supports and verifies SSL certificates. 5. Headers: Most EMRs require authentication. Tap Add Header. Enter `Authorization` as the key, and input the specific `Bearer Token` or API key provided by the healthcare administrator. 6. Body Type: Select `application/json`. 7. Body Payload: Select the output variable from your previous node: `{{JSON_Output}}`. The primary objective is complete. The exact second the patient turns on their blood pressure cuff, the vital signs are scanned, decoded, wrapped in JSON, and fired into the hospital's secure database. ---Chapter 3: The Safety Net – Conditional MQTT Alerts
Sending data to a doctor is critical for long-term health trends, but what happens in an immediate emergency? If an elderly patient's heart rate spikes dangerously high, a doctor might not see the EMR update for hours. We need to notify a family member instantly. We will achieve this by creating a secondary "branch" in our visual logic. We will use a Condition Node to evaluate the vital signs. If they breach a critical threshold, we will publish a high-priority push notification via an MQTT Broker.Step 1: Branching the Logic
1. Go back to your visual canvas. Look at the original Trigger Node (where the raw heart rate number enters the flow). 2. Drag a new Condition Node onto the canvas. 3. Draw a second line from the Trigger Node directly to this new Condition Node.(MQTTfy allows one event to trigger multiple parallel actions simultaneously).Step 2: The Medical Hysteresis Loop
1. Tap the Condition Node and select Numeric Comparison. 2. We want to trigger an alert if the heart rate is dangerously high or dangerously low. 3. Set the logic to: `IF {{BLE_Payload}} > 120 OR {{BLE_Payload}} < 50`.Step 3: The Emergency MQTT Publish
1. Drag a final Action Node onto the canvas and connect it to the `True` output of the Condition Node. 2. Tap the Action Node and select MQTT Publish. 3. Configure the node to connect to a private family MQTT broker (or a free, secure cloud broker like HiveMQ). 4. Topic: `patient/PT-9945-X/alerts/critical`. 5. Payload: Type an urgent, human-readable string: `EMERGENCY: Heart rate is abnormal at {{BLE_Payload}} BPM.` 6. QoS: Set the Quality of Service to `2 (Exactly Once)`. We cannot afford to drop an emergency alert packet. When this logic executes, the family member's phone (which is subscribed to that MQTT topic using their own MQTT dashboard app) will instantly vibrate with a critical push notification. ---Chapter 4: The Ultimate Healthcare Edge Gateway
Let's review the incredible architecture you have just constructed. Sitting in a patient's living room is a standard, inexpensive Android tablet. It runs quietly in the background, consuming almost zero electricity. But beneath the surface, the MQTTfy application is orchestrating a masterclass in Edge Computing: 1. It silently monitors the 2.4GHz spectrum for a specific medical GATT profile. 2. It detects the patient's device, securely connects, and decodes the complex hexadecimal byte array into a clear vital sign. 3. It packages that vital sign into an enterprise-grade, time-stamped JSON object. 4. It establishes a secure, TLS-encrypted HTTP REST connection to a hospital EMR and POSTs the data. 5. Simultaneously, it evaluates the vital sign against a medical logic threshold. 6. If an emergency is detected, it immediately publishes a QoS 2 payload to a cloud MQTT broker to alert the family.No Code, Infinite Scale
If a healthcare startup attempted to build this exact dual-protocol routing system using custom Kotlin app development and external cloud middleware, it would take months of development, thousands of dollars, and intense HIPAA audits. You built it visually, on the device itself, in twenty minutes. Because MQTTfy encapsulates the BLE scanner, the REST API engine, the MQTT client, and the visual logical processor into one unified Android application, it completely eliminates the barrier to entry for advanced Remote Patient Monitoring. This is the power of zero-code automation on the edge. This is the future of healthcare IoT.(End of Part 3. The Remote Patient Monitoring RPM Guide is now complete.)sequenceDiagram
participant B as Blood Pressure Cuff (BLE)
participant A as Android Tablet (MQTTfy)
participant H as Hospital EMR Cloud
B-->>A: Raw GATT Payload (Hex)
Note over A: Visual Decoder creates JSON
A->>H: TLS Encrypted REST POST
Note over H: Patient Record Updated