Purpose of Zigbee otaupgrade commandline

Hi all,

I’ve already updated a lot devices using the zigbee otaupgrade commands like:

zigbee otaupgrade file frsc/100B-011F-01001E06-ConfLightBLE-ModuLumV3-EFR32MG21.zigbee
zigbee otaupgrade start 42576/11 frsc/100B-011F-01001E06-ConfLightBLE-ModuLumV3-EFR32MG21.zigbee

This is amazing, awesome and never seen before…

But, if i run the command without an argument then i get this:

openhab> zigbee otaupgrade
Address    Ieee Address      State
8AB8/1     A4C13820C204A740  OTA_UNINITIALISED
8438/2     00178801063658D6  OTA_UNINITIALISED
57E1/11    0017880106917F2C  OTA_UNINITIALISED

But the problem is that i cannot see any status…
Can I cancel this somehow?

openhab> zigbee otaupgrade COMPLETE 8438/2
Error: Exception during command execution (IllegalArgumentException): Endpoint '8438/2' is not found
openhab> zigbee otaupgrade COMPLETE 8AB8/1
Error: Exception during command execution (IllegalArgumentException): Endpoint '8AB8/1' is not found
openhab> zigbee otaupgrade STATE 8AB8/1
Error: Exception during command execution (IllegalArgumentException): Node '8AB8/1' is not found.

I think the issue you’re having is with the way the node and endpoints are defined (and I might agree it’s a bit confusing).

These commands want the decimal value - so you can’t use 8438/1 - you need to use 33848/1 (ie the decimal equivalent).

Note also that the STATE command is just after the node address - not the endpoint. So you can use 33838.

I hope that helps.

Hi Chris,

thanks for your helping hand again.
So it seems the error Message

 Endpoint '8AB8/1' is not found

Pointed to an Endpoint but a Node was required.

I’ve just tried it out and found some other Error Message (See the last code Segment).
Is it possible to stop the OTA Update? for those open OTAUPDATES?

Thanks a lot
/Franz

openhab> zigbee otaupgrade
Address    Ieee Address      State
127C/1     84FD27FFFE60DEC7  OTA_UNINITIALISED
FB50/2     00178801096AD15A  OTA_UNINITIALISED
68D5/11    00178801042F8978  OTA_UNINITIALISED
openhab> zigbee nodes | grep 127C
   4732  127C  84FD27FFFE60DEC7  ROUTER        ONLINE      1  ZIGBEE_HOME_AUTOMATION     WINDOW_COVERING_DEVICE     _TZ3000_5vgl3nmg  TS130F
openhab> zigbee nodes | grep FB50
  64336  FB50  00178801096AD15A  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021
openhab> zigbee nodes | grep 68D5
  26837  68D5  00178801042F8978  ROUTER        ONLINE     11  ZIGBEE_LIGHT_LINK          ZLL_COLOR_TEMPERATURE_LIGHT  Signify Netherlands B.V.  LTC013
openhab> zigbee otaupgrade STATE 4732
OTA Upgrade configuration for 127C/1
Current state    : OTA_UNINITIALISED
Firmware Version : Unknown
openhab> zigbee otaupgrade STATE 64336
OTA Upgrade configuration for FB50/2
Current state    : OTA_UNINITIALISED
Firmware Version : Unknown
openhab> zigbee otaupgrade STATE 26837
Error: Exception during command execution (MissingFormatArgumentException): Format specifier '%08X'
openhab>

After some searching, I’ve found why this is happening. Unfortunately it’s a bug and there’s no easy way around this.

No - it doesn’t look like it.

I’ll fix the bug with the exception and will add a CANCEL command, but unfortunately this doesn’t really provide immediate assistance to you as it will take time for this to filter through the system.

1 Like

Just FTR the following PR (once merged) should add a cancel option and fix the above exception.

1 Like

Hi @chris ,

I’ve just tried to cancel the ota upgrade in Openhab 4.0.2
the command is executed properly but the devices do not disapear.

any ideas?

openhab> zigbee otaupgrade
Address    Ieee Address      State
FB4F/1     A4C13812F53BEB40  OTA_UNINITIALISED
D9B3/2     0017880103CAA348  OTA_UNINITIALISED
736C/11    00178801042F71EE  OTA_UNINITIALISED

openhab> zigbee otaupgrade cancel 64335/1
OTA Upgrade cancelled on endpoint FB4F/1

openhab> zigbee otaupgrade
Address    Ieee Address      State
FB4F/1     A4C13812F53BEB40  OTA_UNINITIALISED
D9B3/2     0017880103CAA348  OTA_UNINITIALISED
736C/11    00178801042F71EE  OTA_UNINITIALISED

BR
/FranzS

I’m not sure what you mean by “disappear”? If you cancel the OTA, then the device will still be there - just the OTA will be uninitialised. Can you describe what you expect to happen? The cancel command is used to stop a running OTA transfer.

Looking at the output though, there was no OTA running when you used the cancel command, so it won’t do anything anyway…

Hi @chris ,

i thought that this commands says that the OTAUpgrade was initalized.

openhab> zigbee otaupgrade
Address    Ieee Address      State
FB4F/1     A4C13812F53BEB40  OTA_UNINITIALISED
D9B3/2     0017880103CAA348  OTA_UNINITIALISED
736C/11    00178801042F71EE  OTA_UNINITIALISED

This also remains when i reboot openhab or disconnect the stick.

Then i run

openhab> zigbee otaupgrade cancel 64335/1
OTA Upgrade cancelled on endpoint FB4F/1

And then i would expect the first one to disappear, or did i got it wrong?

image

Nothing will disappear. The otaupgrade command will simply list all the known servers and the transaction state. Using the cancel sub command won’t do anything if the transaction is not initialised (as is the case).

The “first one” will therefore not disappear - the server is still there and the transfer state is still uninitialised.

Chris

Hi @chris,

thanks a ton for the explaiation but to be honest I’m a bit confused.
Does this mean the “zigbee otaupgrade” command without parameters return devices with an Available OTA?

This would be weird because it only shows one device …

openhab> zigbee otaupgrade
Address    Ieee Address      State
FF02/1     50325FFFFE361FE7  OTA_UNINITIALISED
DEFC/2     001788010969320F  OTA_UNINITIALISED
236D/11    00178801069290BC  OTA_UNINITIALISED
openhab> zigbee nodes | grep 001788010969320F
  57084  DEFC  001788010969320F  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021

… out of plenty

openhab> zigbee nodes | grep RWL021
   1299  0513  0017880106700377  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021
   7122  1BD2  0017880103E77CE7  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021
  10538  292A  00178801067018B4  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021
  11138  2B82  00178801096AD15A  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021
  19056  4A70  0017880104F2F751  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021
  32407  7E97  00178801063658D6  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021
  36061  8CDD  0017880103E75304  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021
  45502  B1BE  00178801096ADBE2  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021
  49874  C2D2  001788011048BE20  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021
  52128  CBA0  001788010634ABB9  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021
  55731  D9B3  0017880103CAA348  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021
  57084  DEFC  001788010969320F  END_DEVICE    ONLINE      1  ZIGBEE_LIGHT_LINK          ZLL_NON_COLOR_SCENE_CONTROLLER  Philips          RWL021

Shouldn’t it show then all of them?

Thanks
/Franz

Yes, that’s correct - it lists the OTA servers currently registered within the stack.

My turn to be confused - why do you say there is only. one device. Your list shows 3.

I appreciate that’s still not all, and yes, I think in general it should list them all, and without more information I can’t say why more aren’t listed. The servers aren’t always generated on startup from memory, so it might just be that they aren’t created in the stack, or it might be that the device didn’t report something the stack expected.

Hi @chris

Yes this true but only one device of that type “RWL21” is listed.

The devices are identical and i thought they might act the same way.
If this is somehow a mistake of the Stack or the device then it’s also fine, its just for me to understand better what its about.

Thanks
/Franz

Ok, so lots of devices, but only one device type?

It’s impossible for me to say why this is happening like this without looking through logs of the startup or joining.