Proxy Meshtastic MQTT messages and locations to other services.
- MQTT Integration: Connects to an MQTT broker to receive Meshtastic messages.
- Traccar Integration: Sends device positions to a Traccar server.
- FIWARE Integration: Upserts device entities and telemetry data to a FIWARE Context Broker.
- Caching: Caches device data for efficient processing.
- Logging: Logs activities and errors with daily rotation.
- More to come...
- Clone the repository:
git clone [email protected]:Georepublic/meshtastic-proxy.git
cd meshtastic-proxy
- Install dependencies:
yarn install
- Build the project:
yarn build
-
Create a
.env
file based on the.env.example
file and fill in the necessary configuration values. -
Start the application:
yarn start
Configuration is done via environment variables. Below are the key variables:
-
MQTT Configuration:
MQTT_CONNECTION
: MQTT broker URL (e.g.,mqtt://localhost:1883
)MQTT_USERNAME
: MQTT broker usernameMQTT_PASSWORD
: MQTT broker passwordMQTT_TOPIC
: MQTT topic to subscribe to (e.g.,meshtastic/#
)
-
Traccar Configuration:
TRACCAR_API_URL
: Traccar API URL (e.g.,http://your.traccar.server:8082
)TRACCAR_OSMAND_URL
: Traccar OsmAnd endpoint URL (e.g.,http://your.traccar.server:5055
)TRACCAR_API_TOKEN
: Traccar API tokenTRACCAR_ID_PREFIX
: Prefix for Traccar device identifiers (e.g.,msh-
)
-
FIWARE Configuration:
FIWARE_BROKER
: FIWARE Context Broker URL (e.g.,https://fiware.example.com/orion/v2
)FIWARE_SERVICE
: FIWARE service (e.g.,tenant_id
)FIWARE_SERVICE_PATH
: FIWARE service path (e.g.,/
)
-
WSO2 Configuration:
WSO2_AUTH_URL
: WSO2 OAuth2 token URL (e.g.,https://wso2.example.com/oauth2/token
)WSO2_CONSUMER_KEY
: WSO2 consumer keyWSO2_CONSUMER_SECRET
: WSO2 consumer secret
-
Database Configuration:
DUCKDB_PATH
: Path to the DuckDB database file (e.g.,data/meshtastic.db
)
-
Logging Configuration:
LOG_LEVEL
: Logging level (e.g.,DEBUG
,INFO
,WARN
,ERROR
)
To start the development server with hot-reloading, use:
yarn dev
- Build the Docker image:
docker build -t meshtastic-proxy .
- Run the Docker container:
docker run --env-file .env \
-v $(pwd)/data:/app/data \
-v $(pwd)/logs:/app/logs \
-p 3000:3000 meshtastic-proxy
Alternatively, you can use docker-compose:
- Ensure your
.env
file is set up. - Start the services:
docker-compose up -d
This project is licensed under the GPL-3.0-or-later - see the LICENSE file for details.