Smart #1 API / Smart Home Integration

  • Deswegen denke ich es fehlt nur die richtige Programmierung.

    Ja die fehlt in Form einer HA-Integration für ABRP, die es aktuell nicht gibt.


    Bis dahin bleibt ggf. der DIY-Weg, wie im HA-Forum beschrieben. Auch wenn chriscat sagt, dass der API-Zugriff aktuell limitiert ist, haben es einzelne User offenbar hinbekommen. Das ist jedoch keine Out-Of-Box-Lösung. Du musst in deinen spezifischen Config-Dateien von HA die richtigen Einträge machen, das dürfte dem was du als „Programmieren“ bezeichnest, schon sehr nahe kommen. Zuvor brauchst du natürlich den Token. Und selbst wenn du einen funktionierenden API-Aufruf damit hinbekommst, wirst du in Folge noch zusätzliche Template-Sensoren oder Helper benötigen … auch diese müssen aktuell noch weitestgehend von Hand in den Config-Dateien von HA erstellt werden, auch wenn da mittlerweile schon sehr viel über die UI möglich ist. Ich bezweifle, dass das hier im Forum jemand übernehmen kann und ob dies in Folge für andere adaptierbar sein würde. Mein Fazit: ohne jegliche Vorerfahrungen mit YAML und REST-Aufrufen aktuell nicht machbar.

    #3 BRABUS | Laser Red Metallic + Eclipse Black

    iOS und CarPlay-Nutzer, Wenigfahrer, Smarthome-Enthusiast

  • Für den Homey Smarthome hat jemand schon eine App programmiert, da logt man sich mit den ABRP Zugangsdaten ein und dann wählt man sein Auto aus eine Liste aus, das Problem dabei ist, ich bekomme die Daten von Smart nicht in Homey.


    Deswegen denke ich es fehlt nur die richtige Programmierung.


    Aber wie gesagt ich kenne mich nicht aus

    Can you see the source code? Or is it a paid service on a website?


    For a paid website they could get an API Key without the whole world seeing it.


    In HA you can’t setup anything without having all the passwords and api keys yourself.


    I’ll ask them and share the response when ABRP answers me.

  • GitHub - martijnpoppen/com.abetterrouteplanner: A Homey app for ABRP
    A Homey app for ABRP. Contribute to martijnpoppen/com.abetterrouteplanner development by creating an account on GitHub.
    github.com


    This is the Sourcecode site, i think it is similar to HA

  • https://github.com/martijnpoppen/com.abetterrouteplanner


    This is the Sourcecode site, i think it is similar to HA

    I don’t know Homey. I see this repo is requesting the user to provide the api key


    com.abetterrouteplanner/lib/abrp/abrpOAuth2Client.js at main · martijnpoppen/com.abetterrouteplanner
    A Homey app for ABRP. Contribute to martijnpoppen/com.abetterrouteplanner development by creating an account on GitHub.
    github.com

    Code
    api_key: Homey.env.CLIENT_SECRET
    
     this.api_key = params.api_key;


    I asked directly ABRP their position on HA-like projects. They answered quickly usually.


    With this example above I suppose the hardest is already shared: a JavaScript library


    If ABRP gives api key to each user, we could make it work. I am just surprised they would answer every email but why not?

  • Obwohl für mich persönlich nicht relevant, finde ich es interessant. Danke!

    If ABRP gives api key to each user, we could make it work. I am just surprised they would answer every email but why not?

    Das hatte mich auch gewundert und jetzt glaube ich auch zu verstehen, was du meintest. Wenn die den API-Key derzeit ausschließlich per Email-Anfrage rausgeben, kann man natürlich annehmen, dass dies nicht für Endnutzer gedacht ist.

    #3 BRABUS | Laser Red Metallic + Eclipse Black

    iOS und CarPlay-Nutzer, Wenigfahrer, Smarthome-Enthusiast

  • Ich habe mir das auch schon mal grob angeschaut und wäre sehr dran interessiert da eine Verbindung zwischen HA und ABRP hinzubekommen.

    Dann mal abwarten, wie es mit den API-Keys aussieht…


    English version:

    I've already had a rough look at this and would be very interested in creating a connection between HA and ABRP.

    We'll have to wait and see what happens with the API keys...

  • ABRP’s CEO response:


    Zitat

    We issue quite a few HA API keys, but it would be much better if somebody wrote an ABRP plugin for HA so that we could share the same API key for everyone (and just have user/vehicle tokens for each user).


    So nothing is stopping us on that side.


    Nice!


    Now I’m tempted to start the work on an ABRP integration, universal for all cars.

  • That sounds great, maybe the Homey source code I posted yesterday can be used, just with adjustments for HomeAssistant.


    I experimented a bit yesterday and managed to create a connection between HA and Homey. I can see the data from the Smart but I can't transfer it to ABRP. If I read the battery SOC from my VW Tiguan Hybrid and act in ABRP as if it were the Smart, then the data from HA is sent to ABRP via Homey and updated every 5 minutes. Perhaps that will help when programming the app for HA.

  • Hallo DasBasti jetzt funktioniert die Übernahme des Stadtort des Smart1 und er wird auch schön auf der Karte angezeigt. Vielen Dank für die Anpassung. Jetzt muss ich nur noch raus bekommen das er auch meine Zonen anzeigt und nicht nur False und True. Wobei es so aussieht das False für die Home Zone steht und True irgendwie für Abwesend. Schöne wäre wenn er die jeweilige Zone anzeigen würde.


    pasted-from-clipboard.png

    Premium Meta Black Metallic uni - Interieur: Touch

    Bestellt: 12.März 2023 - Übernommen: 05.04.2023 :love:

    Auslieferort: Köln -- OS: 1.3.2 -- 20.33.10.23423.40436

  • Das ist bei mir genauso: der Smart ist bei mir das einzige Gerät, das eine device_tracker Entität bereitstellt, bei der der Zustand true/false annimmt. Alle anderen device_tracker bei mir haben entweder den Status „home“ , „not_home“ oder den Namen der zugeordneten Zone. So ist es auch in der HA Dokumentation beschrieben. Ich vermute daher dass die Integration an der Stelle noch einen Bug hat: statt true/false muss wahrscheinlich ein Mapping auf home/not_home erfolgen. Nichts was wir als user ändern könnten … aber vielleicht kann DasBasti sich bei Gelegenheit mal anschauen.


    edit: Problem ist schon bekannt und gemeldet, siehe hier:


    Problem with gps tracker · Issue #72 · DasBasti/SmartHashtag
    @DasBasti the gps tracker doesn't update automatically, the only way to get it updated is to restart the smarthashtag integration. I also tried setting on…
    github.com

    #3 BRABUS | Laser Red Metallic + Eclipse Black

    iOS und CarPlay-Nutzer, Wenigfahrer, Smarthome-Enthusiast