question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reduce frequency of energy reporting

See original GitHub issue

My 45853GE and Securifi Peanut smart plugs report their energy related attributes much more frequently than I’d like it to and I believe much more frequently than they need to. The side effect is that this makes my Home Assistant database much larger since the values are coming in almost every second or every other second.

@Koenkk Do you think it’s ok to raise the minimumReportInterval to something like 30 seconds or can we make this interval configurable option per device? https://github.com/Koenkk/zigbee-herdsman-converters/blob/8af36f039ef4a3976e825fae4709fb35faef2fcf/devices.js#L125

Just want to get your thoughts here. I’m happy to submit a PR if the right approach is found.

Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Koenkkcommented, Jan 29, 2020

@airdrummingfool Object.assign looks like a good idea too me, great 😄

0reactions
airdrummingfoolcommented, Jan 28, 2020

I’ve been thinking about this recently also. I have a few energy-reporting smart plugs that I use to determine if a device is on or off (based on power draw). A 5 second delay in status updates is fine, but having to wait 30 seconds to know that a device changed state is too long in my opinion.

On the flip side, I also have a few smart plugs that report energy usage that I totally ignore. It would be awesome to be able to configure each device separately, but short of that, it’s probably worth setting different reportableChange values for each device. E.g. I have some Iris 3210-L plugs that report current in milliamps. A change as small as 0.001 amps triggers a new message from the sensor, but the difference is so small it doesn’t even change the value reported via MQTT (which only reports down to 0.01 amps).

A thought: instead of having to provide all parameters when we want to provide custom values to endpoint.configureReporting(), what if the configureReporting convenience methods accepted an optional second object parameter that was merged with the existing parameters, so we could e.g. override only reportableChange?

modified configureReporting.rmsCurrent():

    rmsCurrent: async (endpoint, overrides) => {
        const payload = [{
            attribute: 'rmsCurrent',
            minimumReportInterval: 5,
            maximumReportInterval: repInterval.MINUTES_5,
            reportableChange: 1,
        }];
        Object.assign(payload[0], overrides); // merge overrides into the payload
        await endpoint.configureReporting('haElectricalMeasurement', payload);
    },

with the Object.assign call in the convenience method, in order to override reportableChange from the configure method, I could just do:

await configureReporting.rmsCurrent(endpoint, {'reportableChange': 100});

without the Object.assign call, I would have to do the following:

const payload = {
    attribute: 'rmsCurrent',
    minimumReportInterval: 5,
    maximumReportInterval: repInterval.MINUTES_5,
    reportableChange: 100,
}
await endpoint.configureReporting('haElectricalMeasurement', payload);
Read more comments on GitHub >

github_iconTop Results From Across the Web

Alternative Approaches for Incentivizing the Frequency ...
Since generators have particular control over the output that they produce, most ISOs provide disincentives for the generators to produce energy differently ...
Read more >
CDPH Issues Guidelines on How to Reduce Exposure to ...
The new CDPH guidance includes practical steps both adults and children could take to reduce exposure to radio frequency energy from cell phones....
Read more >
Radio Frequency Safety - Federal Communications Commission
Radio frequency Energy FAQs This section contains answers to the most frequently asked questions received by the Commission concerning RF fields and their ......
Read more >
Frequency response services | National Grid ESO
System frequency is a continuously changing variable that is determined and controlled by the second-by-second (real time) balance between system demand and ...
Read more >
Digitalization and Energy – Analysis - IEA
The report examines the impact of digital technologies on energy demand sectors, ... Digital data and analytics can also reduce the frequency of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found