Xeoma motion detection using HA event

I like an arms-distance separation between commercial software - like Xeoma - and other things, like Home Assistant. So I have Xeoma signal an HA event using the HA API. To start, you have to create a long-lived token in HA. You can cut off Xeoma’s access to HA at any time by deleting the long-lived access token.

In Xeoma, add an Application Runner module after the motion detector module. Use these settings

application: /usr/bin/curl
parameters: -X POST -H "Authorization: Bearer <long-lived token>" -H "Content-Type: application/json" http://<HA-server-url>:8123/api/events/<HA-event-name>

This is a linux path for curl. In Windows it depends on how you installed curl. The parameter includes the long-lived access token you created in HA. The event name is whatever you make up.

In HA I set up an automation to listen for the event and run a script

- alias: Front porch alarm
  trigger:
    - platform: event
      event_type: <HA-event-name>
  action:
    - service: script.turn_on
      entity_id: script.<script-name>

The event name is completely arbitrary - try not to use a name that’s already an event in HA. The log will show the events when they’re fired in Xeoma. You can test it by from Xeoma by clicking the Test link in the Application Runner setup window. You can have multiple events from one camera (if you have multiple Motion Detectors) and events from multiple cameras. I tend to name the events <camera_name>_<motion_detector>. For example, front_door_porch for the front door camera with a motion detector just on the porch.