Updating Razberry firmware - how to allow serialupdater tool to access device

Hi All,
I am running OH2.4 stable on a RPi3B as largely stock openhabian. I’m using the OH ZWave binding.

I am interested in updating my RaZBerry z-wave hat’s firmware.
https://z-wave.me/zmeserialupdater-manual/

If I stop openhab with
sudo openhab-cli stop

and then try to get the iformation from the z wave hat with:
./ZMESerialUpdater serialapi_info
or
sudo ./ZMESerialUpdater serialapi_info

I get an error that I believe means the device is locked out from the updater tool:

Openning port                            ..............................                        FAILED

        Error  0 Unknown exception:global name 'Programmer' is not defined

Perhaps interestingly, when I restart OH, I get this message:

sudo openhab-cli start

A systemd service configuration exists...
Use 'sudo /bin/systemctl start openhab2.service' to start an openHAB service
Launching an instance in this terminal..
Launching the openHAB runtime...
There is a Root instance already running with name openhab and pid 13688. If you know what you are doing and want to force the run anyway, export CHECK_ROOT_INSTANCE_RUNNING=false and re run the command.

Does this mean that I hadn’t actually shutdown OH with the first command? I haven’t done any tweaking to the way openhabian starts OH.

I assume I’m not the first person to want to update the firmware of the raZberry hat for use with openhab. Is there a correct/better way to go about this?
My eventual plan is to also want to be able to shut down openhab, start up Z-Way server, and then use that (or other firmware tools) to update the firmware of various Z-Wave OTA-capable devices in my network. Also, I’ve heard backing up the Z-wave device settings is a good idea. I imagine it’s also needed to shut down OH, start up Z Way, and then go back again to OH. Is there a correct/less messy way of doing this?
Any suggestions?
Thanks
Ben

Edit:
Re-attempting to stop OH and watching the logs seems to indicate that OH shuts down, then immediately begins to restart again automatically. Paying attention to the suggested command, I now run:
sudo /bin/systemctl stop openhab2.service
and OH fully stops. Re-attempting the ZMESerialUpdater command gives the same error, unfortunately.

Thanks

1 Like

You can’t simply stop openHAB when running it as a service (which is the common way). Instead please use

sudo systemctl stop openhab2

There are several commands, start, stop, restart,status, enable and disable.

If the problem remains, another option is to disable the service, reboot the machine, and enable openHAB after successfully flashing the firmware.

I think I didn’t use that updater tool you linked to but did this from Z-Way … but it’s quite some time ago so I don’t recall the details.
No matter what tool you use either way you have to shutdown OH to free access to the serial port that must be used to communicate with the hat or UZB stick just as @Udo_Hartmann explained that.

But have you understood that RaZberry upgrade process ?
Actually this floating graph of SW versions (URL in your link) looks complicated but not all that trustworthy, frankly I don’t understand its purpose.
Is there any reason NOT to install the latest version (5.36 if I “untangled” the graph correctly) ? As the downloadable files for 5.36 are tagged to be an “upgrade” from I think 5.24 to 5.36, would I need to go through a series of upgrades ? which one would I need to start with ?

Thanks @Udo, it looks like I’ll need to disable and reboot.

@mstormi, I had the same thought liking at their firmware update “flowsheet”. My problem was that I couldn’t find it what version I was starting with to be able to find where to begin on the convoluted diagram. When I get to my computer I try the disable and reboot path, then get into it.
I may try resurrect zway, if it has a more intuitive path (plus back up capabilities)

same problem, have you solved that somehow?
I didn’t get access to the razberry neither by
“sudo ./ZMESerialUpdater serialapi_info” nor by Zway

image

Honestly, things were working and I don’t want to break what I have, so I haven’t gotten around to it. As mstormi mentions, on the raZberry website the floating SW upgrade version map is rather odd. To me, I was worried any misstep could brick the device, so I didn’t try further to fully shut down openhab and then start up Z_Way.
I’d love to hear what you sort out, though.

As a sidenote, a real MUST actually is to regularly backup your RaZberry configuration. That you can only do with Z-Way so better install it (but disable startup).

2 Likes

[EDIT: Important note. Updating the firmware may change the frequency of your dongle. See Updating Razberry firmware - how to allow serialupdater tool to access device for the solution. ]

I finally got around to updating my Razberry z-way bootloader and firmware:

stop openhab:

sudo systemctl stop openhab2.service

Download and install ZWay

wget -q -O - razberry.z-wave.me/install | sudo bash

Start zway:

sudo /etc/init.d/z-way-server start

Go to the web interface for your zway installation:

[IP]:8083

Then backup your z-way controller. Of note, this is also where you can remove failed nodes, and other similar tasks.

http://[IP]:8083/expert/#/network/control

The quick way to get to z-way firmware info:

to see your config, go to your server IP address:8083/expert/#/network/controller
or to upgrade, go to [IP]:8083/expert/#/uzb

Based on my controller info page, I was on version 5.04. I then went to the floating map:
https://service.z-wave.me/expertui/uzb-stats/versions-graph.html
And eventually deduced (by clicking on the nodes and sorting through the mess) that the files (and order to be installed) that I needed were:

1) first needed to update the bootloader
https://service.z-wave.me/expertui/uzb/bootloader_Razberry_from_05_04_to_8aaa_2MB.bin

2)
https://service.z-wave.me/expertui/uzb/UPD_FIRMWARE_Razberry500_from_05_04_to_05_07.bin

3)
labeled as 5.07-5.23  (discrepancy in the label and the filename versions)
https://service.z-wave.me/expertui/uzb/UPD_FIRMWARE_Razberry_from__05_07__to__05_17.bin
[note, in hindsight, there was an alternate route from 5.04 to 5.16, but also 5.16 had a text description labeling it 5.22]

4)
labeled as 5.23-5.32 (discrepancy in the label and the filename versions)
https://service.z-wave.me/expertui/uzb/UPD_FIRMWARE_Razberry_STATIC_2ch_ZME_05_17_04000002_ZME_05_20_04000002.bin

5)
labeled as 5.32-5.36 (discrepancy in the label and the filename versions)
https://service.z-wave.me/expertui/uzb/UPD_FIRMWARE_Razberry_STATIC_2ch_ZME_05_20_04000002_ZME_05_24_04000002.bin

I was able to successfully upload all of these firmwares. (via http://[IP]:8083/expert/#/uzb )
It’s a bit disconcerting that the file names and text descriptions have different version numbers.

It appears that despite appearing to have used ‘upgrading’ language, the version didn’t change after uploading all these files and having the display say upgrading. You then need to go into Network>Controller Info, and press the upgrade firmware button again, and then select some of the uploaded firmware files. I only had to do this additional step once, then the rest had to be re-uploaded and they seemed to have been applied correctly.

Before the update, the firmware info per my z-way web interface was:

Role in Network
Node Id:	1
Home Id:	0xc3b69503
Primary Role:	Yes
Primary Capability:	Yes
SUC/SIS in network:	1 (SIS)
Hardware
Vendor:	RaZberry by Z-Wave.Me
Vendors Product ID:	1024 / 2
Z-Wave Chip:	ZW0500
Firmware
Library Type:	Static Controller
SDK Version:	6.51.06
Serial API Version:	05.04
Capabillities:
UUID:	e95d15fcd29664737755476e6b2bd311
Subvendor:	0x0000
Nodes limit:	Unlimited
Capabillities:	SlM
Software Information
Version number:	v3.0.4
Compile-ID:	36b67fd3f95539b8bb512f6b48f5faac9f16d38a
Compile-Date:	2020-01-20 13:33:17 +0300
UI
UI version	1.5.1
Built date	20-01-2020 13:12:50

After the upgrade, I get the below information, with a successfully upgraded firmware

Role in Network
Node Id:	1
Home Id:	0xc3b69503
Primary Role:	Yes
Primary Capability:	Yes
SUC/SIS in network:	1 (SIS)
Hardware
Vendor:	RaZberry by Z-Wave.Me
Vendors Product ID:	1024 / 2
Z-Wave Chip:	ZW0500
Firmware
Library Type:	Static Controller
SDK Version:	6.81.01
Serial API Version:	05.36
Capabillities:
UUID:	45a79b7daa869cc0ff3a42a94fdb5bc4
Subvendor:	0x0000
Nodes limit:	Unlimited
Capabillities:	SlM
Software Information
Version number:	v3.0.4
Compile-ID:	36b67fd3f95539b8bb512f6b48f5faac9f16d38a
Compile-Date:	2020-01-20 13:33:17 +0300
UI
UI version	1.5.1
Built date	20-01-2020 13:12:50

I was eventually able to get the reported firmware version to be what I expected based on the text labels in the floating map. Given this, I think the file names are named incorrectly. I did need to re-upload a couple of the files to get the version to update in the controller info page.

I call this a success, from 5.04 to 5.36.

Grumbling:

Now, I will try restore my full openhab system from backup (had amanda set up, but haven't had to figure out how to restore it yet), but perhaps I will first try a new raspberry pi3b card.  This upgrade adventure brought to you by low voltages at the pi and a frozen rainbow screen of death (despite mutliple different very capable supplies).  I was able to eventually re-install on a fresh memory card, but kept getting low voltages warnings, and I'm hoping that I can continue with my old memory cards on a new board.  At the very least, I was able to sort out how to upgrade zway at a time of low risk, given that I was playing with a fresh openhab install anyway.  I was tempted to move to a more robust mini-pc, but then I'd have to migrate my zwave controller (designed for RPi GPIO pins) settings.  

For anyone considering the RaZberry hat vs a USB adapter, this is a big advantage for USB adapters as they are much more portable.

Cheers.

Great work, you gave me the trigger to try it again :slight_smile:
the last time I gave up at the strange version map and the wrong labels…

Now I got also everything updated!

Do you know if there is a possibility to reset the ID counter? After testing and deleting (excluding) a few devices I’v now a gap of ~20 ID’s where no devices are and I would like to fill them to have a clean ID count…

thx

On a sidenote, does anyone know if Z-Way config is compatible between Raspberry hat and USB stick ? Could I backup the former and restore to the latter?

Good job! I was thinking about firmware upgrade in Razberry shield but looking thru topics in z-way forums I’ve found that they have some issues with Razberry boards v2 (blue ones) and was afraid to do that :slight_smile: which version do you have? is it v2 blue one?
Is there any improvement in newer FW?

here is topic about dead RaZberry board - https://forum.z-wave.me/viewtopic.php?f=3422&t=31029&start=10

Unfortunately I don’t know. This time I did the updates all at a high level within the z-way web interface. I believe there is a good chance the same low-level applications work on each in that there is one set of docs for both devices.
I did a quick search of the z-way manual and it seems to apply to both UZB and RaZberry shield (as well as apparently some other licensed/embedded hardware). There is extensive documentation ov various levels of APIs, but nothing of the config application, it seems.
You’re probably already aware of these, but:
manual: https://z-wave.me/essentials
various apps: https://z-wave.me/support/downloads/

Separately, I heard back from the Razberry manufacturers, and their explaination of the discrepancy in versions (and the confusing version map) was:

Some files are hidden under token “all” - if you enter it, you will get everything from the UI.

As for descrepancy between 05_16 and 5.22, this former is in hex (our programmers are thinking in hex ;), while the latter is in decimal (for normal people ;).

I have the green board, purchased a year and half ago.

(I have a gen 5 board, btw)

Important note:
I eventually got to the bottom of my Z-Wave RaZberry troubles, and it started with the firmware upgrades on this page, I believe.
Somewhere along the process, the frequency was changed from US/Americsas to EU.
The command line script for changing the frequencies no longer worked (although you wouldn’t know it when running it). The Z-Way interface only provided the option to switch between EU/RU/CN/IN - no US.

The solution was sent to me by the z-wave.me team today. The frequency can also be changed by web interface.
Stop openhab, start z-way, and log in through port 8083
then navigate to/run

IP:8083/JS/Run/zway.ZMEFreqChange(3)

This then finally changed the frequency correctly, as evidenced by
IP:8083/expert/#/network/controller > show controller data
and I am now finally able to add and control devices.

Ugh, this was a long process to sort out!

Ben

What’s wrong with that :wink:

Just wanted to let you know I also just took the z-way route to upgrades.
The tool didn’t work with the same kind of error output.
Z-Way usually takes care of the upgrade file selection and offers the right file for upgrade.
However, at one time (on 5.22), it didn’t offer anything.
And I noticed that sometimes I have to reboot or at least restart z-way after an update, else z-way kept offering the same step again and again.

On a sidenote, does anyone own RaZberry and UZB and have you tried restoring a RaZberry-exported config to the UZB ?
Just asking in case I need to replace/migrate.

Using EU frequency is Illegal in the US. :roll_eyes:
It provides compatibility issues with existing devices too :roll_eyes:

That was a joke.

1 Like

I thought so but just wanted to be clear. Humour does not always communicate well on a forum.

I had picked up on the humor, mstorimi. Yes, the upgrading was a bit rocky, however eventually with restarts I was also able to get things updated. If anyone else runs into issues with not being able to add devices correctly after upgrading, they should look into resetting the frequency to the correct range for their localle.

Has someone tried to use the updater-tool and upgrade and was sucessfull without using z-way software?