Skip to content

Configuration

Add the plugin under plugins[] in your OpenBridge config:

json
{
  "name": "@nubisco/openbridge-shelly-platform",
  "config": {
    "devices": [{ "ip": "192.168.1.122", "name": "Home" }]
  }
}

That is the whole minimum configuration. Everything else has a sensible default.

Device options

OptionTypeDefaultDescription
ipstringrequiredIP address or hostname on your LAN. May include a port.
namestringmodel namePrefix for the devices this meter creates.
pollIntervalnumber5Seconds between reads. Lower gives finer power resolution.
timeoutnumber4000Request timeout in milliseconds.
showTotalbooleantrueRegister one device summing every phase.
showPhasesbooleantrueRegister one device per phase.
phaseNamesstring[]Phase A, B, CLabels for each phase.
exposeToHomeKitbooleantruePublish HomeKit accessories as well.
alertThresholdnumber0Watts above which a HomeKit contact sensor trips. 0 disables it.
usernamestringnoneOnly if the device has HTTP auth enabled.
passwordstringnoneOnly if the device has HTTP auth enabled.
excludebooleanfalseSkip this device entirely.
switch:NobjectnonePer-channel overrides on a Gen2+ relay. See below.

Relay channels (Gen2+)

A Gen2+ relay exposes one switch:N component per channel. Each becomes a controllable OpenBridge device, and on metering models (the PM variants) it also reports its own power.

Channels are named "<device name> - Switch N" by default. Override per channel:

json
{
  "ip": "192.168.1.178",
  "name": "Pool",
  "switch:0": { "name": "Pool Light" },
  "switch:1": { "exclude": true }
}
OptionTypeDefaultDescription
namestringderivedReplaces the generated "<device> - Switch N" name.
excludebooleanfalseDo not register this channel as a device at all.

There is deliberately no type option. Relays are always published to HomeKit as switches, and whether one should appear as a light or an outlet is set in the OpenBridge device inspector, which re-applies the choice on every restart. Keeping that in one place is what stops the Home app reverting the accessory to a switch.

Choosing a poll interval

The default of 5 seconds suits most installations. Consider the trade-off:

  • Energy totals (kWh) accumulate on the device itself, so they are accurate regardless of how often you poll. A slow interval loses nothing.
  • Power (W) is instantaneous. A 60-second interval will miss a heat pump that cycles on and off between reads.

Gen1 meters refresh their own measurements roughly once per second, so intervals below 1 second gain nothing but network traffic. The same holds for Gen2+ devices.

Polling also drives how quickly a relay toggled physically at the wall is reflected in OpenBridge and HomeKit. Changes made through OpenBridge are applied immediately and do not wait for the next poll.

HomeKit exposure

exposeToHomeKit defaults to true for continuity with the Homebridge plugins people migrate from. Meter channels appear as a light sensor whose lux value carries watts, because HomeKit has no power characteristic. Relay channels appear as ordinary switches.

If you only care about the OpenBridge dashboard, set it to false. The telemetry and history are unaffected: they do not travel through HomeKit at all.

Released under the MIT License.