Shelly WiFi Relay Switch
Integrates Shelly WiFi-enabled relay switches and meters into OpenEMS for monitoring and control of electrical devices and energy production.
Overview
This bundle provides a comprehensive integration for Shelly devices, a popular range of WiFi-enabled smart relays, meters, and switches. Each Shelly device type is implemented as a separate OpenEMS Component with its own Factory-PID, allowing multiple devices to be configured and managed independently within OpenEMS Edge.
The bundle enables real-time monitoring of electrical parameters (voltage, current, power, energy) and remote control of relay switches. Shelly devices communicate via their native HTTP REST API, providing reliable WiFi-based communication over standard networks.
All Shelly devices are accessed via their IP addresses or via mDNS autodiscovery on the local network. The integration handles polling of device status and provides channel mapping for electrical meter data and digital output control.
Supported Devices
Each device type below is individually integrated with dedicated component support:
-
Shelly 1 Gen4 - Single relay with optional metering - Shelly 1
-
Shelly 2.5 - Dual relay switch with power metering - Shelly 2.5
-
Shelly 3EM - 3-phase electricity meter - Shelly 3EM
-
Shelly 3EM Gen3 - 3-phase meter Gen3 - Shelly 3EM Gen3
-
Shelly Plug - Basic relay plug with metering - Shelly Plug
-
Shelly Plug S Gen3 - Compact relay plug - Shelly Plug S Gen3
-
Shelly Plus 1PM - Single relay with integrated meter - Shelly Plus 1PM
-
Shelly Plus Plug S - Improved plug with metering - Shelly Plus Plug S
-
Shelly Plus PM Mini - Compact 2-channel meter - Shelly Plus PM Mini
-
Shelly Pro 1PM - Professional single relay with metering - Shelly Pro 1PM
-
Shelly Pro 2PM - Professional dual relay with metering - Shelly Pro 2PM Device
-
Shelly Pro 3 - Triple relay - Shelly Pro 3
-
Shelly Pro 3EM - 3-phase meter (120A, 400A variants) - Shelly Pro 3EM
-
Shelly Pro 4PM - Professional quad relay with metering - Shelly Pro 4PM Device
-
Shelly Outdoor Plug S Gen3 - Weather-resistant outdoor plug - Shelly Outdoor Plug S Gen3
Components
This bundle implements the following OpenEMS Components, each supporting one or multiple Shelly device types. Each component has its own Factory-PID for independent configuration and instantiation:
Shelly 1
Name: IO Shelly1
Factory-PID: io.openems.edge.io.shelly.shelly1
-
DigitalOutput
-
id(String): Component ID for unique identification (default: "io0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
ip(String): IP address of the Shelly 1 device (required)
Shelly 2.5
Name: IO Shelly.25
Factory-PID: io.openems.edge.io.shelly.shelly25
-
DigitalOutput
-
ElectricityMeter (single-phase)
-
id(String): Component ID for unique identification (default: "io0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
ip(String): IP address of the Shelly 2.5 device (required)
Shelly 3EM
Name: IO Shelly.3EM
Factory-PID: io.openems.edge.io.shelly.shelly3em
-
DigitalOutput
-
ElectricityMeter (3-phase)
-
id(String): Component ID for unique identification (default: "meter0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
ip(String): IP address of the Shelly 3EM device (required)
Shelly 3EM Gen3
Name: IO Shelly.3EMG3
Factory-PID: io.openems.edge.io.shelly.shelly3emgen3
-
ElectricityMeter (3-phase)
-
id(String): Component ID for unique identification (default: "meter0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
ip(String): IP address of the Shelly 3EM Gen3 device (required)
Shelly Plug
Name: IO Shelly.Plug
Factory-PID: io.openems.edge.io.shelly.shellyplug
-
DigitalOutput
-
SinglePhaseMeter
-
ElectricityMeter (single-phase)
-
id(String): Component ID for unique identification (default: "io0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
phase(SinglePhase): Which phase the Shelly Plug is connected to (default: L1) -
ip(String): IP address of the Shelly Plug device (required) -
type(MeterType): What is measured by this meter (default: CONSUMPTION_METERED) -
invert(Boolean): Inverts power values and swaps production/consumption energy (default: false)
Shelly Plug S Gen3
Name: IO Shelly.PlugSG3
Factory-PID: io.openems.edge.io.shelly.shellyplugsgen3
-
DigitalOutput
-
ElectricityMeter (single-phase)
-
id(String): Component ID for unique identification (default: "io0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
phase(SinglePhase): Which phase the Shelly Plug is connected to (default: L1) -
mdnsName(String): mDNS name for device discovery (optional) -
ip(String): IP address of the Shelly Plug S Gen3 device (optional) -
type(MeterType): What is measured by this meter (default: CONSUMPTION_METERED) -
invert(Boolean): Inverts power values and swaps production/consumption energy (default: false) -
validateDevice(Boolean): If enabled and type is wrong, no values will be read from device (default: false) -
debugMode(DebugMode): Activates debug mode (default: OFF)
Shelly Plus 1PM
Name: IO Shelly.Plus1PM
Factory-PID: io.openems.edge.io.shelly.shellyplus1pm
-
DigitalOutput
-
ElectricityMeter (single-phase)
-
id(String): Component ID for unique identification (default: "io0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
ip(String): IP address of the Shelly Plus 1PM device (required)
Shelly Plus Plug S
Name: IO Shelly.Plus.PlugS
Factory-PID: io.openems.edge.io.shelly.shellyplusplugs
-
DigitalOutput
-
ElectricityMeter (single-phase)
-
id(String): Component ID for unique identification (default: "io0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
phase(SinglePhase): Which phase the Shelly Plug is connected to (default: L1) -
mdnsName(String): mDNS name for device discovery (optional) -
ip(String): IP address of the Shelly Plus Plug S device (optional) -
type(MeterType): What is measured by this meter (default: CONSUMPTION_METERED) -
invert(Boolean): Inverts power values and swaps production/consumption energy (default: false) -
validateDevice(Boolean): If enabled and type is wrong, no values will be read from device (default: false) -
debugMode(DebugMode): Activates debug mode (default: OFF)
Shelly Plus PM Mini
Name: IO Shelly.PlusPMMini
Factory-PID: io.openems.edge.io.shelly.shellypluspmmini
-
SinglePhaseMeter
-
ElectricityMeter (single-phase)
-
id(String): Component ID for unique identification (default: "ioShellyPmMini0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
phase(SinglePhase): Which phase the Shelly Plug is connected to (default: L1) -
ip(String): IP address of the Shelly Plus PM Mini device (required) -
type(MeterType): What is measured by this meter (default: CONSUMPTION_METERED) -
invert(Boolean): Inverts power values and swaps production/consumption energy (default: false)
Shelly Pro 1PM
Name: IO Shelly.Pro1PM
Factory-PID: io.openems.edge.io.shelly.shellypro1pm
-
DigitalOutput
-
SinglePhaseMeter
-
ElectricityMeter (single-phase)
-
id(String): Component ID for unique identification (default: "io0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
ip(String): IP address of the Shelly Pro 1PM device (required)
Shelly Pro 2PM Device
Name: IO Shelly.Pro2PM
Factory-PID: io.openems.edge.io.shelly.shellypro2pm.device
-
DigitalOutput (dual)
-
ElectricityMeter (single-phase)
-
id(String): Component ID for unique identification (default: "io0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
phase(SinglePhase): Which phase the Shelly is connected to (default: L1) -
mdnsName(String): mDNS name for device discovery (optional) -
ip(String): IP address of the Shelly Pro 2PM device (optional) -
debugMode(DebugMode): Activates debug mode (default: OFF)
Note: The Shelly Pro 2PM also provides a separate Terminal component for accessing individual relay terminal data.
Shelly Pro 2PM Terminal
Name: IO Shelly.Pro2PM.Terminal
Factory-PID: io.openems.edge.io.shelly.shellypro2pm.terminal
-
SinglePhaseMeter
-
ElectricityMeter (single-phase)
-
id(String): Component ID for unique identification (default: "io0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
mdnsName(String): mDNS name for device discovery (optional) -
ip(String): IP address of the Shelly Pro 2PM device (optional) -
terminal(TerminalEnum): Terminal selection (required)
Shelly Pro 3
Name: IO Shelly.Pro3
Factory-PID: io.openems.edge.io.shelly.shellypro3
-
DigitalOutput
-
id(String): Component ID for unique identification (default: "io0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
ip(String): IP address of the Shelly Pro 3 device (required)
Shelly Pro 3EM
Name: IO Shelly.Pro3EM
Factory-PID: io.openems.edge.io.shelly.shellypro3em
-
ElectricityMeter (3-phase)
-
id(String): Component ID for unique identification (default: "meter0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
ip(String): IP address of the Shelly Pro 3EM device (required)
Shelly Pro 4PM Device
Name: IO Shelly.Pro4PM
Factory-PID: io.openems.edge.io.shelly.shellypro4pm.device
-
DigitalOutput (quad)
-
ElectricityMeter (single-phase)
-
id(String): Component ID for unique identification (default: "io0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
phase(SinglePhase): Which phase the Shelly is connected to (default: L1) -
mdnsName(String): mDNS name for device discovery (optional) -
ip(String): IP address of the Shelly Pro 4PM device (optional) -
debugMode(DebugMode): Activates debug mode (default: OFF)
Note: The Shelly Pro 4PM also provides a separate Terminal component for accessing individual relay terminal data.
Shelly Pro 4PM Terminal
Name: IO Shelly.Pro4PM.Terminal
Factory-PID: io.openems.edge.io.shelly.shellypro4pm.terminal
-
SinglePhaseMeter
-
ElectricityMeter (single-phase)
-
id(String): Component ID for unique identification (default: "io0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
mdnsName(String): mDNS name for device discovery (optional) -
ip(String): IP address of the Shelly Pro 4PM device (optional) -
terminal(TerminalEnum): Terminal selection (required)
Shelly Outdoor Plug S Gen3
Name: IO Shelly.OutdoorPlugSG3
Factory-PID: io.openems.edge.io.shelly.outdoorplugsgen3
-
DigitalOutput
-
ElectricityMeter (single-phase)
-
id(String): Component ID for unique identification (default: "io0") -
alias(String): Human-readable alias for the component -
enabled(Boolean): Enable/disable this component (default: true) -
phase(SinglePhase): Which phase the Shelly Plug is connected to (default: L1) -
mdnsName(String): mDNS name for device discovery (optional) -
ip(String): IP address of the Shelly Outdoor Plug S Gen3 device (optional) -
type(MeterType): What is measured by this meter (default: CONSUMPTION_METERED) -
invert(Boolean): Inverts power values and swaps production/consumption energy (default: false) -
validateDevice(Boolean): If enabled and type is wrong, no values will be read from device (default: false) -
debugMode(DebugMode): Activates debug mode (default: OFF)
Prerequisites / Dependencies
System Requirements
-
Network connectivity: All Shelly devices communicate via WiFi/Ethernet and must be reachable from OpenEMS Edge on port 80 (HTTP)
-
Local Network: Shelly devices must be configured to operate on the same network as OpenEMS Edge
Known Limitations
-
No HTTPS Support: Communication with Shelly devices uses HTTP only; HTTPS is not currently supported
-
No Authentication: Devices with password protection cannot be accessed
-
Polling-Based: Status updates are polling-based (not real-time event-driven); update frequency depends on configuration