From c153024c91277acda15fd05f639055544d54c3e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathana=C3=ABl=20L=C3=A9caud=C3=A9?= Date: Thu, 23 Nov 2017 15:53:44 -0500 Subject: [PATCH] Corrections to node-red-node-discovery (#380) 1- Ensure we stop advertising before creating a new advertiser if the object exists 2- Allow bool false to stop advertising 3- Documentation correction (state is in msg.payload, not in msg) --- io/mdns/README.md | 4 ++-- io/mdns/mdns.html | 4 ++-- io/mdns/mdns.js | 5 +++-- io/mdns/package.json | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/io/mdns/README.md b/io/mdns/README.md index e494b886..1fb22c62 100644 --- a/io/mdns/README.md +++ b/io/mdns/README.md @@ -32,7 +32,7 @@ service discovery capability. `msg.payload` contains the service object on both arrival and leaving. -`msg.state` contains boolean true or false depending if the service has arrived (true) or gone away (false).. +`msg.payload.state` contains boolean true or false depending if the service has arrived (true) or gone away (false).. Within the `msg.payload` object the most interesting things are: @@ -48,7 +48,7 @@ For a full list of official service types see [this list](http://www.dns-sd.org/ Provides a Bonjour / Avahi / Zeroconf announcement node. -If `msg.payload` is 0 - the announcement is stopped. Any other value starts the announcement process. +If `msg.payload` is `false` - the announcement is stopped. Any other value starts the announcement process. The announcement can be customised by the msg if not configured in the edit panel. diff --git a/io/mdns/mdns.html b/io/mdns/mdns.html index bd1a32f1..1d0dab51 100644 --- a/io/mdns/mdns.html +++ b/io/mdns/mdns.html @@ -18,7 +18,7 @@