Skip to content
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

HomeAssistant Mqtt Discovery #3

Closed
zivillian opened this issue Oct 30, 2023 · 10 comments · Fixed by #36
Closed

HomeAssistant Mqtt Discovery #3

zivillian opened this issue Oct 30, 2023 · 10 comments · Fixed by #36

Comments

@zivillian
Copy link
Owner

https://www.home-assistant.io/integrations/mqtt/#mqtt-discovery

@SvenAbels
Copy link

Ich habe die Sensoren nun manuell eingebunden, aber ein HomeAssistant mqrtt-Discovery wäre hervorragend. :)

@zwoabier
Copy link

@SvenAbels Kannst du deine ha config für das einbinden der Sensoren hier teilen?

@SvenAbels
Copy link

SvenAbels commented Apr 23, 2024

Kein Problem. Folgendes habe ich in die configuration.yaml von HomeAssistant eingefügt:

mqtt:
  sensor:
    - name: "Ora Batteriestand"
      state_topic: GWM/42475611304685XXXX/status/items/2013021/value
      unit_of_measurement: "%"
      device_class: battery
      state_class: "measurement"
      unique_id: "1234537899879993"
    - name: "Ora Reichweite"
      state_topic: GWM/42475611304685XXXX/status/items/2011501/value
      unit_of_measurement: "km"
      device_class: distance
      state_class: "measurement"
      unique_id: "1234537899879992"
    - name: "Ora Kilometerstand"
      state_topic: GWM/42475611304685XXXX/status/items/2103010/value
      unit_of_measurement: "km"
      device_class: distance
      state_class: "measurement"
      unique_id: "1234537899879991"
  binary_sensor:
    - name: "Ora Ladevorgang aktiv"
      state_topic: GWM/42475611304685XXXX/status/items/2041142/value
      device_class: battery_charging
      unique_id: "1234537899879995"
      payload_on: "1"
      payload_off: "0"

Damit lassen sich die Entitäten dann in HomeAssistant gut visualisieren:

image

image

@zivillian
Copy link
Owner Author

Jemand hat eine Liste der Telematic Codes veröffentlicht: https://gist.github.com/bossoq/194a40fc239a7428a3e539e4e382d941
Dort sind alle Codes (von meinem Auto) außer 2011501 (Reichweite) und 2042071 enthalten.

#16 (comment)

@moryoav
Copy link

moryoav commented Dec 17, 2024

No problem. I added the following to the configuration.yaml of HomeAssistant:

mqtt:
  sensor:
    - name: "Ora Batteriestand"
      state_topic: GWM/42475611304685XXXX/status/items/2013021/value
      unit_of_measurement: "%"
      device_class: battery
      state_class: "measurement"
      unique_id: "1234537899879993"
    - name: "Ora Reichweite"
      state_topic: GWM/42475611304685XXXX/status/items/2011501/value
      unit_of_measurement: "km"
      device_class: distance
      state_class: "measurement"
      unique_id: "1234537899879992"
    - name: "Ora Kilometerstand"
      state_topic: GWM/42475611304685XXXX/status/items/2103010/value
      unit_of_measurement: "km"
      device_class: distance
      state_class: "measurement"
      unique_id: "1234537899879991"
  binary_sensor:
    - name: "Ora Ladevorgang aktiv"
      state_topic: GWM/42475611304685XXXX/status/items/2041142/value
      device_class: battery_charging
      unique_id: "1234537899879995"
      payload_on: "1"
      payload_off: "0"

This makes it easy to visualize the entities in HomeAssistant:

How do I get the vehicle ID for this configuration? I assume that "42475611304685XXXX" is the vehicle ID?
Trying to set this up in home assistant and I'm not sure how to proceed from here...

@zivillian
Copy link
Owner Author

zivillian commented Jan 8, 2025

Ich habe HA Discovery für die bekannten Werte ergänzt.

Kann das jemand mit den Binaries aus dem PR testen? Um das zu aktivieren muss entweder die config neu erstellt werden, oder manuell die YAML Datei erweitert werden:

...
Mqtt:
  ...
  HomeAssistantDiscoveryTopic: homeassistant

So sieht das bei mir aus:
grafik

@MagicBugsBunny
Copy link

Ist das im Docker Image schon aktualisiert?
Könnte einfach einen neuen HA aufsetzten und es dann jungfreulich testen.

@zivillian
Copy link
Owner Author

Bisher nicht, das wird nur vom master gebaut

@MagicBugsBunny
Copy link

Hab es mit den neuen Windows Files und einer neuen HomeAssistant Installation getestet.
Funktioniert.
Hab mich zuerst gewundert warum kein neues Gerät erkannt wurde.
Ist aber dann einfach ohne Meldung als Gerät unter MQTT da.

image

@zivillian
Copy link
Owner Author

Danke für's Testen - ich habe den PR abgeschlossen, damit gibt es jetzt auch ein aktuelles Docker Image (zivillian/ora2mqtt:main)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants