Chatty Devices and Excessive Events

I'm working on integrating UK smart meters (mains electricity and gas) into Hubitat via an intermediary device. It's pretty much all working, except there's a lot of potential event data to handle. I'm receiving MQTT messages every 10 seconds which provides the following from the meters:

  • Current power usage in W.
  • Daily, weekly, monthly energy usage in kWh.
  • Unit rate and standing charges.
  • Meter and supplier information.
  • LQI and RSSI information.
  • Intermediary device data (model, firmware, etc)

Not only is this data available for import from the grid, it's also present as grid export data to the grid. I've not implemented export data yet... but all this data adds up to hitting the old "Some devices are generating excessive events." message in short order.

Not all of this information is necessarily an event to act upon, so things such as supplier and meter details I'm throwing into state variables, with only 'actionable' data going via sendEvent().

Is this sensible behaviour? Are there other techniques I should be investigating to reduce hub load?

If you can drop that down to 30 seconds you should be ok. I get a lot of power reporting from my Iotawatt and that seems to be the sweet spot

1 Like

The interval isn't configurable, the intermediary spits it out every 10s.

However, I'm thinking of making the child driver selective in its processing. Daily, weekly and monthly figures don't need to be updated every 10s and the gas meter only properly reports every 30 minutes, so I can make that much less responsive. The messages will be received, but they don't need to trigger events, which is what I believe the hub gets bogged down with.

2 Likes

I do do something similar in Tuya Metering Plug driver. Although the device may still send the Voltage and Amperage attributes over the Zigbee network, if these are of no interest for the particular use case, the driver does not send V/A events to HE hub, nor records any logs.

2 Likes

Ah, good stuff. I'll tidy things up, hopefully get it to calm down a little. :slight_smile:

1 Like

You could also implement a threshold -- I would assume that many of these reports are very similar or identical to the currently-published value. Only updating the value when it changes by more than 100W would probably tamp it down significantly without making the data less useful.

2 Likes

Yeah, that's the road I'm walking down at this very moment.

Pretty impressed with this thing. It's referred to as a Consumer Access Device (CAD) over here and it's much more reliable than the one from the energy supplier, which loses connectivity to both my meter and WiFi at the drop of a hat.