The Traccar binding integrates Traccar GPS tracking server with openHAB, enabling real-time vehicle/device tracking, geofencing automation, and comprehensive location monitoring.
Traccar is an open-source GPS tracking system that supports over 200 GPS protocols and 2000+ GPS tracking devices.
Features
Real-Time Position Tracking — GPS coordinates, altitude, speed, course, accuracy, GPS fix validity, street address with optional Nominatim reverse geocoding
BLE Beacon Tracking — Track up to 4 Bluetooth Low Energy beacons per device (RSSI, distance, battery, temperature, humidity) with MAC address routing for consistent slot assignment
Geofencing Automation — Instant geofence entry/exit events via webhooks — perfect for garage doors, lights, security
Dual Update Mechanism — Polling (configurable interval, min 10s) + Webhooks (real-time position every 1-2s during movement)
Distance Tracking — Odometer, totalDistance, and trip distance with automatic protocol-aware handling (Teltonika, OSMand, H02, GT06)
Advanced Reverse Geocoding — Nominatim integration with worldwide transliteration, multi-language support, intelligent caching, and rate limiting
rule "Open Garage on Arrival"
when
Item FamilyCar_GeofenceEvent changed to "geofenceEnter"
then
val geofenceId = (FamilyCar_GeofenceId.state as Number).intValue()
if (geofenceId == 1) {
logInfo("Garage", "Car arriving, opening garage door")
GarageDoor.sendCommand(ON)
}
end
If I type http://hxxxxxx.stratoserver.net:8082 in my browser, traccar server shows me a login screen and with the username and password I am able to log in.
With the settings above, server thing is offline.
The log suggests authetication failure.
2026-03-23 14:14:30.234 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'traccar:server:stratoserver' changed from OFFLINE (COMMUNICATION_ERROR): Authentication failed to UNKNOWN
2026-03-23 14:14:30.285 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'traccar:server:stratoserver' changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): Authentication failed
With your suggestions I have made progress.
To spare others some time, here are my findings …
The webhook port has to be different from the port on the traccar server on which it is listening,
and the ids for the devices that are reporting to the traccar server have to be looked up on the traccar gui.
to reach the gui of my traccar server I use this url:
I have all my devices now reporting in OH, but I am still struggling with my geofence.
While every leaving and entering is reported in traccar app, the channels regarding geofence In OH are all NULL. The rule below has never fired, as geofenceEvent_P is not changing when entering or leaving.
Am I missing a setting that has to be done on the traccar side?
Number geofenceId_P "Geofence ID P [%d]" <none> {channel="traccar:device:myserver:human_2:geofenceId"}
String geofenceName_P "Geofence Name P [%s]" <none> {channel="traccar:device:myserver:human_2:geofenceName"}
String geofenceEvent_P "Geofence Event P [%s]" <none> (gGeofenceEvent) {channel="traccar:device:myserver:human_2:geofenceEvent"}
val java.util.Map<Integer, String> geofenceMapping = newHashMap(
1 -> "PresenceHomeGps" // Home-Geofence
// 2 -> "PresenceWorkGps" // work-Geofence
)
rule "set_geofence_switches"
when
Member of gGeofenceEvent changed
then
val suffix = triggeringItemName.split("_").last
if (suffix != "P" && suffix != "S" && suffix != "Q" && suffix != "V") {
logWarn("presence.rules", "set_geofence_switches: Unbekanntes Suffix '"+suffix+"' in "+triggeringItemName)
return;
}
val geofenceIdItem = ScriptServiceUtil.getItemRegistry.getItem("geofenceId_"+suffix)
val geofenceId = if (geofenceIdItem.state instanceof Number)
(geofenceIdItem.state as Number).intValue
else -1
logInfo("presence.rules", "set_geofence_switches: Person="+suffix+
", Event="+triggeringItem.state+
", GeofenceId="+geofenceId)
val switchPrefix = geofenceMapping.get(geofenceId)
if (switchPrefix === null) {
logInfo("presence.rules", "set_geofence_switches: Kein Mapping für GeofenceId "+geofenceId)
return;
}
val presenceSwitch = ScriptServiceUtil.getItemRegistry.getItem(switchPrefix+"_"+suffix)
if (presenceSwitch === null) {
logWarn("presence.rules", "set_geofence_switches: Switch '"+switchPrefix+"_"+suffix+"' nicht gefunden")
return;
}
if (triggeringItem.state == "geofenceEnter") {
presenceSwitch.sendCommand(ON)
} else if (triggeringItem.state == "geofenceExit") {
presenceSwitch.sendCommand(OFF)
}
end
I have made significant progress.
My traccar server is hosted by Strato, my openhab server is local.
Obviously the traccar server can’t see local IP addresses.
After setting up an ssh tunnel which will automatically reestablished if it might fail everything is working as expected.
i am now trying to fine tune the settings in the traccar client app to track my presence.
The possibilities utilizing your binding are incredible.
Thank you for your time!