I am implementing a new OH2 binding which uses a USB-serial coordinator (bridge) to integrate devices.
After the bridge has been discovered and confirmed by the UI, control of the serial communication is passed from the DiscoveryService to the BridgeHandler.
After a new startScan is called, new devices are discovered from the network by the BridgeHandler, who receives notification of new devices from the serial port.
Therefore from BridgeHandler I want to call ‘thingDiscovered’ , but this method is only available on the DiscoveryService class.
Any suggestion on how to get a reference to the DiscoveryService from the BridgeHandler class?
Is this the right way to implement discovery of new devices ?
thanks a lot for any help!