This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Traccar as "nil value"

I tried making the Traccar location-script working, but ended up with an error log that stated:
User script:3: attempt to index global 'traccar' (a nil value)

I followed the instruction as much as I could ( Geolocalization with LM based on Traccar service | Logic Machine platform for KNX/EIB, EnOcean, Modbus, DALI, BacNet (

Furthermore, I'd like to try to make a script so that, when I leave "home", I get a message via Telegram. I do believe, when the traccar scripts are up and running, this might be fixed.

Hope you can help

Thanks in advance!
The scheduled script is missing require('user.traccar') at the top. But it probably won't work anyway because this example is very old.
Traccar has a Telegram notification feature out of the box so LM is not needed for this:
So the geolocation via Traccar doesn't work anymore?
Is there any other solution?
The telegram message was only for testing if it worked. The purpose is for knowing when i was home or not, for several features in my coding.
It can work but the script must be modified according to current Traccar API. Another thing that it uses demo server which is not meant to be used for such integration. So you will either have to run a Traccar instance on your own server or use a paid account.

A possible solution for home/away detection is to get the WiFi registration table from your router. We have a working example for MikroTik devices:

Forum Jump: