how can I send the contents of an entity via xmpp or a matrix notification? For example, the entity is image.ipcam_sued_person (frigate) and contains a snapshot. jpg.

how can I send it as an image with xmpp.

message: { ???} or with path: ???

  • boebbele@feddit.deOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 months ago

    I know how to send images with xmpp. The problem is that the file name changes with every new snapshot. The entity image.ipcamsued_Person contains this current snapshot.

    The question now is: how can I send the contents of this entity via xmpp. Do I have to read it out first and save it as a jpg?

    • Railison@aussie.zone
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 months ago

      Ok! So if you look at the attributes for image.ipcamsued_Person, what do you find listed? Hopefully a file path will be visible

      • boebbele@feddit.deOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 months ago

        I managed it:

        alias: Frigate - Notification
        description: ""
        trigger:
          - platform: mqtt
            topic: frigate/events
        condition:
          - condition: template
            value_template: "{{ trigger.payload_json[\"type\"] == \"end\" }}"
        action:
          - service: notify.jabber
            data:
              title: "Kamera {{trigger.payload_json['after']['camera']}} "
              message: >-
                Objekt {{trigger.payload_json['after']['label']}} erkannt von Kamera
                {{trigger.payload_json['after']['camera']}}.
              data:
                path: >-
                  /mnt/sandisk1TB/frigate/clips/{{trigger.payload_json['after']['camera']}}-{{trigger.payload_json['after']['id']}}.jpg