From a0fbd9308c8b9247f14fcb4f08c6db16914756e6 Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Sun, 2 Nov 2025 10:33:16 +0000 Subject: [PATCH] Add separate file for running controller & update readme --- README.md | 6 +++++- app.py | 12 ++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 app.py diff --git a/README.md b/README.md index 83adda4..e7c1373 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # thingy52-mqtt-bridge -MQTT bridge for BLE Nordic Instruments Thingy:52 +MQTT bridge for BLE Nordic Instruments Thingy:52. + +## Usage + +Update the parameters found in `app.py` and run it with `python3 app.py`. diff --git a/app.py b/app.py new file mode 100644 index 0000000..2f7fc19 --- /dev/null +++ b/app.py @@ -0,0 +1,12 @@ +from controller import Controller + +Controller( + broker="mqtt.broker.ip", + port=8883, + mac="THINGY:52:MAC", + username="mqtt_username", + password="mqtt_password", + topic="homeassistant/sensor/thingy52", + caCertPath="/path/to/ca.crt", + temperatureOffset=-11 +)