Events and alarms to HomeAssistant

Vicente Gisberta year ago

Hello,
Does anyone know the method of passing TRACCAR (as a plugin) EVENTS and ALARMS to HomeAssistant?

Turbovixa year ago

Include the settings below in your configurantion.yaml, you can also make a new file for this as long as it tells HA where to look.
In Traccar you must create a new user (traccar) and assign him the necessary permissions.
Once created, you must add this information to the settings that go in configuration.yaml.
Don't forget to install the Traccar Webhook add-on.

- platform: traccar
  host: XXXXXXXX
  port: XXXXXXXX
  ssl: false
  verify_ssl: false
  username: XXXXXXX
  password: XXXXXXX
  monitored_conditions: ['deviceTime', 'power', 'ignition', 'all_events']
  event: ['all_events', ]
  new_device_defaults:
  track_new_devices: true
Vicente Gisberta year ago

Yes of course. All of that was already built in. But I still don't know how to catch the events and alarms. In the developer tool events there is a form with fields to listen to events. What are the events I must subscribe to to capture traccar events and alarms?
Or what Home Assistant trigger I need to build?

The events and alarms that I want to inject to HomeAssistant are:

  • Device Inactive
  • Device Moving
  • Geofence Entered
  • Geofence Exited
  • Alarm
  • Ignition On
  • Alarm General
  • Vibration
  • Low Power
  • Low Battery
  • Geofence Enter
  • Geofence Exit
  • Tampering
Vicente Gisberta year ago

I have found some information but it is unfinished, and also does not apply to the case:

https://community.home-assistant.io/t/traccar-via-nabu-casa-webhooks/130161

Turbovixa year ago

Hello, on the homeassistant side and according to the documentation, with the statement below, HA will be able to receive all events and conditions.

Already in Traccar's mud, the user you created, you must assign to him everything you expect him to send to HA, such as: modules, geofences, events, etc.

Now what you can do with the information HA gets from Traccar is the big secret.
In HA there is no ready-made recipe, although you can perform some basic automations via the graphical interface.
For example, in my case all my HA automation is done via Node-red, including Traccar's.
For example, I have a node in node-red that basically turns on the garage lights when I enter the geofence that represents the condo I live in. I have several others.
So HA doesn't have anything ready to handle Traccar data.

######################################
 monitored_conditions: ['all_events']
 event: ['all_events']