homeassistant-phonetrack:适用于家庭助理的PhoneTrack定制device_tracker组件

  • q2_548262
    了解作者
  • 7.9KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-15 02:57
    上传日期
家庭助手电话 适用于家庭助理的PhoneTrack自定义device_tracker组件。 目的 用于的此自定义组件的目的是跟踪使用PhoneTrack-OC后端的GPS设备。 PhoneTrack-OC是适用于Nextcloud / Owncloud的应用程序,它公开了与Owntracks / µLogger / GPSLogger兼容的API,以及用于在Nextcloud中存储您的位置的更多应用程序。 受启发 此项目的灵感来自@Phyks在此处快速创建的自定义device_tracker组件: ://community.home-assistant.io/t/custom-device-tracker-not-firing-at-expected-interval/45100 我只是接受了他的代码,将其转换为新的(er)结构,并在很大程度上受到了Google共享位置设备跟踪器的启发
homeassistant-phonetrack-master.zip
  • homeassistant-phonetrack-master
  • custom_components
  • phonetrack
  • manifest.json
    228B
  • __init__.py
    31B
  • device_tracker.py
    2.8KB
  • LICENSE
    11.1KB
  • README.md
    2.3KB
内容介绍
# homeassistant-phonetrack PhoneTrack custom device_tracker component for Home Assistant. ## Purpose The purpose of this custom component for [Home-Assistant](https://home-assistant.io) is to track GPS devices that are using a PhoneTrack-OC backend. PhoneTrack-OC is an app for Nextcloud/Owncloud exposing an API compatible with Owntracks / µLogger / GPSLogger and many more to store your positions in Nextcloud. ## Inspired by This project was inspired by the custom device_tracker component quickly created by @Phyks here: https://community.home-assistant.io/t/custom-device-tracker-not-firing-at-expected-interval/45100 I just took his code, converted it top the new(er) structure and adjusted it heavily inspired by the Google Shared Location device tracker. ALL credits go to @Phyks here. Released this updated coded under Apache 2.0 to protect his code a bit as he did not stated a license at all. ## Setup instructions ### Copying into custom_components folder Create a directory `custom_components` in your Home-Assistant configuration directory. Copy the whole [phonetrack](./phonetrack) folder from this project into the newly created directory `custom_components`. The result of your copy action(s) should yield a directory structure like so: ``` .homeassistant/ |-- custom_components/ | |-- phonetrack/ | |-- __init__.py | |-- device_tracker.py | |-- manifest.json ``` ### Enabling the custom_component In order to enable this custom device_tracker component, add this code snippet to your Home-Assistant `configuration.yaml` file: ```yaml device_tracker: - platform: phonetrack url: https://<NEXTCLOUD_URL>/index.php/apps/phonetrack/api/getlastpositions/ token: <SHARED_VIEW_TOKEN> devices: - <DEVICE_NAME> ``` Please use [secrets](https://www.home-assistant.io/docs/configuration/secrets/) within Home-Assistant to store sensitive data like API Tokens. ## ToDo Finish the optional GPS accuracy threshold value similar as Google LOcation Sharing. ## Troubleshooting I don't know how to code in Python (yet). This is just copy & paste work and using Google (a lot) debugging all error's I do not understand, while doing stuff I don't know. I have some more Python projects on the shelf, so whenever I start leaning that code a bit more, I will look into making it better. Till then, feel free to fork and create PR's.
评论
    相关推荐
    • 记录存储后端
      自述文件 该自述文件通常会记录启动和运行应用程序所需的所有步骤。 您可能要讲的内容: Ruby版本 系统依赖 配置 数据库创建 数据库初始化 如何运行测试套件 服务(作业队列,缓存服务器,搜索引擎等) ...
    • level-dat:数据的 LevelDB 存储后端
      对于性LevelDB存储后端 npm install level - dat 用法 var ldat = require ( 'level-dat' ) db = ldat ( db ) // where db is levelup instance db . createReadStream ( ) . on ( 'data' , console . log ) 应用...
    • abcunit-backend:ABCUnit框架的存储后端
      ABCUnit框架的存储后端,记录过程单元的成功和失败。 数据库后端 要使用此后端,您需要联系JASMIN服务台( ),并要求他们为您设置一个postgresql数据库。 指定数据库的名称和用于登录的用户名。 JASMIN支持将通过...
    • django-oss-storage:AliCloud OSS的Django存储后端
      django-oss-storage:AliCloud OSS的Django存储后端
    • 存储后端
      存储后端
    • redistore:使用Redis进行大猩猩会话的会话存储后端
      一个会话存储后端的- 。 要求 取决于 Redis库。 安装 go get gopkg.in/boj/redistore.v1 文献资料 在上。 有关基础接口的完整文档,请参见 。 例子 // Fetch new store. store , err := NewRediStore ( 10 , "tcp...
    • IStorage:简单直接的存储接口,支持多种存储后端
      存储 一个简单直接的存储接口,支持各种存储后端
    • riakstore:使用 Riak 的 gorillasessions 会话存储后端
      用于会话存储后端 - 使用 。 要求 取决于 riaken-core Riak 库。 安装 go get github.com/boj/riakstore 文档 在上。 有关底层接口的完整文档,请参阅 。 例子 // Fetch new store. addrs := []string{"127.0.0.1...
    • dynamostore:gorillasessions 的会话存储后端
      会话存储后端 - 。 要求 取决于 Go Amazon 库 取决于 Go Amazon Dynamodb 库 安装 go get github.com/denizeren/dynamostore 文档 在上。 有关底层接口的完整文档,请参阅 。 例子 // Fetch new store. store, ...
    • memoized-keyv:使用 keyv 作为存储后端记忆
      使用作为存储后端进行。 快速开始 npm install --save keyv memoized-keyv const memoize = require ( 'memoized-keyv' ) ; const memoizedRequest = memoize ( request ) ; memoizedRequest ( '...