-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Will bluetooth now work? #5
Comments
The hardest part is not HA side, currently I have not figured out how to simulate/fake a bluetooth signal to turn on XGIMI |
Updates: |
I'd love to see this if you can get it working, unfortunately I don't have any BT experience but commenting to stay subscribed to this issue. |
I don't have a solution either but I started a thread as well in the XGIMI Elfin forum (would probably make sense to start in other forums as well with many members): https://www.facebook.com/groups/xgimielfin/posts/864061654795310/?comment_id=864101604791315&reply_comment_id=864118484789627¬if_id=1670170784048565¬if_t=group_comment_mention |
I also have an XGIMI projector and I would like to be able to turn it on via the Home assistant. Can this video help in any way? |
I solved it for the XGIMI Elfin 🥳🥳🥳 It has worked for several weeks now. Have a look at my answer here for more instructions. The only time I wasn't able to turn on the projector was after it had been off for a couple of days. On this occasion a non-paired remote control was still able to turn the projector on, so maybe there's one more advertising scenario I may have not yet understood. But I will have to wait for a couple of days again leaving the projector off before I can further explore this. It's also possible that on this special occasion maybe the BLE advertising app just didn't work properly. To be continued... |
Thanks for sharing, that's really a breakthrough. Could you elaborate more on how to get UUID and Manufacturer Specific Data by scanning the remote? |
@manymuch You're welcome. For the Xgimi Halo+ there's now also the BLE information available thanks to the contribution of Muxa. To sniff the information needed I used ubertooth BLE sniffer device with a command like this ubertooth-btle -f -t1C:F3:01:B9:81:99 (the MAC address of the remote control can be easily figured out beforehand). Because the ubertooth was too expensive I didn't keep it, instead I have now ordered a Nordic Semiconductor nRF52840 USB-Dongle which I hope will do work in a similar manner. You might also be able to get all needed information using a BLE app on your phone. There are a couple available in the app stores and I was also able to see a signal from the XGIMI remote including manufacturer data if I recall right, but it wasn't a very straightforward way to run an analysis. Another potentially sufficient approach without the need of an extra BLE sniffer device could be bluetoothctl which is part of BLUEZ for linux: https://stackoverflow.com/questions/36607626/how-to-use-bluetoothctl-like-hcitool-lescan-to-report-repeated-proximity-beacons With hcitool you might be successful as well but hcitool commands only work up to BLE 4.0 devices. You can find such USB dongles for a few bucks online. I ordered one with CSR 8510 A10 chipset (Qualcomm) but haven't found time yet to experiment more with it. |
@manymuch I added additional comments here also regarding BLE sniffer experience with Bluetooth Smart Scanner App . The initial post in this thread also refers to this sniffer app. With such app you might not even need a separate BLE sniffer device. |
Updates: I powered on my Xgimi projector(z6x) succesfully through EFR connect. |
Thank you for the update @manymuch and congratulations! I think I had also been successful with Bluez turning the projector on but right now I'm not able to replicate my previous success. At least I can provide you with some commands that I think work to run advertising signal (just adapt for your data): bluetoothctl [bluetooth]# menu advertise When you purchase an old BLE 4.0 USB dongle with Cambridge Silicon Radio chipset (it should show Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode) when you run lsusb) you can use hcitool commands which maybe work better than bluetoothctl, but maybe your raspberry bluetooth chipset also supports hcitool. I haven't had time yet to further look into options to use my linux device to turn on the projector. |
@helgek Success!!! Using exactly your command(except for manufacturer data), I am now able to power on the projector from my raspberrypi, it seems replicable for now, need more times to verify. |
@manymuch So great to hear this!! I think with my Intel NUC integrated bluetooth adapter it's not this reliable or maybe it has something to do with the Bluez version or something else 🤷 I'm looking forward to more updates from you when you have completed more testing! It's so nice to see that this BLE topic gains pace now, will also interesting to see if this might also find its way into Home Assistant's recent Bluetooth implementation efforts |
@manymuch btw, I never found this XGIMI app that you mentioned in your initial post. Maybe it could provide additional insights into BLE commands being exchanged/sent between remote and projector. additional note: I also added your finding to the Stackoverflow thread |
Update: I have implemented the poweron command into the xgimi integration. The ble advertisement is based on bluez-peripheral. The new integration has been released as v0.0.2 |
@helgek to answer your questions:
|
Hi. Company ID:0x0046 On a diffarent way, is it possible to use the HDMI CEC signal as a more reliable power-on signal than BLE? |
@uni-uni-77 Of course, but HDMI CEC is not suitable for everyone and also requires additional hardware. Besides, my XGIMI z6x does not support HDMI CEC :( |
@manymuch thanks a lot for your integration update and the interesting insights you provided! In addition: I can't thank you enough for providing these UDP commands in your integration! I was about to try to run a a bluetooth keyboard emulation on my Intel NUC device which would have been a far less preferable option for several reasons. I will try your integration later and let you know how it works for me. Regarding reliability I had also mixed experience with Bluez but I can't tell if the issues are related to Bluez or the BLE adapter. Hopefully it will become clearer by the time, maybe also with more users sharing their experience. I've e.g. had the impression that Bluez would sometimes not stop advertising even though I had sent the stop command. Similar experience I also had at least once with the Bluetooth Smart Scanner App on my Android device. So possibly the issues are more software-related than hardware-related. Maybe an idea which could help to increase reliability: Maybe one could check the power on status of the projector in your integration and repeat the BLE advertisement until a positive response. |
@uni-uni-77 thank you for sharing your findings! I updated the [Stackoverflow thread] (https://stackoverflow.com/questions/69921353/how-can-i-clone-a-non-paired-ble-signal-from-a-remote-to-trigger-a-device/75551013#75551013) to include the information for this projector as well. Also the information regarding existing HDMI CEC implementation projects is really interesting. My projector is connected to a soundbar which doesn't send a power on command but I'm now wondering if maybe an HDMI splitter could be used to connect the projector to an additional device which would send the power on command. For the moment in my setup I think I will be satisfied enough with the BLE advertisement solution but maybe at some point I'd also be interested to have a closer look at this alternative approach. |
@helgek Hi, could you kindly provide your hardware information? I’m currently running HaOS 9.5 on a virtual machine and attempting to use an Intel 3168 Bluetooth adapter, but have encountered some errors:
Would you be able to share any relevant information about your system specifications? Thank you. |
Is there anyone tried to use ESP32 as ble server to broadcase the power on signal? |
@giuem bluetoothctl seems to be quite buggy and unstable from what I've experienced so far. I had similar errors and often it helped to simply restart the system. I think for the moment if one seeks for a stable advertisement solution an ESP32 based solution as just mentioned by sasukebinbin could be the more reliable approach. Alternatively you could look into using the older hcitool commands which work with older bluetooth dongles (as outlined in my previous post ). I added one such older BLE4.0 dongle to my Intel NUC setup but I haven't found time yet to run more tests. Find more info e.g. My Intel NUC is this one. The bluetooth adapter is this according to lsusb: Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP) |
@sasukebinbin Here is the a reference using esphome to send ble advertisement. |
Thanks for the reference. But it's a bit difficult to understand. Cause I think he is just giving an example on using 2 ESP32 to run as Client and Server. But actually we just need a Server to advertise. Not good at C++... |
The hardcoded manufacturer code doesn't work at all on my xgimi H3 projector with mainland China firmware. So I guess I might need another one? |
@netweaver1970 for initial validation if power on works for your projector using the manufacturer data you captured I suggest using an android device with EFR Connect. The required settings in this app can be found here. Once this has hopefully worked out successfully there will be a better starting point to look into the BLE power on integration from manymuch and investigate potential reasons why you haven’t been successful with it . |
Then my app config, I tried both codes listed above |
@ouchkilljoys sorry I didn't come back on this yet. I just had and have to many things on the table at the moment but I will try to follow-up later. @muxa The Xgimi Z4 Aurora might have similar additional challenges regarding BLE advertising like Xgimi Halo+ . Do you maybe have additional suggestions for ouchkilljoys regarding how he could further investigate the BLE signal coming from the Z4 Aurora remote control since only using manufacturer code doesn't seem to work. Thanks! |
Hi. Just recently purchased a Horizon Ultra. Tried the above steps to get the power on functionality to work but no success. I used the iOS "Bluetooth Smart Scanner App" to generate a token which was "8C4290B4AB59A7942288E6755A66A130" but it didn't work. Then I noticed that all the tokens for the other projectors end with the characters "FFFFFF3043524B544D" which makes me think I must have done something wrong. Does anyone perhaps have an idea of what I am doing wrong? Any assistance would be greatly appreciated. Thanks. |
Hi. By way of an update, I tried a different app to get the Horizon Ultra token and this time it was "929C044313C40CFFFFFF3043524B544D" which seems to match the format of the other model tokens listed above. But it still didn't work. |
Hi. After some more tinkering, it turns out the token for the Horizon Ultra is "9B511C4E68E490FFFFFF3043524B544D" and that works. Confirmed working with:
|
Hello! Please tell me does anyone have a key for XGIMI AURA? Thanks! |
@gunionbag Congratulations 🥳 |
How did you get the right code in the end? I'm still struggling with my xgimi z4 aurora :( |
Hi ouchkilljoys, This is the process I used. I don't know if it is the best way, but it's what worked for me.
And somehow miraculously that process worked for me. The key was getting the token from the Raspberry PI when it was running the "bluetoothctl" command from the terminal. Although as I said above, I don't know why the token I just discovered was different to the one I originally posted above. Maybe that is the token for "poweroff", no idea really. Anyway I hope that helps, good luck and post back your findings in the hope that in might help others who are looking to do the same thing. |
Actually, while I'm here I might as well ask a question I had. Was tinkering over the weekend and discovered the "Remote: Send command" service also worked with the "home" command as well as the "poweron" command. Although what I really want to do is be able to change the input select of the projector to HDMI2. Does anyone have any ideas on how to achieve that with the Horizon Ultra projector? |
Hello, for my Horizon 1080, the token is : 839acd5b9d1d60ffffff3043524b544d I put it here, it can be usefull ;) |
Is that the H2? |
No one here has RS Pro 2? |
have you figure it out now, I've RS Pro 2, too. |
Try the new release v0.0.7 to see if |
This really helped me out, thank you! The one thing I’ll note is that I couldn’t get the data to appear in terminal until I completely powered off the projector, then it showed up instantly! Probably wasted 2 hours trying haha. Hopefully this helps someone else! |
Great to read about additional successes! Regarding the advertising data changing slightly with every turning on and off of the projector you can also check out my comment here which potentially provides an additional puzzle piece to why this happens: #38 (comment) |
I have HORIZON Pro and made it turn on using BLE advertisment thanks to the integration! But Im still struggling with other commands that should be by UDP. I tried all of them and only "poweron" works. Any ideia whats could be the problem? |
switch on is working (ble proxy) but ports are closed:( |
With the release of 2022.8.0 that includes bluetooth control is there a way we can get this to work with Xgimi?
The text was updated successfully, but these errors were encountered: