Skip to content

Instantly share code, notes, and snippets.

@jpawlowski
Created December 4, 2016 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpawlowski/f489decd198bc2b5d2623fd63b357970 to your computer and use it in GitHub Desktop.
Save jpawlowski/f489decd198bc2b5d2623fd63b357970 to your computer and use it in GitHub Desktop.
Extract all Homekit services and characteristics from homebridge HomeKitTypes.js
#!/bin/bash
cat /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/gen/HomeKitTypes.js |grep "^Service."|grep -v UUID | cut -d "." -f 2 | cut -d " " -f 1 | uniq | sed ':a;N;$!ba;s/\n/,/g'
echo " "
cat /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/gen/HomeKitTypes.js |grep "^Characteristic."|grep -v UUID | cut -d "." -f 2 | cut -d " " -f 1 | uniq | sed ':a;N;$!ba;s/\n/,/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment