ioBroker.zigbee icon indicating copy to clipboard operation
ioBroker.zigbee copied to clipboard

SP120 plug Reporting interval / Spamming network

Open ScumbagSteve opened this issue 2 years ago • 1 comments

My SP120 Plugs seem to spam the network with every voltage change >1V, which effictively seems to be every 5 seconds. I have attached a log entry, that appears every 5 seconds for the SP120 plugs in my network. The traffic created by these plugs is enormous.

I have found this very issue in the zigbee2mqtt Git, however I was not able to "reconfigure" the plug via the advanced settings in ioBroker. I am not familiar enough with Zigbee mechanics, and wheather this is possible or not.

Any tips or hints, what I can use? My network is that flooded lately, that every now and then the adapter hard-crashes due to the high traffic.

Type attributeReport device {"type":"device","device":{"_events":{},"_eventsCount":0,"_maxListeners":100,"ID":52,"_type":"Router","_ieeeAddr":"0x00158d000388481e","_networkAddress":59765,"_manufacturerID":4454,"_endpoints":[{"_events":{},"_eventsCount":0,"_maxListeners":100,"ID":1,"profileID":49246,"deviceID":16,"inputClusters":[0,4,3,6,8,5,2820,1794,10],"outputClusters":[3,25,10],"deviceNetworkAddress":59765,"deviceIeeeAddress":"0x00158d000388481e","clusters":{"genBasic":{"attributes":{"modelId":"SP 120","manufacturerName":"innr","powerSource":1,"zclVersion":2,"appVersion":1,"stackVersion":2,"hwVersion":1,"dateCode":"20171027-100","swBuildId":"2.0"}},"haElectricalMeasurement":{"attributes":{"acCurrentDivisor":1000,"acCurrentMultiplier":1,"rmsVoltage":239,"rmsCurrent":56,"activePower":3}},"seMetering":{"attributes":{"1072":"0x0000000000000000","multiplier":1,"divisor":100,"currentSummDelivered":[0,658]}},"genOnOff":{"attributes":{"onOff":1}}},"_binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00219fc35d","endpointID":1},{"cluster":2820,"type":"endpoint","deviceIeeeAddress":"0x00124b00219fc35d","endpointID":1},{"cluster":1794,"type":"endpoint","deviceIeeeAddress":"0x00124b00219fc35d","endpointID":1}],"_configuredReportings":[{"cluster":6,"attrId":0,"minRepIntval":0,"maxRepIntval":3600,"repChange":0},{"cluster":2820,"attrId":1291,"minRepIntval":5,"maxRepIntval":3600,"repChange":1},{"cluster":2820,"attrId":1288,"minRepIntval":5,"maxRepIntval":3600,"repChange":1},{"cluster":2820,"attrId":1285,"minRepIntval":5,"maxRepIntval":3600,"repChange":1},{"cluster":1794,"attrId":0,"minRepIntval":5,"maxRepIntval":3600,"repChange":[1,1]}],"meta":{},"pendingRequests":[]},{"_events":{},"_eventsCount":0,"_maxListeners":100,"ID":2,"profileID":49246,"deviceID":4096,"inputClusters":[4096],"outputClusters":[],"deviceNetworkAddress":59765,"deviceIeeeAddress":"0x00158d000388481e","clusters":{},"_binds":[],"_configuredReportings":[],"meta":{},"pendingRequests":[]}],"_manufacturerName":"innr","_powerSource":"Mains (single phase)","_modelID":"SP 120","_applicationVersion":1,"_stackVersion":2,"_zclVersion":2,"_hardwareVersion":1,"_dateCode":"20171027-100","_softwareBuildID":"2.0","_interviewCompleted":true,"_interviewing":false,"_skipDefaultResponse":false,"_skipTimeResponse":false,"meta":{"configured":6},"_lastSeen":1656370334510,"_defaultSendRequestWhen":"immediate","_linkquality":51},"mapped":{"zigbeeModel":["SP 120"],"model":"SP 120","vendor":"Innr","description":"Smart plug","fromZigbee":[{"cluster":"haElectricalMeasurement","type":["attributeReport","readResponse"],"options":[{"type":"numeric","name":"power_calibration","property":"power_calibration","access":2,"description":"Calibrates the power value (percentual offset), takes into effect on next report of device."},{"type":"numeric","name":"current_calibration","property":"current_calibration","access":2,"description":"Calibrates the current value (percentual offset), takes into effect on next report of device."},{"type":"numeric","name":"voltage_calibration","property":"voltage_calibration","access":2,"description":"Calibrates the voltage value (percentual offset), takes into effect on next report of device."}]},{"cluster":"genOnOff","type":["attributeReport","readResponse"]},{"cluster":"genLevelCtrl","type":["attributeReport","readResponse"]},{"cluster":"seMetering","type":["attributeReport","readResponse"]}],"toZigbee":[{"key":["state","on_time","off_wait_time"]},{"key":["scene_store"]},{"key":["scene_recall"]},{"key":["scene_add"]},{"key":["scene_remove"]},{"key":["scene_remove_all"]},{"key":["read"]},{"key":["write"]},{"key":["command"]}],"exposes":[{"type":"numeric","name":"power","property":"power","access":1,"unit":"W","description":"Instantaneous measured power"},{"type":"numeric","name":"current","property":"current","access":1,"unit":"A","description":"Instantaneous measured electrical current"},{"type":"numeric","name":"voltage","property":"voltage","access":1,"unit":"V","description":"Measured electrical potential value"},{"type":"switch","features":[{"type":"binary","name":"state","property":"state","access":7,"value_on":"ON","value_off":"OFF","description":"On/off state of the switch","value_toggle":"TOGGLE"}]},{"type":"numeric","name":"energy","property":"energy","access":1,"unit":"kWh","description":"Sum of consumed energy"},{"type":"numeric","name":"linkquality","property":"linkquality","access":1,"unit":"lqi","description":"Link quality (signal strength)","value_min":0,"value_max":255}],"options":["[Circular]","[Circular]","[Circular]"]},"name":"0x00158d000388481e"} incoming event: {"type":"attributeReport","device":{"_events":{},"_eventsCount":0,"_maxListeners":100,"ID":52,"_type":"Router","_ieeeAddr":"0x00158d000388481e","_networkAddress":59765,"_manufacturerID":4454,"_endpoints":[{"_events":{},"_eventsCount":0,"_maxListeners":100,"ID":1,"profileID":49246,"deviceID":16,"inputClusters":[0,4,3,6,8,5,2820,1794,10],"outputClusters":[3,25,10],"deviceNetworkAddress":59765,"deviceIeeeAddress":"0x00158d000388481e","clusters":{"genBasic":{"attributes":{"modelId":"SP 120","manufacturerName":"innr","powerSource":1,"zclVersion":2,"appVersion":1,"stackVersion":2,"hwVersion":1,"dateCode":"20171027-100","swBuildId":"2.0"}},"haElectricalMeasurement":{"attributes":{"acCurrentDivisor":1000,"acCurrentMultiplier":1,"rmsVoltage":239,"rmsCurrent":56,"activePower":3}},"seMetering":{"attributes":{"1072":"0x0000000000000000","multiplier":1,"divisor":100,"currentSummDelivered":[0,658]}},"genOnOff":{"attributes":{"onOff":1}}},"_binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00219fc35d","endpointID":1},{"cluster":2820,"type":"endpoint","deviceIeeeAddress":"0x00124b00219fc35d","endpointID":1},{"cluster":1794,"type":"endpoint","deviceIeeeAddress":"0x00124b00219fc35d","endpointID":1}],"_configuredReportings":[{"cluster":6,"attrId":0,"minRepIntval":0,"maxRepIntval":3600,"repChange":0},{"cluster":2820,"attrId":1291,"minRepIntval":5,"maxRepIntval":3600,"repChange":1},{"cluster":2820,"attrId":1288,"minRepIntval":5,"maxRepIntval":3600,"repChange":1},{"cluster":2820,"attrId":1285,"minRepIntval":5,"maxRepIntval":3600,"repChange":1},{"cluster":1794,"attrId":0,"minRepIntval":5,"maxRepIntval":3600,"repChange":[1,1]}],"meta":{},"pendingRequests":[]},{"_events":{},"_eventsCount":0,"_maxListeners":100,"ID":2,"profileID":49246,"deviceID":4096,"inputClusters":[4096],"outputClusters":[],"deviceNetworkAddress":59765,"deviceIeeeAddress":"0x00158d000388481e","clusters":{},"_binds":[],"_configuredReportings":[],"meta":{},"pendingRequests":[]}],"_manufacturerName":"innr","_powerSource":"Mains (single phase)","_modelID":"SP 120","_applicationVersion":1,"_stackVersion":2,"_zclVersion":2,"_hardwareVersion":1,"_dateCode":"20171027-100","_softwareBuildID":"2.0","_interviewCompleted":true,"_interviewing":false,"_skipDefaultResponse":false,"_skipTimeResponse":false,"meta":{"configured":6},"_lastSeen":1656370334510,"_defaultSendRequestWhen":"immediate","_linkquality":51},"endpoint":"[Circular]","data":{"rmsCurrent":56},"linkquality":51,"groupID":0,"cluster":"haElectricalMeasurement","meta":{"zclTransactionSequenceNumber":89,"manufacturerCode":null,"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0}}}

mod edit - corrected code tags

ScumbagSteve avatar Jun 27 '22 23:06 ScumbagSteve

I have adjusted the configuration file for the SP 120 (.../iobroker/data/node_modules/zigbee-herdsman-converters/devices/innr.js) and added the "{change: XX}" parameter behind the awaits.

Unfortunately the "repChange" for Power, Current and Voltage are still 1. Other changes in the file seem to be considered correctly, as I have also changed the description, which is visible in ZigBee. However I don't understand why the parameters are not considered.

I also found the reporting.js file, which might overwrite the values given here. I don't know exactly what it does. Maybe someone from the dev team can give me a hint?

 {
        zigbeeModel: ['SP 120'],
        model: 'SP 120',
        vendor: 'Innr',
>        description: 'Smart plug Adjusted Test',
        fromZigbee: [fz.electrical_measurement, fz.on_off, fz.ignore_genLevelCtrl_report, fz.metering],
        toZigbee: [tz.on_off],
        configure: async (device, coordinatorEndpoint, logger) => {
            const endpoint = device.getEndpoint(1);
            await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
            await reporting.onOff(endpoint);
            // Gives UNSUPPORTED_ATTRIBUTE on reporting.readEletricalMeasurementMultiplierDivisors.
            endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {
                acCurrentDivisor: 1000,
                acCurrentMultiplier: 1,
            });
>          await reporting.activePower(endpoint, {change: 10});
>          await reporting.rmsCurrent(endpoint,  {change: 50});
>          await reporting.rmsVoltage(endpoint,  {change: 10});
            // Gives UNSUPPORTED_ATTRIBUTE on reporting.readMeteringMultiplierDivisor.
            endpoint.saveClusterAttributeKeyValue('seMetering', {multiplier: 1, divisor: 100});
            await reporting.currentSummDelivered(endpoint);
        },
        exposes: [e.power(), e.current(), e.voltage().withAccess(ea.STATE), e.switch(), e.energy()],
    },

ScumbagSteve avatar Jul 11 '22 22:07 ScumbagSteve