Posts tagged "HOW-TO"

FAVORIOT Use Case: Turning Equipment Data Into Operational Visibility

September 26th, 2026 Posted by HOW-TO, Internet of Things, IOT PLATFORM, NEWS, Operational Blindness, PARTNER 0 thoughts on “FAVORIOT Use Case: Turning Equipment Data Into Operational Visibility”

Critical equipment does not always fail without warning. Sometimes the warning signs already exist in electrical readings, operating patterns or other equipment data. The bigger problem is that the information is not visible to the right people at the right time.

An airport water pump monitoring project illustrates this challenge. The objective was not simply to put sensors on pumps or send data to the cloud. The operational requirement was to give maintenance personnel continuous visibility into how the equipment was behaving.

The Problem: Critical Equipment With Limited Visibility

Traditional equipment monitoring can depend heavily on local systems, periodic inspections and technicians visiting the site. While these methods remain part of maintenance operations, they leave gaps between inspections.

During those gaps, equipment behaviour can change. A motor may draw more current than usual, experience an unexpected drop or begin developing an unusual operating pattern. Unless somebody sees that change, the condition may remain unnoticed until the next inspection or until a larger problem develops.

The problem statement can therefore be expressed simply: How can an organisation continuously understand what is happening to critical equipment without requiring someone to be physically present?

The answer can be structured around three operational stages: Connect → See → Act.

CONNECT: Capture What Is Happening in the Physical World

Sensors collect information about the operating condition of the equipment. An industrial controller gathers those readings and an industrial communications gateway sends the information to a remote monitoring platform.

The result is a continuous digital connection between physical assets and the people responsible for them. Equipment that previously required local observation can now communicate its condition remotely.

SEE: Convert Data Into Something People Can Understand

Connectivity creates data, but operational teams need visibility. A monitoring platform can present current readings, historical trends and equipment behaviour in a form that allows engineers and maintenance personnel to understand what is happening.

Instead of asking only whether a pump is running, the team can ask whether it is operating normally, whether its behaviour has changed and whether that change requires investigation.

This is where IoT moves beyond connectivity. The objective is not simply to collect more data. The objective is to reduce uncertainty about what is happening across operations.

ACT: Respond When Attention Is Required

The final stage connects visibility with human action. Thresholds and rules can identify conditions that require attention and generate alerts for responsible personnel. The maintenance team can then investigate the equipment rather than waiting for a routine inspection or an obvious failure.

This creates a continuous operational loop where the physical and digital worlds support each other: 

Connect the assets that matter, see what is happening across operations, and act when the information indicates that intervention is required.

That is Connect → See → Act.

For organisations considering IoT, the starting question should therefore not be, “Which IoT technology should we buy?” A more useful question is: “What is happening in our operations today that we cannot see until someone physically checks it or something goes wrong?”

Once that blind spot is clearly defined, the role of IoT becomes much easier to understand. The technology is no longer the centre of the story. The operational problem is.

[Note: This is one of Favoriot‘s Commercial Use Case – Pump Monitoring]

Your IoT Pilot Works. But Will It Ever Become a Real Deployment?

September 20th, 2026 Posted by BLOG, HOW-TO, Internet of Things, IOT PLATFORM, Operational Blindness 0 thoughts on “Your IoT Pilot Works. But Will It Ever Become a Real Deployment?”

The sensors are connected, data is reaching the cloud, dashboards are displaying information correctly and alerts are being generated. From a technical perspective, the IoT pilot has achieved what it was designed to demonstrate.

Yet this is often the point where the harder part begins.

At FAVORIOT, our experience working with IoT projects has taught us that proving a technology works does not automatically create a reason for an organisation to deploy it across more assets, sites or facilities. A technically successful pilot can still stop because the project has not demonstrated enough operational value to justify what comes next.

This distinction has changed how we believe IoT projects should be approached.

IoT Has Become Much Easier to Build

There was a time when organisations needed considerable technical knowledge just to experiment with IoT. Connecting sensors, configuring communication protocols, sending data to a cloud platform and creating dashboards required specialised skills.

That barrier has fallen considerably. Hardware such as ESP32 and Raspberry Pi is widely available, IoT platforms simplify device connectivity, and developers have access to extensive documentation and examples. Generative AI has lowered the learning barrier further by helping users generate code, troubleshoot errors and understand technical concepts.

Building an IoT prototype is no longer the biggest challenge for many organisations. The more difficult challenge is turning that prototype into something people depend on every day.

The Problem With Starting From Technology

Many IoT projects begin with a technology question: “Can we connect this equipment?”

There is nothing wrong with testing technical feasibility. The problem appears when connectivity becomes the primary measure of success. A pilot may demonstrate that sensors can collect data, MQTT can transport it and a platform can display it, but none of these automatically demonstrates operational value.

A stronger starting point is to ask what the organisation currently cannot see.

Perhaps maintenance teams do not know that a remote pump has stopped until someone visits the site. A facilities manager may not notice abnormal electricity consumption quickly enough. An environmental team may receive information too late to respond effectively, while operators managing remote assets may spend considerable time travelling to locations simply to check whether equipment is functioning.

These are operational problems. IoT is the mechanism for making them visible.

A Pilot Needs an Operational Owner

One of the most important questions should therefore be asked before the pilot begins: Who owns the operational problem?

An IT department may support connectivity and cybersecurity, while an engineering team manages equipment and another department controls the project budget. If nobody has responsibility for the outcome the IoT system is supposed to improve, moving beyond the pilot can become difficult.

The operational owner should be able to explain why the problem matters, what happens when it is not detected early and what action should follow when the IoT system identifies an abnormal condition.

This also changes how pilot success should be measured. Instead of measuring only whether devices connected successfully, organisations can measure whether the project reduced unnecessary site visits, shortened response times, detected problems earlier, reduced downtime or provided better visibility into energy and resource consumption.

The Dashboard Should Not Be the Destination

Dashboards have become almost synonymous with IoT, but a beautiful dashboard does not automatically mean that an organisation has improved its operations.

The more useful question is what happens after someone sees the information.

If a temperature exceeds a threshold, who receives the alert? If equipment suddenly stops, who investigates? If energy consumption becomes abnormal, what action follows? If environmental conditions deteriorate, how quickly can someone respond?

This is the thinking behind FAVORIOT’s Connect → See → Act™ approach. Connecting an asset provides data. Making that information visible creates awareness. Acting on the information is where operational value begins.

Five Questions to Ask Before Starting an IoT Pilot

Before investing in another proof of concept, organisations should be able to answer five practical questions:

  1. What operational problem are we trying to solve? Define the problem before selecting sensors, devices or platforms.
  2. What can we not see today? Identify the missing information that prevents faster or better decisions.
  3. Who owns this problem? There should be someone responsible for the operational outcome, not merely the technology.
  4. How will we measure success? Include operational measures such as response time, downtime, site visits, losses or resource consumption.
  5. What happens if the pilot succeeds? Consider production deployment, support, maintenance, connectivity, cybersecurity, budgets and responsibilities before reaching the end of the pilot.

These questions may appear less interesting than discussing sensors, protocols or dashboards, but answering them early can determine whether an IoT project becomes part of daily operations or ends as another demonstration.

From Proof of Technology to Operational Visibility

The IoT industry has spent years proving that connected technology works. We no longer need every project to begin by proving that a sensor can communicate with the cloud. The bigger opportunity is proving that better visibility can improve how an organisation operates.

This is also why FAVORIOT increasingly approaches IoT through the lens of Operational Visibility. The objective is not simply to connect more devices. It is to help organisations see what is happening across physical assets, equipment and environments early enough for people to make better operational decisions.

Before asking “Which sensor should we use?” or “Which IoT platform should we choose?”, there is a more important conversation to have: What operational problem are we trying to make visible, who owns that problem, and what action should happen when we see it?

A pilot that answers those questions has a much stronger reason to continue beyond the demonstration stage. The goal is no longer simply to prove that IoT works. It is to make sure that when the technology works, something meaningful happens because of it.

ESP32 – Favoriot Example using MQTT and Wifi

September 14th, 2026 Posted by HOW-TO, Internet of Things, IOT PLATFORM 0 thoughts on “ESP32 – Favoriot Example using MQTT and Wifi”

Here’s an example of the source code:

<style data-wp-block-html="css">
/*
 * ESP32 -> Favoriot MQTT Example
 * ------------------------------
 * - Connects to Wi-Fi
 * - Connects to Favoriot MQTT broker (non‑secure port 1883)
 * - Publishes a JSON payload to {access_token}/v2/streams
 * - Subscribes to {access_token}/v2/streams/status
 * - Reconnects automatically if connection drops
 * - Non‑blocking loop (no delay())
 */

#include <WiFi.h>
#include <PubSubClient.h>
#include <ArduinoJson.h>   // for easier JSON building

// ================== Wi‑Fi Credentials ==================
const char* WIFI_SSID     = "YOUR_WIFI_SSID";
const char* WIFI_PASSWORD = "YOUR_WIFI_PASSWORD";

// ================== Favoriot Credentials ==================
const char* DEVICE_DEVELOPER_ID = "deviceDefault@your_username"; // e.g., deviceDefault@favoriot
const char* ACCESS_TOKEN        = "your_device_access_token";    // from Favoriot platform

// ================== MQTT Broker Configuration ==================
const char* MQTT_HOST = "mqtt.favoriot.com";
const int   MQTT_PORT = 1883;   // 1883 = plain TCP, 8883 = TLS (secure)
// For TLS, you would need additional certificates and use WiFiClientSecure – see notes below.

WiFiClient espClient;
PubSubClient client(espClient);

// Topics
const String PUBLISH_TOPIC   = String(ACCESS_TOKEN) + "/v2/streams";           // publish data
const String SUBSCRIBE_TOPIC = String(ACCESS_TOKEN) + "/v2/streams/status";   // receive status

// ================== Timing ==================
const unsigned long PUBLISH_INTERVAL = 10000;  // publish every 10 seconds
unsigned long lastPublishTime = 0;

// ------------------------------------------------------------------
// Connect to Wi‑Fi
// ------------------------------------------------------------------
void setupWiFi() {
  Serial.print("Connecting to Wi‑Fi");
  WiFi.mode(WIFI_STA);
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("\n✅ Connected to Wi‑Fi. IP: " + WiFi.localIP().toString());
}

// ------------------------------------------------------------------
// Reconnect to MQTT broker (called when connection lost)
// ------------------------------------------------------------------
void reconnectMQTT() {
  while (!client.connected()) {
    Serial.print("Attempting MQTT connection...");
    // Use access token as username AND password
    if (client.connect("ESP32Client", ACCESS_TOKEN, ACCESS_TOKEN)) {
      Serial.println("✅ Connected to MQTT");
      // Resubscribe to status topic
      client.subscribe(SUBSCRIBE_TOPIC.c_str());
    } else {
      Serial.print("❌ Failed, rc=");
      Serial.print(client.state());
      Serial.println(" try again in 5 seconds");
      delay(5000);  // Wait 5s before retrying
    }
  }
}

// ------------------------------------------------------------------
// Callback for subscription (status messages)
// ------------------------------------------------------------------
void callback(char* topic, byte* payload, unsigned int length) {
  Serial.print("Message arrived on topic: ");
  Serial.println(topic);
  Serial.print("Payload: ");
  for (int i = 0; i < length; i++) {
    Serial.print((char)payload[i]);
  }
  Serial.println();
}

// ------------------------------------------------------------------
// Build JSON payload and publish
// ------------------------------------------------------------------
void publishData() {
  // Use ArduinoJson to create the payload
  StaticJsonDocument<256> jsonDoc;
  jsonDoc["device_developer_id"] = DEVICE_DEVELOPER_ID;

  // Replace this with actual sensor reads (e.g., temperature, humidity, etc.)
  JsonObject data = jsonDoc.createNestedObject("data");
  data["temperature"] = 25.3;   // example value
  data["humidity"]    = 60.1;
  data["sensor_id"]   = "esp32-01";

  // Serialize to a char buffer
  char buffer[256];
  serializeJson(jsonDoc, buffer);

  Serial.print("Publishing: ");
  Serial.println(buffer);

  // Publish to the topic
  if (client.publish(PUBLISH_TOPIC.c_str(), buffer)) {
    Serial.println("✅ Published successfully");
  } else {
    Serial.println("❌ Publish failed");
  }
}

// ------------------------------------------------------------------
// Arduino setup
// ------------------------------------------------------------------
void setup() {
  Serial.begin(115200);
  setupWiFi();

  // Configure MQTT
  client.setServer(MQTT_HOST, MQTT_PORT);
  client.setCallback(callback);
}

// ------------------------------------------------------------------
// Arduino loop (non‑blocking)
// ------------------------------------------------------------------
void loop() {
  if (!client.connected()) {
    reconnectMQTT();
  }
  client.loop();  // keep the MQTT connection alive

  // Publish data at intervals
  if (millis() - lastPublishTime >= PUBLISH_INTERVAL) {
    publishData();
    lastPublishTime = millis();
  }
}
</style>

<script data-wp-block-html="js">
/*
 * ESP32 -> Favoriot MQTT Example
 * ------------------------------
 * - Connects to Wi-Fi
 * - Connects to Favoriot MQTT broker (non‑secure port 1883)
 * - Publishes a JSON payload to {access_token}/v2/streams
 * - Subscribes to {access_token}/v2/streams/status
 * - Reconnects automatically if connection drops
 * - Non‑blocking loop (no delay())
 */

#include <WiFi.h>
#include <PubSubClient.h>
#include <ArduinoJson.h>   // for easier JSON building

// ================== Wi‑Fi Credentials ==================
const char* WIFI_SSID     = "YOUR_WIFI_SSID";
const char* WIFI_PASSWORD = "YOUR_WIFI_PASSWORD";

// ================== Favoriot Credentials ==================
const char* DEVICE_DEVELOPER_ID = "deviceDefault@your_username"; // e.g., deviceDefault@favoriot
const char* ACCESS_TOKEN        = "your_device_access_token";    // from Favoriot platform

// ================== MQTT Broker Configuration ==================
const char* MQTT_HOST = "mqtt.favoriot.com";
const int   MQTT_PORT = 1883;   // 1883 = plain TCP, 8883 = TLS (secure)
// For TLS, you would need additional certificates and use WiFiClientSecure – see notes below.

WiFiClient espClient;
PubSubClient client(espClient);

// Topics
const String PUBLISH_TOPIC   = String(ACCESS_TOKEN) + "/v2/streams";           // publish data
const String SUBSCRIBE_TOPIC = String(ACCESS_TOKEN) + "/v2/streams/status";   // receive status

// ================== Timing ==================
const unsigned long PUBLISH_INTERVAL = 10000;  // publish every 10 seconds
unsigned long lastPublishTime = 0;

// ------------------------------------------------------------------
// Connect to Wi‑Fi
// ------------------------------------------------------------------
void setupWiFi() {
  Serial.print("Connecting to Wi‑Fi");
  WiFi.mode(WIFI_STA);
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("\n✅ Connected to Wi‑Fi. IP: " + WiFi.localIP().toString());
}

// ------------------------------------------------------------------
// Reconnect to MQTT broker (called when connection lost)
// ------------------------------------------------------------------
void reconnectMQTT() {
  while (!client.connected()) {
    Serial.print("Attempting MQTT connection...");
    // Use access token as username AND password
    if (client.connect("ESP32Client", ACCESS_TOKEN, ACCESS_TOKEN)) {
      Serial.println("✅ Connected to MQTT");
      // Resubscribe to status topic
      client.subscribe(SUBSCRIBE_TOPIC.c_str());
    } else {
      Serial.print("❌ Failed, rc=");
      Serial.print(client.state());
      Serial.println(" try again in 5 seconds");
      delay(5000);  // Wait 5s before retrying
    }
  }
}

// ------------------------------------------------------------------
// Callback for subscription (status messages)
// ------------------------------------------------------------------
void callback(char* topic, byte* payload, unsigned int length) {
  Serial.print("Message arrived on topic: ");
  Serial.println(topic);
  Serial.print("Payload: ");
  for (int i = 0; i < length; i++) {
    Serial.print((char)payload[i]);
  }
  Serial.println();
}

// ------------------------------------------------------------------
// Build JSON payload and publish
// ------------------------------------------------------------------
void publishData() {
  // Use ArduinoJson to create the payload
  StaticJsonDocument<256> jsonDoc;
  jsonDoc["device_developer_id"] = DEVICE_DEVELOPER_ID;

  // Replace this with actual sensor reads (e.g., temperature, humidity, etc.)
  JsonObject data = jsonDoc.createNestedObject("data");
  data["temperature"] = 25.3;   // example value
  data["humidity"]    = 60.1;
  data["sensor_id"]   = "esp32-01";

  // Serialize to a char buffer
  char buffer[256];
  serializeJson(jsonDoc, buffer);

  Serial.print("Publishing: ");
  Serial.println(buffer);

  // Publish to the topic
  if (client.publish(PUBLISH_TOPIC.c_str(), buffer)) {
    Serial.println("✅ Published successfully");
  } else {
    Serial.println("❌ Publish failed");
  }
}

// ------------------------------------------------------------------
// Arduino setup
// ------------------------------------------------------------------
void setup() {
  Serial.begin(115200);
  setupWiFi();

  // Configure MQTT
  client.setServer(MQTT_HOST, MQTT_PORT);
  client.setCallback(callback);
}

// ------------------------------------------------------------------
// Arduino loop (non‑blocking)
// ------------------------------------------------------------------
void loop() {
  if (!client.connected()) {
    reconnectMQTT();
  }
  client.loop();  // keep the MQTT connection alive

  // Publish data at intervals
  if (millis() - lastPublishTime >= PUBLISH_INTERVAL) {
    publishData();
    lastPublishTime = millis();
  }
}
</script>

Or you can use Favoriot’s Faybee Chatbot to help you generate the sample code or any help that you want.

The source code above has been generated through the prompt shown below..

Copyright © 2026 All rights reserved