Extreme number of triggers from energy measurement

For devices supporting the Auto Discovery feature. Like ZWaveJS2MQTT, Zigbee2MQTT.

Moderator: leecollings

Post Reply
azonneveld
Posts: 157
Joined: Wednesday 02 October 2019 7:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Extreme number of triggers from energy measurement

Post by azonneveld »

I have multiple energy measuring devices, from different manufactureres, all zigbee (MQTT, autodiscovery).
The purpose was to monitor the update frequency to determine the stability of the zigbee network.
The results got me flabbercasted, the amount of updates/triggers is INSANE.

What is happening/wrong here?

The code:

Code: Select all

return {
	on = {
		devices = {
			'Blitzwolf 01 Koelkast energy',
			'Tuya SurroundSpeakers energy'
			
		}
	},
	logging = {},
	execute = function(dz, device, triggerInfo)

		if device.name=='Blitzwolf 01 Koelkast energy' then
		    local actual = dz.devices('Zigbee_update_koelkast').counter + 1
		    dz.devices('Zigbee_update_koelkast').updateCounter(actual)
		    do return end
		end

		if device.name=='Tuya SurroundSpeakers energy' then
		    local actual = dz.devices('Zigbee_update_surround').counter + 1
		    dz.devices('Zigbee_update_surround').updateCounter(actual)
		    do return end
		end	
		
	end
}
Devices monitored:
Image
Image

Counters after ~15minutes:

Image


Resulting (ofcourse) in the following overflow entries:

Code: Select all

 2024-08-11 21:50:00.607 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 1684, sValue: '885443715983617949696', sUsage: '0', dType: 243, sType: 28)
2024-08-11 21:55:00.094 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 1684, sValue: '14507109848176000042532864', sUsage: '0', dType: 243, sType: 28)
2024-08-11 22:00:00.628 Error: UpdateMeter: Error converting sValue/sUsage! (IDX: 1684, sValue: '59421121957798200420987830272', sUsage: '0', dType: 243, sType: 28) 
rpi4 - zigbee2mqtt - roborock - espeasy - rfxcom - homewizard p1 - otgw - homebridge - surveillance station - egardia - goodwe - open weather map - wol - BBQ detection - rsync backup
User avatar
waltervl
Posts: 5386
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Extreme number of triggers from energy measurement

Post by waltervl »

I never has seen

Code: Select all

do return end
In a dzvents script. What should it do?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
azonneveld
Posts: 157
Joined: Wednesday 02 October 2019 7:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: Extreme number of triggers from energy measurement

Post by azonneveld »

waltervl wrote: Monday 12 August 2024 0:12 I never has seen

Code: Select all

do return end
In a dzvents script. What should it do?
It prevents the rest of the script from executing.
Normally used in httpresponses, not really needed in this case, but it does no harm.
rpi4 - zigbee2mqtt - roborock - espeasy - rfxcom - homewizard p1 - otgw - homebridge - surveillance station - egardia - goodwe - open weather map - wol - BBQ detection - rsync backup
User avatar
waltervl
Posts: 5386
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Extreme number of triggers from energy measurement

Post by waltervl »

I would remove them and also to be sure change one local actual into actual2 so they for sure wont use values of each other.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests