Skip to content

Signal K mDNS records published via avahi carry no TXT data #182

Description

@mairas

Follow-up from #181.

Signal K's own mDNS responder attaches a TXT record to every advertisement (src/mdns.js, the txtRecord object): txtvers, swname, swvers, roles: 'master, main', self (the vessel MRN), and vname / vmmsi / vuuid when set.

The records configure-container-routing publishes through avahi carry <type> and <port> only. Clients that follow the Signal K DNS-SD conventions use roles to choose between servers and self to identify the vessel, so on a device where the server's responder is disabled those clients see a record they cannot classify. SensESP does not read TXT, so the reported symptom in #181 is fixed either way.

txtvers, swname and roles are static and could go straight into the avahi service file. self and the vessel fields are the hard part: only the running server knows the vessel MRN, and the routing configurator writes the file before the container starts.

Options worth weighing:

  • A prestart hook that reads the server's own uuid out of the data volume and writes the TXT elements. Couples the record to Signal K specifically, which the generic routing.mdns mechanism deliberately is not.
  • A small helper the app can call once it is up, to add the TXT keys to its own record.
  • Accept the gap and document that non-SensESP clients configure the server address manually.

Nothing here is urgent; it is the part of the old behaviour the replacement does not reproduce, and it should be a decision rather than an omission.

Activity

  1. mairas commented on Sep 20, 2026

    @mairas
    ContributorAuthor

    Moot. This tracked the TXT keys lost when avahi published Signal K's records instead of the server. We have reverted that (halos-org/halos-marine-containers#259), so the server advertises for itself again and carries them.

    Verified on a test device after the revert:

    _signalk-wss._tcp -> <host>.local:4430
     txtvers=1 swname=signalk-server swvers=2.32.0 roles=master, main self=urn:mrn:signalk:uuid:... vuuid=urn:mrn:signalk:uuid:...
    

    Reopen if an app with no responder of its own ever needs TXT records through routing.mdns; avahi service files do support txt-record entries, and the generator emits none today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions