I have owntracks and cloudmqtt set up to where my Hassio gets information from my phone, namely gps and battery, and I have a zone set up around my house that works well enough for it to tell me whether or not the device is at home, but in my automation the zone seems to have no effect. I’m tired of driving around the neighborhood to see if my lights turn off, can anyone tell me what I’m doing wrong?
I’m not sure what’s wrong with your automaton, but you can probably use the states tool under developer tools on the front end to manually set your location to not_home and home. This state will persist until your phone sends an updated location again.
I’m pretty sure that the only case this tool wouldn’t work for is if you were using trigger templating, which you are not.
It gave me the option for ‘zone.home’ in the configurator selector, would I need to put these in quotes? Also, I made a template in the settings to create these automations and edited them from configurator, so the indentation is just what it gave me
Overall your automation looks good so I’m not sure what’s wrong. Like @tom_l recommended I would get rid of the from:, it’s superfluous in this case.
If you use the states tool to manually set yourself away, I think you can just put away in the state field in the tool, no quotes necessary. Then just force your phone to report on Owntracks and that will simulate you leaving and returning. When I mentioned templating, I was referring to templating, not the automation editor.
I’ve tried that, still no luck. Could you write out what it is supposed to look like so that I can try and paste it in to see if I messed up somewhere?
I don’t think anything is wrong with your automation. I think you need to look at the states when your device is home/not_home. Also, relying on gps to be as accurate as you want it to be is… probably not a good idea. Owntracks updates based on the change in location or in set increments (depending on your owntracks settings).
The best home/not_home detectors are fobs that have instant ‘in the area’ detection, like a bluetooth keyfob on your keychain.
I get this error sometimes: Location missing from ``Entering/Leaving`` message - please turn ``Share`` on in OwnTracks app
The location seems to be working just fine, as it does update on my UI that I am either home or away, and I can see myself on the UI map, but there’s a disconnect I need to find.
I have also been getting this error and I don’t know what it is: Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 242, in data_received messages, upgraded, tail = self._request_parser.feed_data(data) File "aiohttp\_http_parser.pyx", line 523, in aiohttp._http_parser.HttpParser.feed_data aiohttp.http_exceptions.BadStatusLine: invalid HTTP method
- id: '1540760964543'
alias: Home State Lights On
trigger:
- entity_id: device_tracker.phone_phone
platform: state
to: 'home'
action:
- service: light.turn_on
data:
entity_id: light.bedroom, light.lamp
brightness_pct: 100
color_name: floral white
- id: '1540761815437'
alias: Home State Lights Off
trigger:
- entity_id: device_tracker.phone_phone
platform: state
to: 'not_home'
action:
- service: light.turn_off
data:
entity_id: light.bedroom, light.lamp```