-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Home Assistant Add-On #82
Comments
Das würde mir auch gefallen!!👌 |
I created a similar repo TeslaBle2Mqtt-addon that starts this proxy together with TeslaBle2Mqtt. Someone could make an addon fairly easily just for this proxy by removing the "2Mqtt" part and its related configuration. |
Ich habe es gerade mal installiert aber bekomme mit meinem vorhandenen usb blenden keine Verbindung zum Auto.BLE ist aber in ha drin. 2025/01/29 17:09:55 INFO Publishing topic=tb2m/tb2m/uptime/state access path=uptime state=90 old_state=0 |
Does TeslaBleHttpProxy work on your hardware without the addon, running it directly? This might be problem because you are using usb dongle. |
Sorry, I have no idea how this works in proxmox. Im running HA Supervised with Rpi 3B+ and bluetooth that comes with it. |
Ist nicht schlimm das du das nicht weisst.Sicher ist das der usb komplett in der VM durchgereicht wird. Im Linux Vm läuft ja der proxy auch.Frage kann man nicht angeben in der programmierung auf was dr proxy alles zugreifen soll? |
If it runs in the VM i think the problem is related to docker/homeassistant. Maybe it is not forwarding USB devices correctly. Can you try installing this addon locally and set |
Wie meinste lokal zu installieren? |
sehe nur das im log: 2025/01/29 18:50:24 INFO received command=connection_status ERRO can't connect to vehicle error="failed to scan for vehicle: ble: failed to scan for XP7YGCES9RB368880: skt: can't read hci socket: broken pipe" |
Can you build my fork https://github.com/Lenart12/TeslaBleHttpProxy/ in your Linux VM and check if that works? Maybe one of my new commits breaks the proxy on your vm. |
Ich hab jetzt ihr repo neu gebildet in meiner normalen vm.Da funktioniert auch das senden des keys zum Auto und das verbinden. 2025/01/29 19:10:40 INFO TeslaBleHttpProxy 2.0.3 is loading ... |
Jetzt ist die frage ob der dongle schon in ha verwendet werden darf? |
2025/01/29 19:30:19 INFO Starting TeslaBle2Mqtt Fehler bleibt bestehen. |
025/01/29 19:42:13 DEBU disconnect vehicle (B) |
2025/01/29 19:47:34 DEBU received handler=ProxyCommand method=GET url=/api/proxy/1/vehicles/X-----------/body_controller_state from=127.0.0.1:35464 Ich sitze im Auto und schick es los. |
This is good. It means your usb dongle is working, so we solved the container issue and run in to a new one. I think I broke adding keys in my commits... I will look at the code and see where it goes wrong. |
Super das es mit dem dongle jetzt schonmal funktionieren würde.Bin für weitere tests bereit.Musst nur bescheid sagen. |
I think I fixed it :^) Please check v0.0.3 of the testing addon. |
Super Schlüssel erstellen hat geklappt. Jetzt bekomme ich aber noch keine Daten in Mqtt. |
Restart after adding keys. Can you show me logs again |
2025/01/29 20:18:20 DEBU waiting for command |
2025/01/29 20:19:19 DEBU waiting for command |
Its saying your key is not paired with the vehicle. Maybe delete the keys and retry the pairing process? I'm unsure what would be other problem. |
Er meint glaub mein zweites auto.die vin kommt auch noch vor im log. |
das sagt Chatgpt: Genau! Es scheint, als wäre der direkte Zugriff auf das Bluetooth-Gerät über /dev/hci0 in der Docker-Umgebung eine einfachere und stabilere Lösung, wenn du mit BLE arbeitest. Hier sind einige Gründe, warum der direkte Zugriff oft die bessere Wahl ist: ✅ Vorteile des direkten Gerätezugriffs (via /dev/hci0) Wenn du mit Bluetooth-Services wie bluetoothd arbeitest, die bereits auf D-Bus basieren (wie bei komplexeren Anwendungen oder in Systemen, die nicht direkt auf die HCI-Adapter zugreifen können). |
Teste das gerade in meiner anderen vm.Bis jetzt scheint es zu laufen. Aber mal abwarten. |
Hm that is strange because config is practically the same when comparing HA configuration and docker compose configuration. Can you test if:
|
Ohne device kann er ja bluetooth nicht mehr ansprechen richtig? |
The two I listed is what is different from HA configuration. It used to work without specifying bt devices in docker and also without sys_admin. |
Ah ok.Werde es mal nach und nach testen was passiert.Aber muss sagen heute hats bis jetzt am besten funktioniert, mit den Einstellungen. |
so ich hab es gerade getestet. Ohne device kommt sofort broke pipe. services: cap_add:- NET_ADMIN- SYS_ADMIN
|
Muss meine Aussage revidieren. net admin und sysadmin muss an sein da läuft es.Ohne hab ich keine Verbindung hinbekommen. |
Und was mir auffällt ist wenn ich in evcc ein zweites Auto integriere und einer angeschlossen ist der andere nicht. Wird überhaupt kein Auto gefunden.Geb ich nur eins ein gehts sofort. das ist in der nicht HA VM: 2025/02/02 10:27:33 ERRO stop retrying after 3 attempts error="failed to connect to vehicle (A): failed to find BLE beacon for LRW3E7FS8PC709491 (Se6a1153e0565dfc8C): can't scan: received scan response a8:51:ab:0c:43:3a with no associated Advertising Data packet" |
Hello @Trunks1982. I have added a new feature to the proxy, which will now allow specifiying which bluetooth adapter to use via its mac address. This means it is no longer a problem if you have multiple adpaters or it is on hci1. |
Super ich werde es testen und berichten. |
Bei mir startet die website nicht und ich kann hci0 nicht bennenen, da meckert er sofort. |
You dont name "hciX" but the BD address (MAC) of the adapter. You can get it with |
Wo finde ich das? |
Ah jetzt ist es aufgetaucht. |
Hmm.. To me this indicates no HCI device is passed to your container. |
Can you try to disable one of the device in HA and then try again with BLE test tool? |
Muss nochmal gucken wenn ich später zu hause bin. |
Hmm now both adapters show up. Did you change anything? input/output error normaly indicates hardware issue or multiple software interfearing with eachother. Maybe simple restart and unplugging adapters will fix it 🤞 |
So der stick wurde umgesteckt aber wird vom addon nicht gefunden auf hci1.In Ha funktioniert er. |
Zu früh gefreut.Jetzt läuft gar nichts mehr mit dem addon.Kann es auch nicht mehr stoppen, weil er meint da läuft noch was im hintergrund. Irgendwie ist es jetzt schlechter geworden. Das addon bringt mein ganzes System durcheinander.Konnte auch nicht mehr HA updaten. |
Hier steht glaub alles geschrieben wie HA das macht: https://www.home-assistant.io/integrations/bluetooth/ |
Would you be willing to add configuration files to make this docker container available as a Home Assistant add-on?
https://developers.home-assistant.io/docs/add-ons/
Some people run evcc.io as a Home Assistant Add-on - it would be conveniant to just be able to run TeslaBleHttpProxy as an Add-On as well.
The text was updated successfully, but these errors were encountered: