Getting hub address in edge driver

While I can assume that the hub Z-WAVE address is usually 1, I want add generality to my driver. I have tried the following, but the hub address returned is always nil.

local do_configure = function(self, device)
  local hub = self.environment_info.hub_zwave_id

how do I reliably get the hub’s z-wave address?

Thanks

There are some lifecycles where the hub node id hasn’t been populated yet. One solution there is to put a delay in your code to give it time to populate.

I have at least one instance in a driver where I drilled down through the device to get to the hub node id. It’s been a while, but I might have found that it was populated earlier there.

local hub = device.driver.environment_info.hub_zwave_id
1 Like