Seite 1 von 7

Nutzt jemand HomeAssistant? [mehrere Probleme GEKLÄRT]

Verfasst: Di 25. Mai 2021, 13:09
von Toddel
Hallo...

heute kam mein Robonect und der Einbau lief problemlos...

Ich habe auch MQTT eingerichtet und war es eigentlich gewohnt, dass dort automatisch ein neues Gerät eingerichtet wird und die Rasenmährerwerte dort abrufbar sind. Das passierte leider nicht, ich musste die Sensoren manuell in die Config eintragen...

Naja, nicht ganz wie erwartet, aber funktioniert.

Nutzt hier jemand auch Home Assistant? Wie sieht Euer Dashboard aus? Steuerbefehle? Automatisierungen?

Ich würde mich über schöne Anregungen sehr freuen :wave:

Re: Nutzt jemand HomeAssistant?

Verfasst: Mi 9. Jun 2021, 09:24
von wiesenporsche
Hallo,

ja, ich nutze home assistant und robonect schon seit Jahren. Ich bin aber tatsächlich erst jetzt endlich angefangen, das mal zu verknüpfen.

Wenn ich weiter bin, kann ich gern ein Bildchen 'droppen'.

Gruß

Re: Nutzt jemand HomeAssistant?

Verfasst: Mo 26. Jul 2021, 22:39
von drexloor
Habe mir kürzlich auch ein Robonectmdul gegönnt und es jetzt in Homeassistant integriert.

Als Basis hab ich diesen Thread aus dem HA Forum genommen. https://community.home-assistant.io/t/r ... um/58180/3

Zusätzlich habe ich den Mähroboter gleich in mein Dashboard integriert.
Im Homescreen Anzeige in welchem Status sich der Mähroboter gerade befindet. Schlafen/Parken usw ist grau. Wenn er mäht wird es weiß, bei Fehlern Rot. Oben rechts die Qualität der Messer.
Screenshot 2021-07-26 223759.png
Screenshot 2021-07-26 223759.png (13.38 KiB) 2221 mal betrachtet
Bei Klick auf den Button gibt es dann ein Popup um den Roboter zu steuern.
Screenshot 2021-07-26 223851.png
Folgendes habe ich in meine Config eingetragen:

sensor.yaml

Code: Alles auswählen

- platform: mqtt
  state_topic: "automower/mower/battery/charge"
  name: "Maehroboter Batterie"
  device_class: battery
  unit_of_measurement: "%"
  icon: mdi:battery

- platform: mqtt
  state_topic: "automower/mower/stopped"
  name: "Maehroboter gestoppt"
  icon: mdi:octagon

- platform: mqtt
  state_topic: "automower/wlan/rssi"
  name: "Maehroboter wifi signal"
  unit_of_measurement: "dBm"
  icon: mdi:wifi

- platform: mqtt
  state_topic: "automower/mower/status"
  name: "Maehroboter status raw"
  icon: mdi:list-status

- platform: template
  sensors:
    maehroboter_status_lesbar:
      friendly_name: "Mähroboter Status"
      value_template: >
        {% if is_state("sensor.maehroboter_status_raw", "0") -%}
          Erkenne Status
        {% elif is_state("sensor.maehroboter_status_raw", "1") -%}
          Parkt
        {% elif is_state("sensor.maehroboter_status_raw", "2") -%}
          Mäht
        {% elif is_state("sensor.maehroboter_status_raw", "3") -%}
          Fährt heim
        {% elif is_state("sensor.maehroboter_status_raw", "4") -%}
          Lädt
        {% elif is_state("sensor.maehroboter_status_raw", "5") -%}
          Sucht
        {% elif is_state("sensor.maehroboter_status_raw", "7") -%}
          Fehler
        {% elif is_state("sensor.maehroboter_status_raw", "16") -%}
          Aus
        {% elif is_state("sensor.maehroboter_status_raw", "17") -%}
          Schläft
        {% elif is_state("sensor.maehroboter_status_raw", "18") -%}
          Wartet_auf_Garagentor
        {% else -%}
          Versuche herauszufinden was {{ states("sensor.maehroboter_status_raw") }} bedeutet
        {%- endif %}

- platform: mqtt
  state_topic: "automower/mower/status/duration"
  name: "Maehroboter Zeit im aktuellen Status"
  unit_of_measurement: "minutes"

- platform: mqtt
  state_topic: "automower/mower/mode"
  name: "Maehroboter mode raw"

- platform: mqtt
  state_topic: "automower/mower/statistic/hours"
  name: "Maehroboter Operation Hours"
  unit_of_measurement: "hours"
  icon: mdi:timer-sand

- platform: mqtt
  state_topic: "automower/health/voltage/int33"
  name: "Maehroboter Operating Voltage Robonect"
  unit_of_measurement: "V"

- platform: mqtt
  state_topic: "automower/health/voltage/ext33"
  name: "Maehroboter Operating Voltage Mower"
  unit_of_measurement: "V"

- platform: mqtt
  state_topic: "automower/health/voltage/batt"
  name: "Maehroboter Battery Voltage"
  unit_of_measurement: "V"

- platform: mqtt
  state_topic: "automower/mower/error/code"
  name: "Maehroboter Fehlercode"
  icon: mdi:alert-circle

- platform: mqtt
  state_topic: "automower/mower/error/message"
  name: "Maehroboter Fehlernachricht"
  icon: mdi:alert-circle

- platform: mqtt
  state_topic: "automower/mower/blades/quality"
  name: "Maehroboter Messerqualitaet"
  icon: mdi:terraform
  unit_of_measurement: "%"

- platform: mqtt
  state_topic: "automower/weater/data/break"
  name: "Maehroboter Wetterstop"
  icon: mdi:stop
input_select.yaml

Code: Alles auswählen

name: Maehroboter Set State
options:
  - _
  - start
  - stop
  - auto
  - home
  - man
  - eod
initial: _
icon: mdi:robot-mower
automation.yaml

Code: Alles auswählen

- id: "automower_command_mode"
  alias: Maehroboter Command Control
  trigger:
    - entity_id: input_select.maehroboter
      from: _
      platform: state
      to: start
    - entity_id: input_select.maehroboter
      from: _
      platform: state
      to: stop
  condition: []
  action:
    - data:
        payload_template: "{{ states('input_select.maehroboter') }}"
        topic: automower/control
      service: mqtt.publish
    - data:
        entity_id: input_select.maehroboter
        option: _
      service: input_select.select_option
- id: "automower_command_control_mode"
  alias: Maehroboter Command Control Mode
  trigger:
    - entity_id: input_select.maehroboter
      from: _
      platform: state
      to: auto
    - entity_id: input_select.maehroboter
      from: _
      platform: state
      to: home
    - entity_id: input_select.maehroboter
      from: _
      platform: state
      to: man
    - entity_id: input_select.maehroboter
      from: _
      platform: state
      to: eod
  condition: []
  action:
    - data:
        payload_template: "{{ states('input_select.maehroboter') }}"
        topic: automower/control/mode
      service: mqtt.publish
    - data:
        entity_id: input_select.maehroboter
        option: _
      service: input_select.select_option


Wenn Fragen sind, gerne melden.

Re: Nutzt jemand HomeAssistant?

Verfasst: Di 27. Jul 2021, 09:24
von goebelmeier
Sehr cool, eine Info fehlt mir noch :-) Welche Card ist das denn, die du für's UI genommen hast? Die gefällt mir, schön schlicht.

Re: Nutzt jemand HomeAssistant?

Verfasst: Di 27. Jul 2021, 11:50
von drexloor
Das ganze ist ein extra gestaltetes Dashboard.

Inspiriert von https://github.com/matt8707/hass-config

Der kleine Button ist mit button_card umgesetzt. https://github.com/custom-cards/button-card

Das Popup ist eine Kombination aus Bordmitteln, browser_mod und button_card. https://github.com/thomasloven/hass-browser_mod

Du kannst auch in mein Github schauen, allerdings ist der Rasenmähroboter noch nicht hochgeladen.

https://github.com/Se7enair/homeassistant-config

Re: Nutzt jemand HomeAssistant?

Verfasst: Di 27. Jul 2021, 11:54
von drexloor
Das ist der aktuelle Stand:
Screenshot 2021-07-27 115459.png

Re: Nutzt jemand HomeAssistant?

Verfasst: Mi 28. Jul 2021, 18:50
von drexloor
So, ist jetzt auch bei Github hochgeladen.

https://github.com/Se7enair/homeassista ... 4d7ab923eb

Das Popup funktioniert auch als Lovelacecard. Du musst nur die entsprechenden Karten usw. installieren.
Screenshot 2021-07-28 185143.png

Code: Alles auswählen

type: vertical-stack
cards:
  - type: grid
    columns: 1
    square: false
    cards:
      - type: entities
        entities:
          - entity: sensor.maehroboter_status_lesbar
            secondary_info: last-changed
            icon: mdi:robot-mower
          - type: custom:bar-card
            width: 55%
            height: 2em
            decimal: 0
            unit_of_measurement: '%'
            positions:
              icon: outside
              indicator: 'off'
              name: outside
            severity:
              - color: '#303435'
                from: 11
                to: 100
              - color: '#6d2525'
                from: 0
                to: 10
            entity_row: true
            entities:
              - entity: sensor.maehroboter_batterie
                name: Batterie
              - entity: sensor.maehroboter_messerqualitaet
                name: Messerqualität
          - entity: sensor.maehroboter_fehlernachricht
            name: Fehler
          - entity: sensor.maehroboter_wetterstop
            name: Wetterstop
          - type: custom:hui-element
            card_type: horizontal-stack
            card_mod: null
            style: |
              #root {
                justify-content: flex-end;
                margin: 1.7em -0.7em 0 0;
              }
            cards:
              - type: custom:hui-element
                card_type: markdown
                content: |
                  {% if states('input_number.maehroboter_pause')|int == 1 %}
                    Pause für einen Tag
                  {% elif states('input_number.maehroboter_pause')|int > 1 %}
                    Pause für {{ states('input_number.maehroboter_pause')| round(0) }} Tage
                  {% else %}
                    Keine Pause
                  {% endif %}
              - type: custom:button-card
                icon: mdi:plus
                tap_action:
                  action: call-service
                  service: input_number.increment
                  service_data:
                    entity_id: input_number.maehroboter_pause
              - type: custom:button-card
                icon: mdi:minus
                tap_action:
                  action: call-service
                  service: input_number.decrement
                  service_data:
                    entity_id: input_number.maehroboter_pause
          - type: custom:hui-element
            card_type: horizontal-stack
            card_mod: null
            style: |
              #root {
                justify-content: space-evenly;
                margin: 1.7em -0.7em 0 0;
              }
            cards:
              - type: custom:button-card
                icon: mdi:autorenew
                name: Auto
                tap_action:
                  action: call-service
                  service: input_select.select_option
                  service_data:
                    entity_id: input_select.maehroboter
                    option: auto
              - type: custom:button-card
                icon: mdi:home
                name: Home
                tap_action:
                  action: call-service
                  service: input_select.select_option
                  service_data:
                    entity_id: input_select.maehroboter
                    option: home
              - type: custom:button-card
                icon: mdi:clock-check-outline
                name: Feierabend
                tap_action:
                  action: call-service
                  service: input_select.select_option
                  service_data:
                    entity_id: input_select.maehroboter
                    option: eod

Re: Nutzt jemand HomeAssistant?

Verfasst: So 1. Aug 2021, 12:05
von Airbrando
Hi,
kannst du mir mal stück für Stück das erklären ? Ich habe im Robonectmodul das MQTT soweit eingerichtet. Was muss ich dann tun damit es genauso aussieht wie bei dir ? einen MQTT Broker habe ich in HA installiert und Robonect zeigt auch an das er Verbunden ist. Das kopieren der einträge in den entsprechenden YAML dateien funktioniert nicht. Please Help :-)

Nutzt du einen Gardena oder einen Husquarna ? Ich habe einen Gardena und liegt es evtl daran das es nicht geht ?

Re: Nutzt jemand HomeAssistant?

Verfasst: So 1. Aug 2021, 14:41
von drexloor
Hallo Airbrando,

ich nutze einen Gardena R40. Wenn die Robonect anzeigt dass er mit MQTT verbunden ist hast du schon den Großteil geschafft.

Ich habe meine Konfiguration aufgesplittet, daher wird es bei mir etwas anders aussehen als bei dir.
Hast du mqtt in Homeassistant erfolgreich eingerichtet?

Suche in deiner configuration.yaml nach einer Zeile die mit

Code: Alles auswählen

sensor:
beginnt. Darunter fügst du folgende Zeilen ein:

Code: Alles auswählen

  - platform: mqtt
    state_topic: "automower/mower/battery/charge"
    name: "Maehroboter Batterie"
    device_class: battery
    unit_of_measurement: "%"
    icon: mdi:battery

  - platform: mqtt
    state_topic: "automower/mower/stopped"
    name: "Maehroboter gestoppt"
    icon: mdi:octagon

  - platform: mqtt
    state_topic: "automower/wlan/rssi"
    name: "Maehroboter wifi signal"
    unit_of_measurement: "dBm"
    icon: mdi:wifi

  - platform: mqtt
    state_topic: "automower/mower/status"
    name: "Maehroboter status raw"
    icon: mdi:list-status

  - platform: template
    sensors:
      maehroboter_status_lesbar:
        friendly_name: "Mähroboter Status"
        value_template: >
          {% if is_state("sensor.maehroboter_status_raw", "0") -%}
            Erkenne Status
          {% elif is_state("sensor.maehroboter_status_raw", "1") -%}
            Parkt
          {% elif is_state("sensor.maehroboter_status_raw", "2") -%}
            Mäht
          {% elif is_state("sensor.maehroboter_status_raw", "3") -%}
            Fährt heim
          {% elif is_state("sensor.maehroboter_status_raw", "4") -%}
            Lädt
          {% elif is_state("sensor.maehroboter_status_raw", "5") -%}
            Sucht
          {% elif is_state("sensor.maehroboter_status_raw", "7") -%}
            Fehler
          {% elif is_state("sensor.maehroboter_status_raw", "16") -%}
            Aus
          {% elif is_state("sensor.maehroboter_status_raw", "17") -%}
            Schläft
          {% elif is_state("sensor.maehroboter_status_raw", "18") -%}
            Wartet_auf_Garagentor
          {% else -%}
            Versuche herauszufinden was {{ states("sensor.maehroboter_status_raw") }} bedeutet
          {%- endif %}

  - platform: mqtt
    state_topic: "automower/mower/status/duration"
    name: "Maehroboter Zeit im aktuellen Status"
    unit_of_measurement: "minutes"

  - platform: mqtt
    state_topic: "automower/mower/mode"
    name: "Maehroboter mode raw"

  - platform: mqtt
    state_topic: "automower/mower/statistic/hours"
    name: "Maehroboter Operation Hours"
    unit_of_measurement: "hours"
    icon: mdi:timer-sand

  - platform: mqtt
    state_topic: "automower/health/voltage/int33"
    name: "Maehroboter Operating Voltage Robonect"
    unit_of_measurement: "V"

  - platform: mqtt
    state_topic: "automower/health/voltage/ext33"
    name: "Maehroboter Operating Voltage Mower"
    unit_of_measurement: "V"

  - platform: mqtt
    state_topic: "automower/health/voltage/batt"
    name: "Maehroboter Battery Voltage"
    unit_of_measurement: "V"

  - platform: mqtt
    state_topic: "automower/mower/error/code"
    name: "Maehroboter Fehlercode"
    icon: mdi:alert-circle

  - platform: mqtt
    state_topic: "automower/mower/error/message"
    name: "Maehroboter Fehlernachricht"
    icon: mdi:alert-circle

  - platform: mqtt
    state_topic: "automower/mower/blades/quality"
    name: "Maehroboter Messerqualitaet"
    icon: mdi:terraform
    unit_of_measurement: "%"

  - platform: mqtt
    state_topic: "automower/weather/data/break"
    name: "Maehroboter Wetterstop"
    icon: mdi:stop

Wenn das erledigt ist, gehe in die Einstellungen-->Serversteuerung--> klicke auf den Button Konfiguration prüfen.
Wenn alles in Ordnung ist scrolle etwas nach unten und klicke auf "Manuell konfigurierte MQTT-Entitäten".

Wenn alles klappt solltest du die Sensoren in deiner Entitätsliste sehen.
Melde dich wenn etwas nicht klappt.

Danach gehst du zurück zu Lovelace und fügst eine neue Karte hinzu, wähle den Typ "Manuell". Lösche die einzelne Zeile mit "type:" und füge folgendes hinzu:

Code: Alles auswählen

type: vertical-stack
cards:
  - type: grid
    columns: 1
    square: false
    cards:
      - type: entities
        entities:
          - entity: sensor.maehroboter_status_lesbar
            secondary_info: last-changed
            icon: mdi:robot-mower
          - type: custom:bar-card
            width: 55%
            height: 2em
            decimal: 0
            unit_of_measurement: '%'
            positions:
              icon: outside
              indicator: 'off'
              name: outside
            severity:
              - color: '#303435'
                from: 11
                to: 100
              - color: '#6d2525'
                from: 0
                to: 10
            entity_row: true
            entities:
              - entity: sensor.maehroboter_batterie
                name: Batterie
              - entity: sensor.maehroboter_messerqualitaet
                name: Messerqualität
          - entity: sensor.maehroboter_fehlernachricht
            name: Fehler
          - entity: sensor.maehroboter_wetterstop
            name: Wetterstop
          - type: custom:hui-element
            card_type: horizontal-stack
            card_mod: null
            style: |
              #root {
                justify-content: flex-end;
                margin: 1.7em -0.7em 0 0;
              }
            cards:
              - type: custom:hui-element
                card_type: markdown
                content: |
                  {% if states('input_number.maehroboter_pause')|int == 1 %}
                    Pause für einen Tag
                  {% elif states('input_number.maehroboter_pause')|int > 1 %}
                    Pause für {{ states('input_number.maehroboter_pause')| round(0) }} Tage
                  {% else %}
                    Keine Pause
                  {% endif %}
              - type: custom:button-card
                icon: mdi:plus
                tap_action:
                  action: call-service
                  service: input_number.increment
                  service_data:
                    entity_id: input_number.maehroboter_pause
              - type: custom:button-card
                icon: mdi:minus
                tap_action:
                  action: call-service
                  service: input_number.decrement
                  service_data:
                    entity_id: input_number.maehroboter_pause
          - type: custom:hui-element
            card_type: horizontal-stack
            card_mod: null
            style: |
              #root {
                justify-content: space-evenly;
                margin: 1.7em -0.7em 0 0;
              }
            cards:
              - type: custom:button-card
                icon: mdi:autorenew
                name: Auto
                tap_action:
                  action: call-service
                  service: input_select.select_option
                  service_data:
                    entity_id: input_select.maehroboter
                    option: auto
              - type: custom:button-card
                icon: mdi:home
                name: Home
                tap_action:
                  action: call-service
                  service: input_select.select_option
                  service_data:
                    entity_id: input_select.maehroboter
                    option: home
              - type: custom:button-card
                icon: mdi:clock-check-outline
                name: Feierabend
                tap_action:
                  action: call-service
                  service: input_select.select_option
                  service_data:
                    entity_id: input_select.maehroboter
                    option: eod
Die Entitäten entsprechend deiner Namen austauschen, speichern, fertig.
Dann hast du die Weiße Karte die ich gepostet hatte. Insofern du alle Integrationen usw installiert hast die verwendet werden.

Re: Nutzt jemand HomeAssistant?

Verfasst: So 1. Aug 2021, 15:16
von Airbrando
Was merinst du mit MQTT erfolgreich eingerichet ? Ich habe den MQTT Mosquito und ich glaube das es alles richtig istr da ich meine alarmanlage eine Lupus Electronics eingebunden habe über mqtt und das funktioniert. nur den Robby bekomme ich nicht hin ???!!!

Wenn ich das so eintrage in meine configuration.yaml dann sag er mir dieses hier nach der Prüfung :

Invalid config for [binary_sensor.mqtt]: [unit_of_measurement] is an invalid option for [binary_sensor.mqtt]. Check: binary_sensor.mqtt->unit_of_measurement. (See ?, line ?).
Invalid config for [binary_sensor.mqtt]: [unit_of_measurement] is an invalid option for [binary_sensor.mqtt]. Check: binary_sensor.mqtt->unit_of_measurement. (See ?, line ?).
Invalid config for [binary_sensor.mqtt]: [unit_of_measurement] is an invalid option for [binary_sensor.mqtt]. Check: binary_sensor.mqtt->unit_of_measurement. (See ?, line ?).
Invalid config for [binary_sensor.mqtt]: [unit_of_measurement] is an invalid option for [binary_sensor.mqtt]. Check: binary_sensor.mqtt->unit_of_measurement. (See ?, line ?).
Invalid config for [binary_sensor.mqtt]: [unit_of_measurement] is an invalid option for [binary_sensor.mqtt]. Check: binary_sensor.mqtt->unit_of_measurement. (See ?, line ?).
Invalid config for [binary_sensor.mqtt]: [unit_of_measurement] is an invalid option for [binary_sensor.mqtt]. Check: binary_sensor.mqtt->unit_of_measurement. (See ?, line ?).
Invalid config for [binary_sensor.mqtt]: [unit_of_measurement] is an invalid option for [binary_sensor.mqtt]. Check: binary_sensor.mqtt->unit_of_measurement. (See ?, line ?).
Invalid config for [binary_sensor.mqtt]: [unit_of_measurement] is an invalid option for [binary_sensor.mqtt]. Check: binary_sensor.mqtt->unit_of_measurement. (See ?, line ?).

Was hat das zu bedeuten ?