Package Exports
- homebridge-airplay-watcher
 - homebridge-airplay-watcher/dist/index.js
 
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (homebridge-airplay-watcher) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Homebridge Airplay Watcher
This Homebridge plugin allows you to watch for devices starting or stopping playing airplay audio. For each device, a motion detector is exposed that becomes active when audio is played, and inactive when no audio is being played.
Configuration
The easiest way to use this plugin is to use homebridge-config-ui-x. To configure manually, add the AirplayWatcherHomebridgePlugin platform in your config.json file. Then, add devices to monitor:
{
"platform": "AirplayWatcherHomebridgePlugin",
  "devices": [
    {
      "name": "The name of the device as configured in the Apple Home app (case sensitive, spaces are supported)., e.g. 'My AirportExpress'."
    }
  ]
}Technicalities
The plugin monitors UDP traffic for MDNS records from Airplay devices. Certain Airplay MDNS TXT records include a bitmask which allows predicting the device's state (playing or not). For this to work, Homebridge needs to run on the same network as the Airplay device.
See airplay-music-watcher, homebridge-airport-express-playing, and this thread on reddit for similar approaches and further information.