https://github.com/alokkusingh/iot-telemetry-service
Home Telemetry Service
https://github.com/alokkusingh/iot-telemetry-service
Last synced: 12 months ago
JSON representation
Home Telemetry Service
- Host: GitHub
- URL: https://github.com/alokkusingh/iot-telemetry-service
- Owner: alokkusingh
- Created: 2025-06-15T01:42:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-24T15:25:00.000Z (about 1 year ago)
- Last Synced: 2025-06-24T15:35:57.048Z (about 1 year ago)
- Language: Java
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Home Telemetry Service
Home Stack Telemetry Service, which is a microservice that collects data from various sensors by listening MQTT Topics and processes it and transmits command to a sensor by publishing to a MQTT Topic.
## MQTT Topics
### Subscription Topics
- `home/alok/status/<>`
- `home/alok/telemetry/temperature/<>`
- `home/alok/telemetry/humidity/<>`
## MQTT Payloads
### Temperature Payload
```json
{
"deviceId": "esp32-general-purpose-1",
"epochTime": 1696156800,
"temperature": 25.5,
"unit": "Celsius"
}
```
### Humidity Payload
```json
{
"deviceId": "esp32-general-purpose-1",
"epochTime": 1696156800,
"humidity": 60,
"unit": "%"
}
```
### Device Status Payload
#### Online Status
```json
{
"deviceId": "esp32-general-purpose-1",
"status": "online",
"epochTime": 1696156800,
"ipAddress": "192.168.1.6"
}
```
#### Offline Status
```json
{
"deviceId": "esp32-general-purpose-1",
"status": "offline",
"epochTime": 1696156800
}
```
### Command Payload
```json
{
"deviceId": "esp32-general-purpose-1",
"command": "turn_on_fan"
}
```
### Publish Topics
- `home/alok/command/<>`
1. Maven Package
```shell
mvn clean package -DskipTests
```
2. Docker Build, Push & Run
```shell
docker build -t alokkusingh/iot-telemetry-service:latest -t alokkusingh/iot-telemetry-service:1.0.0 --build-arg JAR_FILE=target/iot-telemetry-service-1.0.0.jar .
```
```shell
docker push alokkusingh/iot-telemetry-service:latest
```
```shell
docker push alokkusingh/iot-telemetry-service:1.0.0
```
```shell
docker run -p 8081:8081 --rm --name iot-telemetry-service alokkusingh/iot-telemetry-service
```
### Manual commands - go inside and run binary manually
```shell
docker run -it --entrypoint /bin/bash -p 8081:8081 --rm --name iot-telemetry-service alokkusingh/iot-telemetry-service
```