- can you please paste the MQTT message that your android is sending, but HASS is not accepting?
and…
- can you please check your config/known_devices.yaml for any devices that are similar to the host in your MQTT messages
and…
Topic
owntracks/xiaomimi6/marco
Message (%payload variable set with tasker)
{"_type":“location”,“tid”:“mi6”,“acc”:%alaccuracy,“batt”:%BATT,“lat”:%allatitude,“lon”:%allongitude,“tst”:%TIMES,"_cp":true}
Please notice that I use Autolocation Plugin with tasker who generates different values so I don’t have to slip defaul %LOC variable (I choose it because it doesn’t require gps updates to send location).
Here’s my mqtt broker configuration (mqtt is running in a separate docker using toke/mosquitto image)
mqtt:
discovery: true
broker: 192.168.2.100
port: 1883
client_id: home-assistant-1
username: myuser
password: mypassword
And finally here’s my tasker setup action:
Device_tracking
I don’t know why (because I haven’t changed anything)
But suddently I found an error in log:
Mon Apr 23 2018 16:28:23 GMT+0200 (W. Europe Daylight Time)
Unable to parse payload as JSON: {"_type":“location”,“tid”:“mr”,“acc”:14.12,“batt”:20,“lat”:xxx,“lon”:xxx,“tst”:1524429673,}
That JSON shouldn’t have that last comma. I wonder if that is the main issue you have? The expect that a comma indicates that another variable:value pair should follow.
Also; the owntracks MQTT should be owntracks/USER/DEVICE. So try owntracks/marco/xiaomimi6
Uhm,
that’s weird.
As you may see in my tasker setting there’s no comma
{"_type":“location”,“tid”:“mi6”,“acc”:%alaccuracy,“batt”:%BATT,“lat”:%allatitude,“lon”:%allongitude,“tst”:%TIME S,"_cp":true}
And also: my mqtt setting is owntracks/marco/xiaomimi6 yet. May I’m missing something?
Ok must have been a typo a few posts up (post 22); thats why I thought your topic was the other way around:
And yeah that is odd, that the comma has shown up in the HASS error…?
Your ‘tid’ value should be xiaomimi6, on mine it is my devicename:
{"_type":"location","tid":"s7","acc":44,"lat":###,"lon":###,"tst":1524561411,"_cp":"true"}
i got this to post as payload but home assistant is not picking it up:
{"_type":"location","acc":.%LOCACC,"alt":%LOCALT",batt":%BATT,"lat":%LOC1,"lon":%LOC2,"t":"u","tid":"ke","tst":%TIMES,"vac":0,"vel":%LOCSPD}
any idea what i’m doing wrong?
nvm had a typo
{"_type":"location","acc":.%LOCACC,"alt":%LOCALT",batt":%BATT,"lat":%LOC1,"lon":%LOC2,"t":"u","tid":"ke","tst":%TIMES,"vac":0,"vel":%LOCSPD}
",batt":%
should be
{"_type":"location","acc":.%LOCACC,"alt":%LOCALT,"batt":%BATT,"lat":%LOC1,"lon":%LOC2,"t":"u","tid":"ke","tst":%TIMES,"vac":0,"vel":%LOCSPD}
,"batt":%
meh, still doesn’t work. i got the exact same payload as owntracks.
I’m sorry to hear you can’t get it working.
It always worked for me, but I’ve abandoned it long since the Google location sharing approach became reliable. I’d provide a link but I’m on my phone…