OwnTracks เป็นแอปพลิเคชันโอเพ่นซอร์สฟรีสำหรับ iOS และ Android ที่ให้คุณติดตามตำแหน่งของคุณและส่งโดยตรงไปยัง Home Assistant สามารถตั้งค่า OwnTracks ผ่าน Settings > Devices & Services.
ตามค่าเริ่มต้น การผสานรวมจะรับฟังข้อความขาเข้าจาก OwnTracks ผ่าน HTTP หาก Home Assistant ได้รับการกำหนดค่าให้ใช้ MQTT แทน ระบบจะฟังข้อความ MQTT เมื่อมีการส่งตำแหน่งผ่าน HTTP Home Assistant จะส่งคืนตำแหน่งที่ทราบล่าสุดของบุคคลทั้งหมด ตำแหน่งของพวกเขาจะแสดงในแอพ OwnTracks
Configuration
- To set up OwnTracks in Home Assistant, go to Settings > Devices & Services.
- Add the OwnTracks integration.
- This will give you the Webhook URL as well as the Encryption key to use during mobile device configuration (below).
Configuring the app - Android
-
Install the OwnTracks application for Android.
- If you need a version of OwnTracks without Google Play Services, the “OSS” flavour is available here.
-
In the app, open the sidebar and select Preferences, then Connection.
-
Change the following settings:
- Mode: HTTP
- Host:
<URL given to you when setting up the integration>
- Identification:
- Username:
<Username>
: You can make one up for OwnTracks. - Password: Can be left blank.
- Device ID:
<Device name>
: Something that helps you remember which of your devices is used for OwnTracks. - Tracker ID:
<xx>
Two character tracker ID. (can be left blank)
- Username:
-
Your tracker device will be known in Home Assistant as
<Username>_<Device name>
. If you entered a Tracker ID, thetid
attribute will be set to that ID.
Configuring the app - iOS
-
In the OwnTracks app, tap the (i) in the top left and select Settings.
-
Change the following settings:
- Mode: HTTP
- URL:
<URL given to you when setting up the integration>
- Turn on authentication
- User ID:
<Your name>
. You can make one up for OwnTracks.
จากนั้นเราจึงจะสามารถเพิ่ม People card ที่มีการระบุสถานะตำแหน่งที่ตั้งอ้างอิงกับ Zone ได้ และยังสามารถกำหนดการทำงานอัตโนมัติเชื่อมโยงกับอุปกรณ์อื่นโดยอ้างอิงจากการเปลี่ยนแปลงตำแหน่งของ People หรือ Tracking device แต่ละตัวได้ อาทิเช่น การเปิดปิดไฟแสงสว่าง แอร์ หรือประตูรั้ว เองอัตโนมัติ เมื่อระบบตรวจจับได้ว่ามี บุคคล หรือ อุปกรณ์ ตัวที่กำหนดเอาไว้อยู่ใน Zone ที่ระบุเอาไว้

Source: OwnTracks