[HowTo] Location and Presence (Owntracks)

Hi Chris,

Thanks for your reply! I do appreciate the effort you made to give us an alternative for Homey Presence not working at all.

Ad 1.:
The thing is that having to do manual action to have an accurate position is as handy as manually set the “i am home” state in Homeys presence… Furthermore I cannot do this for my household members and they suffer from the same.
However setting inregion seemed to take care of this (not understand how and why by the way). Maybe together with smaller locator displacement and locator interval settings?

Ad 2.:
I have disabled Homey Presence and my household members don’t have the homey app installed. Updating the position normally doesn’t help. Restarting (my own) homey app doesn’t help.
Sometimes members are shown home from Location and Presence while they are not and vice versa!? All this when the Owntrack client on my phone shows does members correctly in or out of home!? Flows that changes a counter and alerts me at my phone when someone arrives or leaves often don’t seem to run!?
Again not being able to rely on this is as good as no information so I hope you are able to solve this :slightly_smiling_face:

Regards, and again I appreciate all your efforts for making this!

@scanno
thx for re assuring me, it works!!

still 2 questions/problems though if u got the time

  1. Geofences are personal? cannot share them?

  2. I cannot add a fence in the L&P app… well I CAN add a fence but is has no coördinates

problem is that on adding a fence, Only the “Fence” field is accesible and when I push the + button the fence is added but without Lon/Lat/Radius

image

In the near future I will set myself on learning how to set up and use a MQTT broker çus the https broker works really fine, but Damn! is a battery-drainer… :slight_smile:

To answer your question:

  1. Geofences are not personal and can be shared. However at the current version for HTTPS users it is not yet possible to share those geofences. When using MQTT you can push the geofences to the owntracks app on you phone. I am working on a complete overhaul of the homey app that supports pushing data to HTTPS users (you can also see the location of other users in the owntracks app on your phone). But due to the master i am following (next to 40 hour workweek) that is on hold.
  2. Geofences are added autmatically when they are created on the phone. So please use that.

The best thing you can do is create a geofence on the phone with the same name and copy the coordinates from the other phone or from the homey app.

The overhaul includes stuff like:

  1. Nested geofences
  2. A user has one or more devices and each device has a location
  3. Support pushing user info and geofence info to HTTPS clients (like MQTT already supports)
  4. support triggers with user and specific device

Nice thx for support, you deserve a Nobel price for support

not make you rich, but to show my appreciation…

image

@scanno

Is there some sort of guide for setting up your MQTT-broker?

only thing i found is how to set up cloud-mqtt but as far as I read I don’t need Cloud Do I?

grtz
Menne

Depends on what you want and your knowledge.

Setting up a free CloudMQTT account is the easiest way to get started with a MQTT broker. Here you just create the broker, add usernames for each device and the L&P app and you are good to go.

You can use my MQTT broker for Homey, but then you would need some knowledge about port forwarding and possibly things like dynamic dns and TLS certificates.

I made a guide regarding setting up the broker on Homey MQTT Broker for Homey

The Owntracks client on your phone needs to trust the selfsigned certificates. To do so you will need to add the generated certificate to the client on your phone.

You need to do the following steps:

  1. Go to the settings page of the MQTT Broker for Homey.
  2. Go to the Session Settings tab

  1. Select the contents of the Certificate field and copy that.
  2. Paste the contents in a text editor and save it with the extension PEM
  3. Put the file on your phone
  4. Go to the settings of the owntracks app on your phone
  5. Go to the security sections
  6. Press CA Certificate, press select and select the PEM file you copied to your phone
  7. Confirm
  8. Secure communication should be working.
1 Like

Thx,

Much obliged

I’ll get to it next week I hope.

And does it work now ?

haven’t gotten to it, been busy programming all my stuff (devices, logica and flows) in my new Homey-Pro. (there is no backup & restore app)

the Homey built-in location and presence function works perfectly on Homey Pro so I don’t really need Owntracks and a Mqtt-broker anymore… Life is simple again :slight_smile:

Give me advice. I create a token on Homey app Location and Presence. Add to Owntracks. But in the log I see errors. Token is not found. What I do wrong?

I don’t use a token with Location and Presence as I use a private MQTT Server instance.

So I can not help you with any support on this.

Where do I find Athom Cloud ID?

In the Homey app? Settings -> general?

Thanks! I have a Iphone and in my Owntracks app I get a 401 error. I don’t have Preferences/Configuration and edit in my app. Just “i” and settings.

What am I missing out on?

With Homey app i mean the general app from Athom. There you can find the CloudID. That ID should be used in the URL you should enter in the owntracks app on your phone

Yes I got that, but in the Owntracks I get a 401 error.

My setup:

Try disabeling authentication!

Yup authentication should be disabled. Authentication is done with the token you generate in the location & presence app on homey.

The authentication is useless because you connect to the athom cloud and the cloud just relays your request to your homey based on the cloudid.

HTTP authentication is not enabled and if used / enabled it will cause problems.