Gateway name field in discovery callback


I have been using z-ware api now for a while and now reached to a point that I have multiple gateway in my network and I have to figure out a way to understand in the discovery callback which one of the discovered ZIP gateways are the desired one, I have noticed zwnet_gw_discvr_cb_t is passing array of gateways name as gw_name but there are no further information about how to set that name on the gateway side. if you could help me with setting the name on zip gateway side it would be much appreciated or else if you could show me a way to differentiate gateways from one another. (like getting some information about the hosted machine of ZIP gateway)


The gw_name should be something like: Static Controller [c46b56d40100]._z-wave._udp.local. The information in the square brackets is [HomeID,NodeID,EpID]. The HomeID will be different for each gateway on the LAN. But be aware that the HomeID will change when you reset the gateway.

I suggest you start connecting 1 gateway and discover it. Now you can change the name and location using zwep_nameloc_set (REST API: /zwep_nameloc). When you now call zwnode_get_ep (REST API: zwnode_get_ep_list) you get the name and location. But be aware that zwep_nameloc_set won’t change the service name “Static Controller [c46b56d40100]._z-wave._udp.local”.

you can now connect the second gateway and also configure it with name and location.

I hope this helps,


Thanks for the reply Carsten, after my zwnet_gw_discvr_cb gets called I get the gw_addr_cnt greater than 0, gw_addr with the correct value but still gw_name pointer is null. note that in my ZIP log I keep getting this error that might be related to not to getting the gw_name correct:

Sep 18 12:22:57 multi-gateway user.notice zipgateway: ^[[0m^[[33;1m361668037 mDNS package is cropped

although on zwnet_gw_discvr_start I pass use_ipv4 true and use_mdns_for_discovery false. if I set the use_mdns_for_discovery true the callback will return with gw_addr_cnt equal to zero.

again setting the address and name for all the endpoint would be kind of pointless since I have to initialise the endpoints to discover which gateway I am talking to.

I have noticed on ZIP config file you can set the manufacturer id and model Id, is there a way to extract that information out of the gateway? eventually I am trying to give the controller node an specific identifier so I can recognise if zip controller node is running on local machine or not.


Unfortunately I dont think it is possible to give a zip gateway a specific identifier. This is why I suggest to connect the gateways to the LAN one at the time. Then you know what gateway you discover and you can configure a name for it.

I think the manufacture name and product type/ID in the zipgateway.cfg file is used in the Manufacture Specific CC. But this will require that you connect to the gateway and won’t be part of the zwnet_gw_discvr.

I suggest you try with a clean RaspberryPi SD image. Maybe the problem is related to some changes you have made?

On my RaspberryPi I get the names. I however need to wait a few minutes after booting the pi otherwise the names will be blank. Also I am using the REST API.

you can also try to discover the gateways using DNS. Try running this on the pi terminal: dns-sd -B _z-wave._udp. Now you should see something like: Static Controller [c46b56d40100]._z-wave._udp.local. Now you can get further information with: dis-sd -L “Static Controller [CHANGE]._z-wave._udp.local”.


In fact I am not using a raspberry pi but in fact I am running on a box with ARM926EJ-S processor. Unfortunately I dont have too many tools on the box including dns-sd or dis-sd. I am using zware on non portal mode since I am using it just as a library to my app so there is no REST api as well.

I have try this on multiple gateways but I get the same response, still if I activate mDNS no gateway will be found.

I believe I can still get the mac address for each ip address in the discovery callback and compare them with local host, but still I think there should be at least some metadata in the zip config that should be exposed and send to the zware client on discovery callback, maybe that is a feature that can be added.


Hi Ali,

As also posted on the other thread. If you have access to the DevKit, I suggest you send this type of questions directly to Sigma support. They can help you in more details as you have the DevKit and NDA. So they can discuss things beyond what is available here on Public Z-Wave.


Okay sure, will send an email to sigma support as well.