Anyone with the above mentioned ear buds? I have a decoder pretty much ready, but due to the lack of owning any such devices I cannot test it any further to finalise it
So anyone interested to help with finishing the decoder, which would publish the model, colour, state and battery levels of the right and left AirPods and case and their charging states, let me know.
You can go to the web upload page and install the pre-built binary lilygo-ble from today’s development test built with SHA: 9be4f6
and turn Auto-discovery OFF after the gateway starts – to avoid any unwanted Discoveries if you are using a discovery aware controller with your MQTT broker - and set Advanced and Advertising Data to true, both by using MQTT Explorer’s Publish section, the gateway’s HA UI, or the gateway’s WebUI Console’s sections entry option.
Monitoring the MQTT messages for your AirPods you should see messages like
{"id":"AA:BB:CC:DD:EE:FF","mac_type":1,"adv_type":2,"manufacturerdata":"4c000719010f2022f78f0000046d76f585d3d734d966a6c87d65c17cfb","rssi":-94,"brand":"Apple/Beats","model":"AirPods (Pro)/Solo|Studio Buds","model_id":"APPLEAIRPODS","type":"BODY","track":true,"version":"AirPods Pro","color":"white","status":"Both AirPods in case","batt_r":100,"batt_l": 100,"batt_case":100,"charging_r":false,"charging_l":false,"charging_case":false}
Particularly the the keys "version" (for your two different AirPods Pro generations) , "color" (for Beats Buds), "status" and the battery levels and charging states would be good to verify and possibly extend by owners of these earphones, as I’ve only based the decoder on theoretical information at the moment. Whenever you get something with ?? in the value string, or with the value "thus far unknown - please report your xxx", just copying the whole message with the included manufacturer data will greatly help in extending the decoder with correct versions, colours, states etc. data.
Hi, sorry for the delay in responding. I do have a few questions. First, I’m not sure I’m running the latest build. Does the “info” page report the “version” as the SHA reference? Here is what I show:
version “67e506”
Second, I’ve let this publish to my Home Assistant Mosquitto broker. I’ve turned off discovery through the HA interface to the gateway, but I’m not sure how/where to set “Advanced and Advertising data to true”. I do pick up MANY devices that I can see using MQTT Explorer, but none seem to be apple. I’d be happy to PM you what I see.
The test build for the AirPods is overwritten every night by the nightly development builds, which are without the AirPods test decoder included. I have just started the AirPods test build again now, and it will be available from the above linked test build page with SHA: 9be4f6 in about 50 minutes from now, until it is overwritten again around 2:30 UTC the next morning.
You can also set the Advanced and Advertising Data to true in the gateway’s HA interface, under BT: Publish Advertisement data
Once you get a chance to install the SHA: 9be4f6 build and turn on the above option for the Advertisement data, you should also have your AirPods recognised, and any unknown states would be great to receive by PM, as I received your other devices’ messages.
The MAC address will likely randomly change for the AirPods, as it also does for iPhone, iPad and Apple Watch, that’s why I asked you to turn of discovery in HA, as not to have your discovery in-box filled with many random MAC AirPods discoveries. Once the decoder is ready to merge we will include instructions on how to get the Identity MAC address along with the Identity Resolving Key for the AirPods, similar to the instructions for iPhone and Apple Watch. This can then be used with the Identity MAC Resolving functionality with Theengs Gateway (HA Add-on), and if and when this functionality might also be included into OpenMQTTGateway in the future.
Got that installed an running and here is the data now that I let it sit for a while:
52B039AF1677 = {“id”:“52:B0:39:AF:16:77”,“mac_type”:1,“adv_type”:3,“manufacturerdata”:“4c00071901062000f58f015c007d7863dd4c2026d1cfb8fe1a344f24cf”,“rssi”:-91,“brand”:“Apple/Beats”,“model”:“AirPods (Pro)/Solo|Studio Buds”,“model_id”:“APPLEAIRPODS”,“type”:“AUDIO”,“track”:true,“version”:“thus far unknown - please report your model version”,“color”:“thus far unknown - please report your color”,“status”:"thus far unk…
Thanks @Ray_K , that is great. If you could post the whole messages, along with which model of AirPods they are, and what state (both outside of case, only right AirPods inside the case, only left inside the case … ), assuming that all AirPods colours are white, and if the battery levels correspond with what it shows on your iPhone/Mac, the same with the charging states whne the Airpods are being charged inside the case, and/or if the case is being charged.
I assume the above beginning message was from your AirPods Pro 2nd gen?
Thanks to @Ray_K 's great help and testing with his AirPods Pro (1st and 2nd gen.) the decoder has now been merged into Theengs Decoder.
For the various non-Pro AirPods models and the different Beats Solo and Studio Buds, with their many available colours, there might be some decoder adjustments necessary in the future.
I assume the decoder will also work with Apple AirPods Max and the Beats Solo/Studio Pro, but it needs to be seen with some data samples for them, as they obviously do not have a case and different battery levels for left and right.