Ok, here’s where I’m at.
owntracks/WorkPhone/WorkPhone {“_type”:“location”,“tid”:“WP”,“acc”:50,“lat”:20.452652,“lon”:-70.6954585,“tst”:1461720358,“batt”:55}
owntracks/tC/tC {“_type”:“location”,“tid”:“TC”,“acc”:53,“lat”:20.9739265,“lon”:-70.5449338,“tst”:1461720298,“batt”:68}
WorkPhone is my work phone which runs Android and I installed owntracks on it, that’s what it generated.
tC is my car using the Electron to publish.
The workphone works fine, I go into owntracks, force an update, HomeAssistant parses and is happy. When I do an update from the electron, I get this:
Apr 27 01:26:14 raspberrypi hass[24595]: INFO:homeassistant.core:Bus:Handling <Event mqtt_message_received[L]: qos=0, payload={“_type”:“location”,“tid”:“TC”,“acc”:53,“lat”:20.9739265,“lon”:-70.5449338,“tst”:1461720298,“batt”:68}
Apr 27 01:26:14 raspberrypi hass[24595]: ERROR:homeassistant.components.device_tracker.owntracks:Unable to parse payload as JSON: {“_type”:“location”,“tid”:“TC”,“acc”:53,“lat”:20.9739265,“lon”:-70.5449338,“tst”:1461720298,“batt”:68}
Any ideas why it isn’t parsing? They look identical to me
EDIT: Just wanted to add, Owntracks is actually picking up my entries for the car and working, I’m able to see it on the map in the Owntracks app and it updates. I’m also able to copy the payload from the error message above and paste it into python and it parses fine. Really lost on this one now.
payload = ‘{“_type”:“location”,“tid”:“TC”,“acc”:53,“lat”:20.9739265,“lon”:-70.5449338,“tst”:1461720298,“batt”:68}’
j = json.loads(payload)
print(j)
{‘tid’: ‘TC’, ‘lat’: 20.9739265, ‘tst’: 1461720298, ‘batt’: 68, ‘_type’: ‘location’, ‘acc’: 53, ‘lon’: -30.5449338}