Benötige bitte Hilfe für Automation von Mosquitto Broker

Hallo HA-Gemeinde,

ich benötige mal wieder eure Hilfe bei einer Automation.

Einmal pro Woche lasse ich meine FritzBox über eine Automation neu starten – das funktioniert auch einwandfrei. Leider habe ich danach das Problem, dass sich mein Mosquitto Broker aufhängt und ich ihn manuell neu starten muss.

Jetzt würde ich gerne eine Automation erstellen, die den Mosquitto Broker nach dem Neustart der Fritzbox automatisch neu startet.
Da ich bisher nicht lange mit Home Assistant arbeite und meine Kenntnisse noch sehr begrenzt sind, wollte ich euch fragen, wie ich das am besten umsetzen kann.

Vielen Dank schon mal im Voraus für eure Hilfe!

Hi, teile mal bitte deine Automatisierung, dann müssen wir das Rad nicht neu erfinden und können die vorhandene Automatisierung dahingehend erweitern, dass der Broker auch neu gestartet wird.

1 „Gefällt mir“
alias: Fritz Neustart
description: ""
triggers:
  - trigger: time
    at: "03:00:00"
conditions:
  - condition: time
    weekday:
      - fri
      - tue
    after: "02:59:00"
    before: "03:01:00"
actions:
  - action: notify.pushover
    metadata: {}
    data:
      message: Fritz Restart
      data:
        type: announce
        methiod: vibrate
  - device_id: d77719d21554442249305bc
    domain: button
    entity_id: 536d3f8997a9437e864cd525
    type: press
  - device_id: 68f5009080f1bb15a06c0bcb
    domain: button
    entity_id: 5236de49ab629889eecd7666
    type: press
mode: single

Ich hoffe Du einst das damit, ID ist gekürzt :grimacing:
Ist die Fritz Box und der Fritz Repeater

ich kann Dir jetzt nicht bei der Automation helfen aber warum lässt Du Deine Box einmal in der Woche Neustarten?

Da die Fritz wenn Sie lange läuft Probleme macht. Ist aber ein bekanntes Problem bei Fritz Box und habe ich schon Jahre lang.

Moin, probier mal meinen Vorschlag. Hier in einer separaten Automation.

alias: Test Fritzbox Neustart
description: ""
triggers:
  - type: not_connected
    device_id: 412xx18f4884d3f0963186e8c21497fc
    entity_id: d6cc2dc5b9e609437b58adcf2bb773f5
    domain: binary_sensor
    trigger: device
    for:
      hours: 0
      minutes: 0
      seconds: 30
conditions: []
actions:
  - action: notify.persistent_notification
    metadata: {}
    data:
      message: Die Fritzbox wurde neu gestartet
  - action: hassio.addon_restart
    data:
      addon: core_mosquitto
    enabled: true
mode: single

2 „Gefällt mir“

Das sollte so funktionieren wie Stefan_HA geschrieben hat. Du willst aber bestimmt beides in einer Automatisierung haben, daher habe ich einfach nochmal deine und die von Stefan in einer Automatisierung zusammengefasst.

Denke mal der Conditionsteil müsste so passen, dass wirklich nur Dienstag und Freitag um 3.00 Uhr geprüft wird.

alias: Fritzbox Neustart Kombiniert
description: ""
triggers:
  - id: fritz_unreachable
    type: not_connected
    device_id: 412xx18f4884d3f0963186e8c21497fc
    entity_id: d6cc2dc5b9e609437b58adcf2bb773f5
    domain: binary_sensor
    for:
      seconds: 30
    trigger: device
  - id: scheduled_restart
    at: "03:00:00"
    trigger: time
conditions:
  - condition: or
    conditions:
      - condition: trigger
        id: fritz_unreachable
      - condition: and
        conditions:
          - condition: trigger
            id: scheduled_restart
          - condition: time
            weekday:
              - fri
              - tue
            after: "02:59:00"
            before: "03:01:00"
actions:
  - choose:
      - conditions:
          - condition: trigger
            id: fritz_unreachable
        sequence:
          - data:
              message: Die Fritzbox wurde neu gestartet
            action: notify.persistent_notification
          - data:
              addon: core_mosquitto
            action: hassio.addon_restart
      - conditions:
          - condition: trigger
            id: scheduled_restart
        sequence:
          - data:
              message: Fritz Restart
              data:
                type: announce
                method: vibrate
            action: notify.pushover
          - device_id: d77719d21554442249305bc
            domain: button
            entity_id: 536d3f8997a9437e864cd525
            type: press
          - device_id: 68f5009080f1bb15a06c0bcb
            domain: button
            entity_id: 5236de49ab629889eecd7666
            type: press
mode: single
2 „Gefällt mir“

Danke euch beiden, kann es aber erst später Testen, mein sohn Zockt gerade.:wink:

Gebe bescheid :heart_hands:

1 „Gefällt mir“

@Stefan_HA @jayjojayson Funktioniert Klasse, vielen Dank.