Device_tracker via http json post

I already have sensor data coming in to HA from an external http json post working perfectly.

Is there any way to do this for the device_tracker component? I have tried but no new device_tracker devices appear.
I get the following response from the http component in the logs

INFO (MainThread) [homeassistant.components.http] Serving /api/states/device_tracker.coryphone to (auth: True)

There seems to be no errors.

My main reason for this is I am sending info on my phones state using tasker. I want to be able to track this device so as far as I can tell it has to be in device trackers. I am sending the latitude and longitude data. Currently the json data I am sending is as below

Is it even possible currently?

I do something similar, I’ve used Tasker for about 3 years to send location and for the last 6 months or so send it into HA. I found the easiest way to do this was to use the gpslogger device_tracker and send the data in the format it expects.

In my case I send the data in the format I always have which goes into Node-Red and then I convert it into the format the gpslogger component expects.

1 Like

Perfect that did the trick.

For future reference in tasker I used the HTTP Get action with the following settings:

Server:Port: http(s)\\
Path: /api/gpslogger?latitude=%lonlat1&longitude=%lonlat2&device=myphone&battery=%BATT&api_password=blah

In home assistant I used the gpslogger component


Did you update this method?