eclipse-sparkplug / sparkplug

Sparkplug
Eclipse Public License 2.0
115 stars 39 forks source link

Question: New Device Discovery #492

Closed yhseanhsu closed 12 months ago

yhseanhsu commented 1 year ago

What do you want to know?

Hello,

I was hoping to get some clarification on the spec regarding the device lifecycle.

In the scenario that a gateway device (e.g. a Sparkplug node in my implementation) discovers new edge devices and onboards a new device dynamically, how would one send a new DBIRTH message when the spec requires the node to send all DBIRTHs after NBIRTH.

[tck-id-payloads-dbirth-order] All DBIRTH messages sent by an Edge Node MUST be sent immediately after the NBIRTH and before any NDATA or DDATA messages are published by the Edge Node.

Do I have to rebirth all NBIRTH and DBIRTH messages when a new device is detected?

Thanks

Is this related to a Sparkplug Listing request? If so, link the issue from https://github.com/eclipse-sparkplug/sparkplug.listings here.

No response

Version

None

Accept EFTL Terms

bryce-nakatani commented 1 year ago

Thank you for reaching out.

I don't know the history of this requirement and I'm aware of it in the 3.0 specification.

Your implementation should be fine.

If one of your new devices adds or changes a template definition, your online edge node will have to publish an NDEATH and in the next NBIRTH, publish the template definition additions and changes followed by DBIRTHS of all the online devices.

On Mon, Nov 6, 2023 at 9:36 AM Sean Hsu @.***> wrote:

What do you want to know?

Hello,

I was hoping to get some clarification on the spec regarding the device lifecycle.

In the scenario that a gateway device (e.g. a Sparkplug node in my implementation) discovers new edge devices and onboards a new device dynamically, how would one send a new DBIRTH message when the spec requires the node to send all DBIRTHs after NBIRTH.

[tck-id-payloads-dbirth-order] All DBIRTH messages sent by an Edge Node MUST be sent immediately after the NBIRTH and before any NDATA or DDATA messages are published by the Edge Node.

Do I have to rebirth all NBIRTH and DBIRTH messages when a new device is detected?

Thanks Is this related to a Sparkplug Listing request? If so, link the issue from https://github.com/eclipse-sparkplug/sparkplug.listings here.

No response Version

None Accept EFTL Terms

  • I agree to the terms of EFTL

— Reply to this email directly, view it on GitHub https://github.com/eclipse-sparkplug/sparkplug/issues/492, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEF6AZVTOLTMQ7MBIVHCQV3YDENZLAVCNFSM6AAAAAA674JW4SVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3TSNRYHE2DCMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

yhseanhsu commented 12 months ago

Hi Bryce

Thanks for the response.

In the case that I'm not using the template definitions, is there a easier way to handle this situation?

For example, is it within spec to simply just send a new DBIRTH whenever a new device is detected? I'm currently using a gateway that dynamically discovers nearby bluetooth devices.

Having to send a NBIRTH and the DBIRTH chain can be quite annoying for the reader when there is many devices connected to the gateway.

Thanks

bryce-nakatani commented 12 months ago

If you're not using template definitions (or the templates are predefined and don't change), you can publish a new DBIRTH when your device is detected. That's within spec.

Just note that if your online device changes configuration (if this is possible), publish a DDEATH prior to publishing the DBIRTH.

On Tue, Nov 28, 2023 at 10:08 AM Sean Hsu @.***> wrote:

Hi Bryce

Thanks for the response.

In the case that I'm not using the template definitions, is there a easier way to handle this situation?

For example, is it within spec to simply just send a new DBIRTH whenever a new device is detected? I'm currently using a gateway that dynamically discovers nearby bluetooth devices.

Thanks

— Reply to this email directly, view it on GitHub https://github.com/eclipse-sparkplug/sparkplug/issues/492#issuecomment-1830411462, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEF6AZTVO3QCIRWZOLPPCGTYGYSCVAVCNFSM6AAAAAA674JW4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZQGQYTCNBWGI . You are receiving this because you commented.Message ID: @.***>