VERA Edge ID number of devices

I understand that the ID number of every new device that is included in the VERA Edge controller is always increased by one from the last used one. This mean that the old IDs of possible excluded devices are never used.

This implies, specially when one is testing new devices and in newbies installation that the ID number is increasing very fast. For putting an example, I own a total of only 30 devices including “parents” and “childs”, but the last ID number assigned was 120 !!! 8)

Is 256 the limit of devices VERA Edge supports? or is 256 the highest ID number a device can take in VERA Edge?

Most important, is there any way to reset the ID numbers re-using the excluded and so, non used and free ID numbers without having to do a “factory reset” of the controller and having then to re-include all the devices and re-define all the scenes, alertes, commands, parameters, procedures, etc. etc. already defined?

Thanks.

IIRC, the Vera device number is at least a signed 32-bit integer in current firmware (it may even be unsigned), and so can grow quite large (over 2 billion if signed, over 4 billion if unsigned–even if it’s only a 16-bit integer, that would still be a minimum of 32767 devices). The Z-Wave node number is smaller at 8 bits unsigned, but the number of Z-Wave nodes is usually much smaller, and these are reused, so unless you try to jam more than 250 Z-Wave devices into your Edge’s configuration, you’re unlikely to have an issue there.

There is a number of device numbering schemes in the vera so you will have to distinguish and treat them accordingly:

  1. The zwave device id. It is under the parameter “altid” of the device. This enumeration is managed by the zwave chip/radio and runs its own firmware. It is limited to 232 devices and the numbering starts at 1 (the radio itself) and goes up 1 at a time until you reach 232 and then goes back to 1 and assigns unassigned numbers from there. each zwave network is therefore limited to 231 devices+the radio.
  2. The vera host controller itself enumerates a separate device parameter “id” which from what I can tell is likely limited to 65532. It includes all devices on the vera: zigbee, plugins, virtual and child devices. There is a hidden parameter in your user database: “Device_Num_Next” which you can change in order to bring it back down if you have a lot of unused numbers below your highest device id. You can do so by running the lua code: luup.attr_set("Device_Num_Next", *the number you want to set*)

I believe this is documented somewhere between the wiki and the forum. It is regrettable that the device numbering is not better managed but ALTUI helps a great deal…

3 Likes

Thanks so much for your answer. Being a newbie in this Z-Wave and VERA world it was somehow a problem to be cleared and you did it.

Thanks again and kind regards

Did Vera change something in the recent firmware, this doesn’t seem to work any longer?

As far as I can tell, nothing has changed. What is not working?

On related topic and just to give credit when credit is due. @akbooer on the zway bridge for openluup has come up with a device ID scheme which binds the ID with the zwave node ID. Something vera never thought of and which I am finding brilliant.

Quotes again?

luup.attr_set("Device_Num_Next", *the number you want to set* )
1 Like

Sigh… how many times do we need to get caught by this before we stop doing it. Maybe the forum auto formatting should change this behavior. @Sorin?

@rigpapa is most likely right on the money.

1 Like

I’ll give it a shot again, most likely my ignorance. Installing alt hue and didn’t want to re-enumerate but oh well.
Seems to make sense for the IDs to be the same when possible.
It would also be nice if the forum could handle code snippets like Slack does.

I tried this code but it did not work… Anyone that has managed to change this ???

Please be a bit more descriptive. What are you expecting it to do? What did it not do that you wanted?

OK.
I had some gaps in my device ID numbers because of some failures.
If I include a new device the device ID will be 357
I want to change it into 351. I am 100% sure that 350 is the last “active” device ID.
So I put the luup code into the test luup code field as follows:

luup.attr_set("Device_Num_Next",351)

But that did not work. When I include a new device the ID is 357 in stead of 351

OK. After issuing the above command, request this in a browser:

http://your-vera-ip/port_3480/data_request?id=user_data&output_format=xml

Then use your in-page search feature of your browser to find “Device_Num_Next” and confirm it has the right value. If it does not, re-issue your Lua command like this: luup.attr_set("Device_Num_Next",351,0). Then repeat the request above and confirmation here.

Then, before creating your device, reload Luup.

If that still doesn’t work, try setting the attribute to 350 instead of 351…

Edit: you can also search the above user_data output to ensure some device hasn’t sneakily robbed you of 351…

1 Like

Then, before creating your device, reload Luup.

This!

You need to reload luup after inputing the code.

The vera only reads this parameter during the luup loading so changing it without reloading will not work. It will have the parameter it had the last time it loaded.

1 Like

@rigpapa (and @rafale77): I again tested it now with the luup reload. That did the trick, now it works !!
Many thanks again

2 Likes

Hi @rafale77, just regarding your comment. Not having AltUI, how the luup is reloaded?, only restarting the VERA controller? And… should it be done per each code we send using the app test of can we put the different codes we want to be executed (Heal, wakeup, polling, etc. and the ONE and only one restart of the controller?

Regards and thanks again for all your help in the forum….

There are many places to reload luup in the UI. You can go in the zwave menu and there is a reload engine button in there. There is also one in the apps/develop apps menu, I think under the serial thing. I think you can also send a lua test command luup.reload()
Sorry I will let someone else help, I don’t have a vera UI available to look at anymore.

Settings > Z-Wave Settings > Advanced.

Reload Engine is second from bottom

C

Thanks, @Catman and @rafale77, I was doing a reboot in Net&Wifi… so, I understand this should be a faster way to do it.

Still my other question, should I do it each time I send a code thru the apps test or after all the codes have been sent?

Thanks again

regards

That’s going to depend on the code. Most of the time, no.

C

1 Like