I’m currently working on a binding for Yamaha MusicCast (multi room music player). Until now every model/device is created as a Thing. To be able to detect the other models/devices in the network, I use the REST API. That works fine and basic functionality is almost finished.
For statusupdates there is a polling job. But now the request came to implement an UDP Listener to capture the events and update the Thing. After an API call, the updates are sent via UDP every 10 minutes. Tested and confirmed via curl and netcat.
As the binding (or OH instance) will making the API calls, all UDP events will be sent to the OH instance. The received JSON contains the info and the ID of the model/device. Data needs to be dispatched to the correct model/device and thus correct Thing. When multiple models/devices are present, which model/device will capture what update?
Is the following setup a correct/good one? Create a Bridge which will be responsible for the UDP Listener. JSON will be decoded and updates sent to the linked Things. No further configuration of the Bridge is needed. Things acts as they do now (except for the polling job). Bridge can also be used get the other things instead of the REST API.
Is there a tutorial available how to setup/implement a Bridge? I could not find any. I studied other bindings but it is not yet completely clear to me.
Is the UDP Listener implementation of the Doorbird binding a good start? I understand what is happening and is comparable to other tutorials online.
Thank you for reading my extended question(s). Hopefully I have made my questions clear enough.