cf9eff5689
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.0 to 2.6.7. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.0...v2.6.7) --- updated-dependencies: - dependency-name: node-fetch dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
src | ||
.eslintrc.json | ||
.gitignore | ||
LICENSE | ||
README.md | ||
architecture.jpg | ||
config.json | ||
package-lock.json | ||
package.json | ||
screenshot.png |
README.md
Welcome to trackmyd-bot 🗺️
A telegram bot to track your devices.
Install
Steps:
- Install Node.js and npm.
- Clone this repository.
- Install dependencies with
npm install
. - Create a new bot with @BotFather on Telegram.
- Enter the token generated by BotFather in (app.token) into
config.json
. - Enter your Telegram ID in (app.authorizedUsers) into
config.json
. - Configure Basic Authentication in (app.api.headers) into
config.json
. - Configure API endpoint(*).
Architecture
(*) trackmyd-bot uses the trackmyd-api project APIs to get device locations.
To configure the server API, refer to the trackmyd-api repository.
In order to use trackmyd-bot, in addiction to the configuration of the trackmyd-api, it’s also necessary to configure GPSLogger.
Usage
Start server:
npm run start
Steps
Before requesting the position to the bot you need to add a new device and configure it.
-
Add a new device (on Bot).
Send the
/add
command to the bot. You will be prompted to add the device name. -
Configure GPSLogger (on Android).
Once confirmed the device name, the bot will return 3 messages:
- URL (full-path including the device ID)
- HEADER (HTTP header, used for authentication to APIs)
- BODY (HTTP body with the parameters that will be automatically evaluated by GPSLogger).
Take the values and insert them in the GPSLogger app under "Logging details > Log to custom URL" specifying HTTP Method = 'PATCH'.
Then press "Start Logging" on GPSLogger.
-
Request the position (on Bot)
Send the
/position
command to the bot and select the device. If the device (with GPSLogger) has sent the information to the API, 2 messages will be returned (one with the location on the map, and one with additional information).
Author
👤 franjsco (Francesco Esposito)
- Website: https://franjsco.github.io/
- Twitter: @franjsco
- Github: @franjsco
Show your support
Give a ⭐️ if this project helped you!
📝 License
Copyright © 2020 franjsco (Francesco Esposito).
This project is GPL--3.0--or--later licensed.
This README was generated with ❤️ by readme-md-generator