Locative sends the GET, but nothing happens

I’m trying to configure Locative for presence detection, but running into some difficulty.

I have my configuration set as so:

device_tracker: platform: locative
I’ve also properly set up the iOS app. It notifies that it has sent the requests. I’ve also verified in the Home Assistant logs that it’s making the calls and returning 200s.

16-06-12 18:35:04 homeassistant.components.http: 70.193.240.246 - - [12/Jun/2016 18:35:04] “GET /api/locative?api_password=&device=3FAE6313-D97A-48DE-8F52-5DEC6BA64FDB&id=Home&latitude=[REDACTED]&longitude=[REDACTED]&timestamp=1465756502.434871&trigger=exit HTTP/1.1" 200 9519 0.005941
16-06-12 19:58:45 homeassistant.components.http: 70.193.240.246 - - [12/Jun/2016 19:58:45] "GET /api/locative?api_password=
&device=3FAE6313-D97A-48DE-8F52-5DEC6BA64FDB&id=Home&latitude=[REDACTED]&longitude=[REDACTED]&timestamp=1465761525.157922&trigger=enter HTTP/1.1” 200 9696 0.005834

However, a known_devices file never appears in my directory and no states are shown in HASS. Am I missing another step that isn’t outlined in the documentation to get it working the rest of the way?

Not sure what is going on but I can confirm that after a real locative update you should get an entry in known_devices.yaml. Locative tests do not add the device.

Okay… How can I troubleshoot this? I am always getting 200 responses every time it does an exit/enter request, but no known_devices.yaml is ever created.

Actually it looks like Locative support is broken - since I upgraded to 0.21.1 I am seeing the same, where it previously worked perfectly.

No doubt fallout from the web framework upgrade - the get request is returning what looks like a combination of config and state information:

{"config": {"components": ["recorder", "zwave", "notify", "http", "alexa", "logbook", "updater", "zone", "device_tracker", "weblink", "input_boolean", "history", "input_select", "sun", "sensor.forecast", "sensor.yr", "sensor.template", "sensor.systemmonitor", "sensor.worldclock", "sensor.time_date", "sensor", "conversation", "discovery", "api", "frontend", "mqtt", "garage_door.mqtt", "garage_door", "group", "automation", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene.homeassistant", "scene", "script", "switch", "thermostat", "sensor.zwave", "sensor.zwave", "sensor.zwave", "switch.zwave", "hvac", "sensor.zwave", "thermostat.zwave", "hvac.zwave", "sensor.zwave", "thermostat.zwave", "sensor.zwave", "thermostat.zwave", "hvac.zwave", "thermostat.zwave", "switch.zwave", "binary_sensor", "switch.zwave", "switch.zwave", "sensor.zwave", "binary_sensor.zwave", "thermostat.zwave", "hvac.zwave", "sensor.zwave", "binary_sensor.zwave", "thermostat.zwave", "sensor.zwave", "binary_sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "binary_sensor.zwave", "sensor.zwave", "binary_sensor.zwave", "sensor.zwave", "binary_sensor.zwave", "media_player", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "light", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "sensor.zwave", "media_player.roku", "light.hue"], "latitude": 41.115126, "location_name": "Main", "longitude": -73.403153, "temperature_unit": "\u00b0F", "time_zone": "America/New_York", "version": "0.21.1"}, "events": [{"event": "time_changed", "listener_count": 21}, {"event": "call_service", "listener_count": 1}, {"event": "state_changed", "listener_count": 90}, {"event": "homeassistant_start", "listener_count": 3}, {"event": "*", "listener_count": 2}, {"event": "homeassistant_stop", "listener_count": 4}, {"event": "mqtt_message_received", "listener_count": 1}, {"event": "platform_discovered", "listener_count": 18}], "services": [{"domain": "device_tracker", "services": {"see": {"description": "Control tracked device", "fields": {"battery": {"description": "Battery level of device", "example": "100"}, "dev_id": {"description": "Id of device (find id in known_devices.yaml)", "example": "phonedave"}, "gps": {"description": "GPS coordinates where device is located (latitude, longitude)", "example": "[51.509802, -0.086692]"}, "gps_accuracy": {"description": "Accuracy of GPS coordinates", "example": "80"}, "host_name": {"description": "Hostname of device", "example": "Dave"}, "location_name": {"description": "Name of location where device is located (not_home is away)", "example": "home"}, "mac": {"description": "MAC address of device", "example": "FF:FF:FF:FF:FF:FF"}}}}}, {"domain": "notify", "services": {"notify": {"description": "Send a notification", "fields": {"message": {"description": "Message body of the notification.", "example": "The garage door has been open for 10 minutes."}, "target": {"description": "Target of the notification. Optional depending on the platform", "example": "platform specific"}, "title": {"description": "Optional title for your notification.", "example": "Your Garage Door Friend"}}}}}, {"domain": "scene", "services": {"turn_on": {"description": "", "fields": {}}}}, {"domain": "zwave", "services": {"add_node": {"description": "", "fields": {}}, "heal_network": {"description": "", "fields": {}}, "remove_node": {"description": "", "fields": {}}, "soft_reset": {"description": "", "fields": {}}, "test_network": {"description": "", "fields": {}}}}, {"domain": "script", "services": {"andrew_away": {"description": "", "fields": {}}, "andrew_home": {"description": "", "fields": {}}, "cooling_off": {"description": "", "fields": {}}, "cooling_on": {"description": "", "fields": {}}, "day": {"description": "", "fields": {}}, "evening": {"description": "", "fields": {}}, "evening_transition": {"description": "", "fields": {}}, "everyone_left": {"description": "", "fields": {}}, "heat_off": {"description": "", "fields": {}}, "heat_on": {"description": "", "fields": {}}, "morning": {"description": "", "fields": {}}, "night": {"description": "", "fields": {}}, "night_quiet": {"description": "", "fields": {}}, "porch_motion_night_off": {"description": "", "fields": {}}, "porch_motion_night_on": {"description": "", "fields": {}}, "restart_ha": {"description": "", "fields": {}}, "set_initial_state": {"description": "", "fields": {}}, "smart_cooling_on": {"description": "", "fields": {}}, "smart_heat_off": {"description": "", "fields": {}}, "smart_heat_on": {"description": "", "fields": {}}, "someone_home": {"description": "", "fields": {}}, "test": {"description": "", "fields": {}}, "timed_dim_off": {"description": "", "fields": {}}, "timed_dim_on": {"description": "", "fields": {}}, "toggle": {"description": "", "fields": {}}, "turn_off": {"description": "", "fields": {}}, "turn_on": {"description": "", "fields": {}}, "wendy_away": {"description": "", "fields": {}}, "wendy_home": {"description": "", "fields": {}}}}, {"domain": "input_boolean", "services": {"turn_off": {"description": "", "fields": {}}, "turn_on": {"description": "", "fields": {}}}}, {"domain": "hvac", "services": {"set_aux_heat": {"description": "Turn auxillary heater on/off for hvac", "fields": {"aux_heat": {"description": "New value of axillary heater", "example": true}, "entity_id": {"description": "Name(s) of entities to change", "example": "hvac.kitchen"}}}, "set_away_mode": {"description": "Turn away mode on/off for hvac", "fields": {"away_mode": {"description": "New value of away mode", "example": true}, "entity_id": {"description": "Name(s) of entities to change", "example": "hvac.kitchen"}}}, "set_fan_mode": {"description": "Set fan operation for hvac", "fields": {"entity_id": {"description": "Name(s) of entities to change", "example": "hvac.nest"}, "fan": {"description": "New value of fan mode", "example": "On Low"}}}, "set_humidity": {"description": "Set target humidity of hvac", "fields": {"entity_id": {"description": "Name(s) of entities to change", "example": "hvac.kitchen"}, "humidity": {"description": "New target humidity for hvac", "example": 60}}}, "set_operation_mode": {"description": "Set operation mode for hvac", "fields": {"entity_id": {"description": "Name(s) of entities to change", "example": "hvac.nest"}, "operation_mode": {"description": "New value of operation mode", "example": "Heat"}}}, "set_swing_mode": {"description": "Set swing operation for hvac", "fields": {"description": "New value of swing mode", "entity_id": {"description": "Name(s) of entities to change", "example": "hvac.nest"}, "example": 1, "swing_mode": null}}, "set_temperature": {"description": "Set target temperature of hvac", "fields": {"entity_id": {"description": "Name(s) of entities to change", "example": "hvac.kitchen"}, "temperature": {"description": "New target temperature for hvac", "example": 25}}}}}, {"domain": "conversation", "services": {"process": {"description": "", "fields": {}}}}, {"domain": "logbook", "services": {"log": {"description": "", "fields": {}}}}, {"domain": "input_select", "services": {"select_option": {"description": "", "fields": {}}}}, {"domain": "light", "services": {"toggle": {"description": "Toggles a light", "fields": {"entity_id": {"description": "Name(s) of entities to toggle", "example": "light.kitchen"}, "transition": {"description": "Duration in seconds it takes to get to next state", "example": 60}}}, "turn_off": {"description": "Turn a light off", "fields": {"entity_id": {"description": "Name(s) of entities to turn off", "example": "light.kitchen"}, "transition": {"description": "Duration in seconds it takes to get to next state", "example": 60}}}, "turn_on": {"description": "Turn a light on", "fields": {"brightness": {"description": "Number between 0..255 indicating brightness", "example": 120}, "color_name": {"description": "A human readable color name", "example": "red"}, "color_temp": {"description": "Color temperature for the light in mireds (154-500)", "example": "250"}, "effect": {"description": "Light effect", "values": ["colorloop", "random"]}, "entity_id": {"description": "Name(s) of entities to turn on", "example": "light.kitchen"}, "flash": {"description": "If the light should flash", "values": ["short", "long"]}, "profile": {"description": "Name of a light profile to use", "example": "relax"}, "rgb_color": {"description": "Color for the light in RGB-format", "example": "[255, 100, 100]"}, "transition": {"description": "Duration in seconds it takes to get to next state", "example": 60}, "xy_color": {"description": "Color for the light in XY-format", "example": "[0.52, 0.43]"}}}}}, {"domain": "garage_door", "services": {"close": {"description": "", "fields": {}}, "open": {"description": "", "fields": {}}}}, {"domain": "switch", "services": {"toggle": {"description": "", "fields": {}}, "turn_off": {"description": "", "fields": {}}, "turn_on": {"description": "", "fields": {}}}}, {"domain": "media_player", "services": {"media_next_track": {"description": "Send the media player the command for next track.", "fields": {"entity_id": {"description": "Name(s) of entities to send next track command to", "example": "media_player.living_room_sonos"}}}, "media_pause": {"description": "Send the media player the command for pause.", "fields": {"entity_id": {"description": "Name(s) of entities to pause on", "example": "media_player.living_room_sonos"}}}, "media_play": {"description": "Send the media player the command for play.", "fields": {"entity_id": {"description": "Name(s) of entities to play on", "example": "media_player.living_room_sonos"}}}, "media_play_pause": {"description": "Toggle media player play/pause state", "fields": {"entity_id": {"description": "Name(s) of entities to toggle play/pause state on", "example": "media_player.living_room_sonos"}}}, "media_previous_track": {"description": "Send the media player the command for previous track.", "fields": {"entity_id": {"description": "Name(s) of entities to send previous track command to", "example": "media_player.living_room_sonos"}}}, "media_seek": {"description": "Send the media player the command to seek in current playing media.", "fields": {"entity_id": {"description": "Name(s) of entities to seek media on", "example": "media_player.living_room_chromecast"}, "position": {"description": "Position to seek to. The format is platform dependent.", "example": 100}}}, "media_stop": {"description": "Send the media player the stop command.", "fields": {"entity_id": {"description": "Name(s) of entities to stop on", "example": "media_player.living_room_sonos"}}}, "play_media": {"description": "Send the media player the command for playing media.", "fields": {"entity_id": {"description": "Name(s) of entities to seek media on", "example": "media_player.living_room_chromecast"}, "media_content_id": {"description": "The ID of the content to play. Platform dependent

<snip>

I get a 200 response code but the presence never changes - I have tried this with Locative as well as curl.

You’re seeing exactly what I’m seeing then. How do we escalate this into something for them to fix?

EDIT: I’ve opened up an issue on GitHub. https://github.com/home-assistant/home-assistant/issues/2291

I’ve also looked at the locative component (https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/device_tracker/locative.py) and don’t see anything glaringly wrong with it, but Python is not my first language.

Thanks for filing the issue - I’ll take a look at the source too when I get a chance. FWIW this seems to be limited to locative as I can set presence manually using the “see” service.

I think I managed to fix it -

Check out this thread:

Made the change on my end. Can confirm that it solves the issue.

Excellent! The official fix should be in the next version.

Locative users should vote here: Fix Locative Bug

stop spamming the forums

That’s not spam, updated relevant threads with the recent request. Thanks.

This is a thread from 2016
and as the last item said it was fixed then

It is still not, that’s the reason for the feature request vote is to finally fix it.

Excellent! The official fix should be in the next version.
this fixed the issue from 2016.