I have an R2D2 droid by Sphero that’s long been discontinued. After a lot of custom dev on this little guy, I was able to connect to him using a python bluetooth library. Some gracious soul sniffed the traffic and wrote a wrapper so I can send it commands. I did that and then had the script register a custom MQTT device in HA. So, now it can receive commands from HA and report back certain things. I took it a step further and wrote a wrapper around all the python using my native language (F#).
Now, I would like to try and get this working natively using just HA. However, I cannot get the bluetooth integration in HA to force a connection to R2 and I don’t think it would just magically know what commands to send/use, so I know I’ll have to stick with my python script but not sure how to tie all these things together. Does anyone have any ideas?
I have one too. If I could have this thing to ‘beep bo’ when something in HA happens, the family would freak out! lol Would be awesome if this was in HACS.
@TeDeVPrime and @bptworld Sorry for the late reply! I have been quite distracted lately and HA took a back seat. I would be happy to help you get setup! You can find me on discord! I sent you both a DM with my email.
It’s more of a hack really than an actual integration. I modified a python library that talks to the droid and put in all the necessary MQTT config to have Home Assistant pick it up as a device.
I have the python script running on my HA machine (not in HA) with a Bluetooth connection to R2. When it finds and connects to the droid it starts sending/receiving MQTT communication.
See if you can get going using this repo. It’s my fork of a library I used it to get started. I modified it a bit to fit my MQTT needs for the HA integration. I was going to modify the library directly, but decided to just make a couple .py scripts for the MQTT/HA integration.
Since I don’t have very much experience with Python packages and distribution I’m trying my best to put what I did into a repo for you to look at. So, apologies for the delay.