在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:alessandroaime/homebridge-ueboom开源软件地址:https://github.com/alessandroaime/homebridge-ueboom开源编程语言:JavaScript 100.0%开源软件介绍:Homebridge UE Boom (Speaker Plugin)This is an accessory plugin for Homebridge allowing to turn on and off a UE Boom speaker and integrating it with HomeKit. InstallationHomebridgeFirst, install Homebridge and sudo npm install -g homebridge
sudo apt-get install bluez Then install this plugin: sudo npm install -g homebridge-ueboom Homebridge DockerIn case you're using Homebridge Docker, add the following line to your container startup script: apk add --no-cache bluez-deprecated Then install this plugin: sudo npm install -g homebridge-ueboom Find out the MAC addressTo get the plugin working you have to provide the following parameters:
In case you don't know how to retrieve the MAC address of the speaker:
To retrieve the MAC address of the host, it strictly depends on the device you're using. If you're playing music from an iPhone/iPad then you can find it in ConfigurationCreate a {
"bridge": {
"name": "Homebridge",
"username": "E5:B9:0D:64:1E:CB",
"port": 51826,
"pin": "031-45-154"
},
"description": "This is an example configuration file with homebridge-ueboom plugin.",
"accessories": [
{
"accessory": "UEBoomSpeaker",
"name": "Bathroom Speaker",
"speaker": "C0:28:8D:45:28:55",
"host": "4098ADA356C4"
}
],
"platforms": []
} Breaking change: in case you're transitioning from v0.0.1 or v0.0.2, update your config file with the newly requested variables! How does it workSince more than one person asked me how this works and that the speaker doesn't connect to the Pi after being turned on, I thought I could spend a couple of words about. This is the command that does the whole work, everything else is just boilerplate code for the homebridge plugin: gatttool -i hci0 -b $SPEAKER_ADDRESS --char-write-req -a 0x0003 -n ${HOST_ADDRESS}01 The I don't know the exact specifications so this is pure speculation: the speaker itself has the usual Bluetooth 4.0 module that allows to stream music, in addition to that there's also a BLE (Bluetooth Low Energy) module that for its own nature is always on and allows to turn the speaker on and off remotely (within range). The only reason why I'm not sure this is the real reason is that the two modules would probably have two separate MAC addresses, and from what I've observed there's only one single address available. How I did itI knew that the speaker could be turned on remotely (within range) using the proprietary Ultimate Ears app, and it was obvious that the bluetooth command was sent by the application itself. I first installed Apple's Bluetooth logging profile on my iPhone, then connected it to the Mac via USB and used PacketLogger to trace the packages sent from the phone (specifically From here I retrieved the MAC address of the speaker (as described above) and used ContributorsSpecial thanks go to:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论