Skip to Content

CONNECT SHELLY TO FIWARE USING FIWAREBOX

HOW LOW-COST SHELLY SMART HOME DEVICES EXTEND FIWARE BEYOND FACTORIES AND CITIES INTO HOMES, SCHOOLS, AND PUBLIC BUILDINGS - IOT CONNECTORS / 1
November 4, 2025 by
CONNECT SHELLY TO FIWARE USING FIWAREBOX
Jure Lampe

WHAT ARE SHELLY DEVICES AND WHY THEY MATTER BEYOND SMART CITY AND INDUSTRY

THE BIG FAMILY OF SMALL DEVICES

Shelly devices are a family of Wi-Fi-connected smart modules and sensors produced by Allterco, designed originally for home automation. They measure, switch, and control almost everything: power, temperature, humidity, light, gas, and even roller shutters.

Each Shelly can operate stand-alone, via cloud, or locally through open protocols like MQTT, HTTP REST, or CoAP. This openness is what makes them truly interesting for developers, researchers, and system integrators.

The product line includes:

  • Smart plugs and relays (Shelly Plug, Shelly 1, 2.5, Pro 4PM) for monitoring and switching.
  • Energy meters (Shelly EM, 3EM) for multi-phase energy tracking.
  • Environmental sensors (Shelly H&T, Motion, Door/Window) for comfort and occupancy detection.
  • Lighting and HVAC controllers for automation of rooms, halls, and public areas.
  • Smart Locks - SenLab has a great part here as a firmware developer.

In other words, Shelly devices cover the entire edge layer of a building or environment, from a single socket to complete electrical panels.

WHY SHELLY AND FIWARE MAKE SENSE TOGETHER

FIWARE, through Context Brokers and Smart Data Models, provides a semantic backbone for real-world systems. Traditionally, it’s used for smart city and lately industrial IoT, but it was never limited to those domains.

The only missing link has always been the affordable, widely available edge hardware that could feed data into FIWARE contexts. Shelly fills exactly that gap.

When you connect Shelly devices through MQTT → Context Broker → FIWAREBox (DCaaS or DSaaS), they stop being isolated “smart home gadgets” and become part of a shared semantic data ecosystem.

For example:

  • A Shelly 3EM installed in a public building can report real energy use in NGSI-LD format, just like an industrial meter.
  • A Shelly H&T sensor in a classroom can feed humidity and temperature data into the same context broker that manages energy optimization for the whole school district.
  • A Shelly Plug used in a municipal office can trigger automatic shutdown policies at night, saving energy and CO₂.

All this data can coexist with other FIWARE domains – mobility, lighting, environment – because they all use the same Smart Data Models.

EXTENDING FIWARE BEYOND INDUSTRY AND CITY

Integrating Shelly devices expands the reach of FIWARE into new, practical domains:

DomainExample Use CaseWhat FIWARE Adds
Home automationEnergy, HVAC, lighting optimizationShared semantics, interoperability,  optional AI analytics
Public buildingsSchools, hospitals, officesContextual dashboards, anomaly detection, comfort management
Smart campusesUniversities, business parksIntegration with access control, air quality, occupancy data
HospitalityHotels, resortsEnergy savings, predictive maintenance
AgricultureShelly relays controlling irrigationContext-based automation triggered by weather or soil data

Instead of isolated vertical systems, FIWARE allows all these to share one semantic infrastructure. Shelly devices act as low-cost, standard IoT endpoints, ideal for pilots, small institutions, or hybrid infrastructures where budgets are limited but data value is high.

FROM SMALL DATA TO BIG CONTEXT

By translating Shelly data into NGSI-LD with Smart Data Models, every reading becomes part of a bigger story. The same “power” property used by a Shelly Plug at home can be the same property used by an industrial line, or by a city building.

The context stays consistent across scales.

This unlocks a continuum of use cases:

  • From individual device monitoring to building-level analytics,
  • From private dashboards to public open data portals,
  • From isolated automation to collaborative energy management.

The result is that FIWARE stops being just an industrial or municipal framework and becomes a universal context layer connecting everything that consumes or produces energy, from factories to kitchens.

WHY IT IS STRATEGIC

Using Shelly in FIWARE ecosystems helps to:

  • Lower the entry barrier for small organizations or schools.
  • Provide real data for education, research, and prototyping.
  • Speed up MVP development without industrial hardware costs.
  • Build proof-of-concepts for larger smart city or energy management projects.
  • Bridge the consumer and professional IoT worlds through open standards.

Below is how to connect Shelly Plug to FIWAREBox (a practical example).

WHAT IS SHELLY plug AND WHAT it DOes

The Shelly Plug S Gen3 is a compact Wi-Fi plug that measures energy consumption, voltage, and current, while also acting as a remote switch. It is marketed for home automation, but it’s also a great entry-level device for learning industrial IoT integration.

Every Shelly device can:

  • Measure real-time electrical parameters (power, voltage, current, energy total).
  • Report its state and measurements via MQTT, or other protocol.
  • Be controlled remotely (turning devices on or off).

It’s an excellent way to start connecting physical energy usage to your digital data environment. If you can integrate a €25 plug into your data ecosystem, you can connect almost anything.

Shelly Plug S Gen3

CONNECTING SHELLY TO MQTT BROKER

Shelly devices support MQTT natively, which makes them easy to integrate.

To enable MQTT:

  1. Open the Shelly web interface or mobile app.
  2. Navigate to Internet & Security → MQTT.
  3. Enable MQTT and enter your broker credentials.

Example configuration:

Server: mqtt.fiwarebox.example:1883

Device: Shelly Plug S Kitchen User: shelly Password: ******** Topic prefix: shelly-plug-s

Also, if the location is needed, input Geo location and Time zone.

Once configured, Shelly starts sending data messages such as:

{ "power": 47.5, "voltage": 229.4, "current": 0.21,

"frequency": 50.1, "energy": 12345

​ ...

}

You now have real-time energy data flowing through MQTT. However, MQTT only transports data. It does not explain what the data means, where it comes from, or how it relates to other data sources. That is where the Context Broker and NGSI-LD enter the picture.

DATA VS CONTEXT

WHY CONTEXT BROKER AND NGSI-LD ARE BETTER THAN JUST MQTT

MQTT is efficient at transporting data but lacks structure. It is like a courier service that delivers messages without knowing what they contain. A Context Broker, on the other hand, understands and manages the meaning of data.

It allows you to define:

  • what the data represents (for example, power from a specific device),
  • when it was measured,
  • what units it uses,
  • and how it relates to other entities such as a room, building, or city.

This is achieved through the NGSI-LD standard defined by ETSI and widely used in FIWARE-based systems.

SMART DATA MODELS

NGSI-LD can use Smart Data Models (and FIWAREBox uses it) - open, community-maintained schemas that describe real-world entities like devices, buildings, energy consumption, weather, or people.

By applying Smart Data Models, our Shelly Plug becomes a properly described digital twin, for example:

{ "id": "urn:ngsi-ld:Device:ShellyPlug001", "type": "Device", "name": "Shelly Plug S Kitchen", "category": ["sensor", "plug"], "controlledProperty": ["owner", "phaseType", "voltage", "frequency", "current", "totalActiveEnergyImport", "temperature", "ref_device", "location"], "power": { "type": "Property", "value": 47.5, "unitCode": "W"

"observedAt": now

}, "phaseType": { "type": "...

....

} }

Now, the data is understandable by any NGSI-LD compliant system. It contains context, structure, and meaning. Instead of isolated MQTT topics, we now have interoperable, self-describing entities.

WHY WE CONNECT SHELLY TO OUR DCAAS and DSAAS

Data Catalog as a Service (DCaaS) and Data Space as a Service (DSaaS) are the semantic hubs of our FIWAREBox ecosystem.

It is where data becomes organized, searchable, and reusable.

By connecting Shelly to DCaaS/DSaaS, we achieve several important goals:

  • Semantic enrichment - MQTT payloads are converted into Smart Data Model entities.
  • Metadata publishing - every data source is catalogued using DCAT-AP.
  • Real-time context - measurements are continuously stored in the Context Broker.
  • Interoperability - data can be combined with other datasets such as weather or solar production.
  • Scalability - the same method works for one sensor or ten thousand.

In short, DCaaS/DSaaS turn data into infrastructure. They allow a small IoT sensor to participate in a full industrial or city-scale data ecosystem.

HOW WE DID IT - NODE-RED FLOW

We implemented the integration inside Node-RED, which is part of our FIWAREBox environments.

The flow subscribes to the MQTT Broker (part of the FIWAREBox) where the Shelly Plug publishes its measurement data. Each message is received, parsed, and transformed into both data and metadata according to the Smart Data Models. The resulting JSON-LD entities are then sent to the Context Broker, where they become part of the live semantic data layer managed by DCaaS/DSaaS.

FIWAREBox - Shelly Smart Plug Node-RED Workflow



FIWAREBox - Shelly Smart Plug Node-RED Script

This configuration runs automatically, converting raw MQTT messages into contextualized entities in real time. No manual imports or exports are needed. The entire process is event-driven and always up-to-date.

HOW IT APPEARS IN EMB AND EDB

Once data reaches DCaaS or DSaaS, it becomes visible in two main interfaces.

EXTENDED METADATA BROWSER (EMB)

The Extended Metadata Browser displays entity definitions, and metadata.

It allows you to explore how your data is modeled, including properties, Smart Data Model mappings, provenance, and dataset relationships.


Extended Metadata Browser - Shelly Smart Plug

(Example: ShellyPlug001 entity with all contextual attributes visible.)

EXTENDED DATA BROWSER (EDB)

The Extended Data Browser is where live Shelly Plug data can be explored and visualized.


Extended Data Browser - Shelly Smart Plug

It provides time-series views, property filters, and export options.

Together, EMB and EDB provide both semantic and operational visibility into your data. One shows what your data is, and the other shows what your data does.

WHAT YOU OR OTHERS CAN DO WITH THIS DATA

Once your data is contextualized and catalogued, it becomes reusable across systems and teams.

You can:

  • Build Grafana dashboards querying the Context Broker in real time.
  • Use Jupyter Notebooks for analytics, anomaly detection, or forecasting.
  • Combine data with weather, occupancy, or solar data for efficiency studies.
  • Create automation flows that trigger actions based on real-time conditions.
  • Share contextualized data through APIs or data portals for collaboration.

Everything is connected through standard, open interfaces. There is no vendor lock-in and no custom protocol maintenance. It is pure, reusable, meaningful data.

INTEROPERABILITY IS THE SECRET SAUCE

This project demonstrates that any data source can become interoperable if it is modeled correctly.

By converting MQTT data to NGSI-LD and publishing it in DCaaS/DSaaS, we achieve:

  • Horizontal interoperability across domains like energy, water, mobility, and environment.
  • Vertical interoperability from device to data governance layer.
  • Full alignment with the EU Data Act and Gaia-X principles of openness and portability.

It also ensures future compatibility. If tomorrow someone wants to merge this energy data with a national open data portal or integrate it into a local energy management system, it will already fit perfectly.

WHY THIS MATTERS

Most IoT systems stop at MQTT or proprietary APIs. They never reach the semantic layer, where data gains real value.

Using NGSI-LD, Smart Data Models, and DCaaS/DSaaS, we create data that can be shared, reused, and combined without translation or restructuring.

The cost is minimal, and the return is enormous.

It is a textbook example of the Pareto principle - 20 percent of effort, 80 percent of value.

CONCLUSION

We connected a Shelly Plug to MQTT and made it speak NGSI-LD.

With Node-RED, a Context Broker, and DCaaS, we turned a simple power meter into a fully semantic, interoperable data source.

But Shelly devices are not only sensors – they are also controllers. Most models can be remotely switched on and off or used to control relays, lights, or appliances directly from the network.

In this example, we focused only on data collection and contextualization, but the same approach can be extended to bidirectional control through MQTT or NGSI-LD commands. It is technically straightforward and perfectly doable within the same architecture.

We used a single Shelly Plug S Gen3 for demonstration purposes, yet the principle remains identical for almost every Shelly device – from power meters and relays to temperature sensors, motion detectors, and environmental probes. Each can be connected, modeled, and published into DCaaS with minimal changes to the Node-RED flow and Smart Data Model mapping.

If you already use different Shelly models or plan to connect your own type of device, feel free to contact us. We can help you integrate it into your FIWAREBox ecosystem and make it part of your semantic data space – ready for dashboards, AI, and interoperability from day one.

FUTURE STEPS

This post is part of our ongoing IoT Connectors series.

Depending on your feedback and comments, the next steps may include:

  • Adding more Shelly devices, such as energy meters, relays, or motion sensors.
  • Connecting similar low-cost devices from other vendors over MQTT.
  • Extending to different communication layers, for example connecting water meters over LoRaWAN or industrial sensors via Modbus or OPC-UA.

Our goal is to show how any device – no matter how simple – can join a context-aware FIWARE ecosystem and become part of a scalable data infrastructure for homes, industries, or cities.

Wish to know more or book a short consultation? Visit fiwarebox.com or reach out directly. Let’s build your next connector together.

Like everything we build under FIWAREBox, IoT Connectors follow the same rule:

INVEST 20%, GAIN 80%.

Sometimes the simplest improvement - “show me what’s inside” - delivers the biggest value.

DISAGREE, COMMENT, OR WISH TO KNOW MORE?




to be continued...


CONNECT SHELLY TO FIWARE USING FIWAREBOX
Jure Lampe November 4, 2025
Share this post

Our latest content

Check out what's new in our company !

Your Dynamic Snippet will be displayed here... This message is displayed because you did not provide both a filter and a template to use.