BUG : 3.0.6 (Probably others...) Battery marked device dead on restart = NOP packets on each unsolicited report

Discussions about Z-Way software and Z-Wave technology in general
anom3
Posts: 71
Joined: 21 Sep 2016 08:53

BUG : 3.0.6 (Probably others...) Battery marked device dead on restart = NOP packets on each unsolicited report

Post by anom3 »

So this is kind of a two part bug, the first part I have not traced... And frankly wont bother as my solution below works for me:

PART 1:

Sometimes on restarting z-way-server, SOME (not all) battery devices will switch into a dead state (isFailed.value=true). Not sure the cause of this, unlikely as my wake up intervals are 86400 but maybe this is because right as z-way-server is restarting its expecting the wake up interval to hit... And it doesn't? Not sure.

PART 2:

The problem with this is as follows:

When a device is isFailed.value=true, and this device sends out an unsolicited report (eg: temperature sensor, humidty sensor, etc), z-way-server will try to send out NOP packets right after to get a reply and flip it back into isFailed.value=false. I have verified this via zsniffer as well as "red" text in the timing info panel in /expert.

The problem with this is that for high frequency reporting devices (eg: 5 minutes, but any really) that have a high wakeup interval (eg: 86400 seconds)... Every unsolicited report will result in quite a few NOP packets being sent out and no reply coming back until the wakeup interval really does hit and the device is flipped back into isFailed.value=false.

Solution (Real):

Find out whats causing the devices to flip into isFailed.value=true and maybe adjust the NOP sending logic a little to send out those packets only on wake up notification?

Solution (Temp):

This is what I am running at startup to fake set each device to isFailed.value=false... Yeah, this will set all my battery devices to isFailed.value=false even if they really are failed... But I'm ok with that. Oh, this also fixes the "blinking blue light" / "starts up in inclusion mode" in 5.36 on UZB. The timeout is there to give it some time to settle, possibly not needed but better safe than sorry.

Code: Select all

setTimeout(function(){
	zway.AddNodeToNetwork(0);
	Object.keys(zway.devices).forEach(function(zwaveid){
		try{
			var device=zway.devices[zwaveid];
			if(!device.data.isListening.value&&device.data.isFailed.value){
				zway.devices[zwaveid].data.isFailed.value=false;
			}
		}
		catch(e){}
	});
},60000);
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: BUG : 3.0.6 (Probably others...) Battery marked device dead on restart = NOP packets on each unsolicited report

Post by PoltoS »

We will check the NOP sending logic - it should not send a NOP on unsolicited report - only on wakeup.

The device is shown as failed because the Z-Wave chip reported it as failed. Not sure why
piet66
Posts: 266
Joined: 04 Feb 2017 17:00

Re: BUG : 3.0.6 (Probably others...) Battery marked device dead on restart = NOP packets on each unsolicited report

Post by piet66 »

PART 1:

Sometimes on restarting z-way-server, SOME (not all) battery devices will switch into a dead state (isFailed.value=true).
I can confirm this.
The device is shown as failed because the Z-Wave chip reported it as failed. Not sure why
Is it necessary to believe this, when device is only sleeping?
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me ZW0700 7.20.00 07.38/1766938484 1025/257
Z-Way version v3.2.3 from 2022-04-06 04:56:23 +0300
rafale77
Posts: 115
Joined: 23 Jun 2018 19:26

Re: BUG : 3.0.6 (Probably others...) Battery marked device dead on restart = NOP packets on each unsolicited report

Post by rafale77 »

I will chime in here to say that every time I restart the z-way server which only happens once every few months, upon startup, I see a random number of devices show as dead as well and I have to go undo this by sending a JS API command to undo this for a battery device or I just need to send a NIF for an AC powered device. It is never the same device. I kind of doubt that this is reported by the zwave chip because the device functions perfectly fine. It's a quirk happening only at a reboot of the server unlike the appearance of random command classes which, however rare they are, don't seem to be related to a reboot.
anom3
Posts: 71
Joined: 21 Sep 2016 08:53

Re: BUG : 3.0.6 (Probably others...) Battery marked device dead on restart = NOP packets on each unsolicited report

Post by anom3 »

Yeah I have had this happening for years now... I restart often as I'm always adding things...

But again I'll state, it doesn't really bother me too much as I don't use the z-way-server automation engine / GUI at all... What does is the aimless additional packets every 5 minutes (multiply by 7-8 devices which send out unsolicited requests every 5 minutes) being sent out needlessly.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: BUG : 3.0.6 (Probably others...) Battery marked device dead on restart = NOP packets on each unsolicited report

Post by PoltoS »

I believe this is due to the SDK of the chip. We have released a new 5.39 firmware based on SDK 6.82.01. Please test it to see if same happens to you now. On older SDK it never happened, so instead of fixing Z-Way may be worth to upgrade
anom3
Posts: 71
Joined: 21 Sep 2016 08:53

Re: BUG : 3.0.6 (Probably others...) Battery marked device dead on restart = NOP packets on each unsolicited report

Post by anom3 »

Hi.

Thank you for posting the 5.39 update, regardless if it helps or not... Question:

I am running:

UZB/5.36/48059

https://service.z-wave.me/expertui/uzb- ... ith_hidden

To make the journey to 5.39 I need to change my bootloader to 40196.

Can this be done directly via the flash tool (bootloader 48059 -> 40196, restart, expert UI to 5.39) or do I need to downgrade to 5.23 and back up the chain via 40196? EG: Is a firmware file flashed on 48059 incompatible with a bootloader 40196?

What would be the best route to take?

Thanks!

EDIT:

I see something like this in the doc for the firmware update tool:

Code: Select all

./ZMESerialUpdater serialapi_uzbupdate -d /dev/ttyAMA0 -b bootloader_Razberry_from_05_04_to_8aaa_2MB.bin -f UPD_FIRMWARE_Razberry500_from_05_04_to_05_07.bin
Firmware + bootloader update in 1 command.. Would this work if I pull the 5.39/40196 firmware + bootloader?
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: BUG : 3.0.6 (Probably others...) Battery marked device dead on restart = NOP packets on each unsolicited report

Post by PoltoS »

We have added a direct route - please try
rafale77
Posts: 115
Joined: 23 Jun 2018 19:26

Re: BUG : 3.0.6 (Probably others...) Battery marked device dead on restart = NOP packets on each unsolicited report

Post by rafale77 »

Installed on a test razberry and the sdk does not show. Will try the uzb in a couple of days...
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: BUG : 3.0.6 (Probably others...) Battery marked device dead on restart = NOP packets on each unsolicited report

Post by PoltoS »

This is normal - new version of the SDK is not known to Z-Way. In next version it will show. If app version is 5.39, all is ok
Post Reply