# TLS doesn't work: MQTT-Broker for Homey, Location & Presence and Owntracks

**URL:** <https://community.homey.app/t/tls-doesnt-work-mqtt-broker-for-homey-location-presence-and-owntracks/40272>\
**Category:** Questions & Help\
**Tags:** app, tools, webapp\
**Created:** [January 1, 2021, 10:47pm UTC](https://community.homey.app/t/tls-doesnt-work-mqtt-broker-for-homey-location-presence-and-owntracks/40272 "2021-01-01T22:47:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![z3r0](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/z3r0/32/29921_2.png) [@z3r0](https://community.homey.app/u/z3r0)\
**Post date:** [January 1, 2021, 10:47pm UTC](https://community.homey.app/t/tls-doesnt-work-mqtt-broker-for-homey-location-presence-and-owntracks/40272/1 "2021-01-01T22:47:46Z")

</div>

I have read a few things on this forum about alternatives for geolocation. I chose to use Owntracks in combination with MQTT. I succeeded in setting up an unsecured connection, but I failed to set up a secured preferred TLS connection.

Below are the settings that I tried for a **secure** connection with TLS, but did not get it working:

The apps:

- MQTT-Broker for Athom Homey
- Location and Presence for Athom Homey
- Owntracks for Android

**MQTT-Broker for Athom Homey [Settings]**  
Port number for an unsecured connection: 1883  
Enable secure connection: CHECKED  
Port number for a secure connection: 8883  
Also allow unsecure connections: CHECKED

_Tab edit users:_  
Username: Owntracks  
Password: \*\*\*\*

_Tab session settings:_  
CommonName used to generate a certificate: static IP address  
Certificate saved  
Broker stopped and started

 ![01](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/a/bafe8017caa38eb313ccf5a914b18b34478250b5.jpeg)

**Location & Presence for Athom Homey [Settings]**  
Use a MQTT broker as addition to HTTP: CHECKED  
IP address or DNS: static IP address (same as the CommonName from the MQTT Broker)  
Port number for a secure connection: 8883  
Secure Connection (TLS): CHECKED  
Disable certificate checking: CHECKING  
Username: Owntracks (username and password same as in the MQTT Broker)  
Password: \*\*\*\*

 ![Screenshot_20210102-110537_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/4/74738ae23df4fbc6c7c1dae236a8c9ca3fcddd8c.jpeg)

**Owntracks for Android [Settings]**  
Username: testUser  
Password: _empty, I don’t know what this is for or where this is used?_  
Device ID: s20  
Tracker ID: TU

 ![Screenshot_20210101-175337_Owntracks](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/d/3d16d199b06b1da9f64d913130341b5380106f15.jpeg)

Host: static IP-address (same as the CommonName from the MQTT Broker and Location an Presence)  
Port number: 8883  
Client ID: testS20

 ![Screenshot_20210101-214845_Owntracks](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/e/0e2e86612eb45a67990d5de8666e61d6323fbae4.jpeg)

TLS switch: ON  
CA certificate: selected the CA certificate generated in MQTT Broker for Athom Homey  
I have installed the certificate on my mobile phone just to be sure.

 ![Screenshot_20210101-175405_Owntracks](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/7/f737249617da884fda40ccf800164e0326b2c6c7.jpeg)

**The error I get when using these settings:**

 ![Screenshot_20201231-202558_Owntracks](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/0/60b58e5163f8d64fdc3417299cb08a642584da69.jpeg)

**Extra information:**

- Port 1883 and 8883 are both forwarded to my static IP address.

By the way, what is the purpose of the password in the Owntracks app (Identification)? I left the the password empty for my currently working unsecured connection (with port: 1883) and everything still just works: open\_mouth :.

Hopefully you can see what I configured wrong or forgot to configure. For security reasons I really would like to use a secure TLS connection instead.

---

<div class="post-metadata">

**Author:** ![Felho](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/felho/32/38916_2.png) [@Felho](https://community.homey.app/u/Felho)\
**Post date:** [October 27, 2021, 7:32am UTC](https://community.homey.app/t/tls-doesnt-work-mqtt-broker-for-homey-location-presence-and-owntracks/40272/2 "2021-10-27T07:32:27Z")

</div>

is it not work iOS devices, I try but not work TLS ☹
