More cleanup
This commit is contained in:
parent
8f615e179e
commit
969e702238
@ -32,7 +32,7 @@ class MQTTHandler:
|
||||
self.handler_id = handler_id
|
||||
self.mqtt_config = mqtt_config
|
||||
|
||||
self.topic_base = f"asset/{handler_id}"
|
||||
self.topic_base = f"device/{handler_id}"
|
||||
self.status_topic = f"{self.topic_base}/status"
|
||||
self.command_topic = f"{self.topic_base}/command"
|
||||
self.property_topic = f"{self.topic_base}/property"
|
||||
|
||||
6
main.py
6
main.py
@ -1,17 +1,13 @@
|
||||
#! /usr/bin/env python3
|
||||
|
||||
import aiomqtt
|
||||
import aioserial
|
||||
import asyncio
|
||||
import paho
|
||||
import socket
|
||||
import signal
|
||||
|
||||
from ubxhandler import UBXHandler
|
||||
from handler import MQTTConfig
|
||||
|
||||
BAUD = 115200
|
||||
|
||||
|
||||
async def main():
|
||||
handler_id = f"example-gps-{socket.gethostname()}"
|
||||
@ -19,7 +15,7 @@ async def main():
|
||||
|
||||
serial_port = aioserial.AioSerial(
|
||||
port="/tmp/ttyV0",
|
||||
baudrate=BAUD,
|
||||
baudrate=115200,
|
||||
timeout=0.05, # 50 ms
|
||||
)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user