Avahi

In order to find running nymea instances in the network, nymea registers the offering services in the network. Nymea provides different avahi service types for clients to pick the considerated one.

The nymead offers following service types:

  • _ws._tcp: This service indicates that there is a websocket server running. The information needed for connecting to this server are provided in the txt record of the service, address and port properties.
  • _http._tcp: This service indicates a running webserver. The information needed for connecting to this server are provided in the txt record of the service, address and port properties.
  • _jsonrpc._tcp: This service indicates a TCP server running the nymea JSON-RPC API. The information needed for connecting to this server are provided in the txt record of the service, address and port properties.

Perform a network discovery

Assuming you have avahi-discover and avahi-utils installed, you can run following command in order to search for nymea systems in your network:

$ avahi-browse -arl | grep -P '^=' -A 4 | grep "IPv4 nymea-" -A 4

=  wlan0 IPv4 nymea-http-secure                             Web Site             local
   hostname = [nymea.local]
   address = [10.10.10.121]
   port = [443]
   txt = ["uuid={c82f7b33-d283-44f0-85df-6e7992dcf9e6}" "name=nymea" "sslEnabled=true" "jsonrpcVersion=1.4" "manufacturer=guh GmbH" "serverVersion=0.9.0"]

=  wlan0 IPv4 nymea-http-insecure                           Web Site             local
   hostname = [nymea.local]
   address = [10.10.10.121]
   port = [80]
   txt = ["uuid={c82f7b33-d283-44f0-85df-6e7992dcf9e6}" "name=nymea" "sslEnabled=false" "jsonrpcVersion=1.4" "manufacturer=guh GmbH" "serverVersion=0.9.0"]

=  wlan0 IPv4 nymea-tcp-default                             _jsonrpc._tcp        local
   hostname = [nymea.local]
   address = [10.10.10.121]
   port = [2222]
   txt = ["uuid={c82f7b33-d283-44f0-85df-6e7992dcf9e6}" "name=nymea" "sslEnabled=false" "jsonrpcVersion=1.4" "manufacturer=guh GmbH" "serverVersion=0.9.0"]

=  wlan0 IPv4 nymea-ws-default                              _ws._tcp             local
   hostname = [nymea.local]
   address = [10.10.10.121]
   port = [4444]
   txt = ["uuid={c82f7b33-d283-44f0-85df-6e7992dcf9e6}" "name=nymea" "sslEnabled=false" "jsonrpcVersion=1.4" "manufacturer=guh GmbH" "serverVersion=0.9.0"]