Appearance
discovery-service
Provides a discovery service to allow other network participant to discover your machine.
Description
This script uses then createNetDiscoverEndpoint()
function to create an UDPv4 and an UDPv6 discovery endpoint that answers the broadcast sent by the RESOL Discovery Tool.
If you combine it with the discovery-client
script be aware that the fetchDeviceInformation()
function will not be able to get device information from your local machine and will print multiple results for each IP address the broadcast was responded over.
Since the script does not need an actual RESOL VBus data source to work, it can be run using a virtual
connection.
Service
None
Example
Config:
typescript
export default defineConfig({
connections: [{
kind: 'virtual',
}],
scripts: [
import('../scripts/discovery-client'),
import('../scripts/discovery-service'),
],
});
Running it in the toolbox:
shell
❯ bin/resol-vbus-core-toolbox.ts --config configs/above-config-saved-to-file.ts
- ??? (192.168.xxx.xxx):
- Device-Info:
- Addresses:
- 192.168.xxx.xxx
- ??? (fe80::xxx:xxxx:xxx:xxxx%en0):
- Device-Info:
- Addresses:
- fe80::xxx:xxxx:xxx:xxxx%en0
- ??? (fe80::xxx:xxxx:xxx:xxxx%en11):
- Device-Info:
- Addresses:
- fe80::xxx:xxxx:xxx:xxxx%en11