From 2b9bacf0a4b2c13e09d157d57c7e3c2de6ddbaf2 Mon Sep 17 00:00:00 2001 From: DasMoorhuhn Date: Thu, 30 May 2024 17:43:45 +0200 Subject: [PATCH] sheeesh --- README.md | 7 +++++-- python/src/loop.py | 9 +++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 python/src/loop.py diff --git a/README.md b/README.md index d5827c5..6b7f63f 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,12 @@ Python gateway for the [custom firmware](https://github.com/atc1441/ATC_MiThermo ![](.media/41N1IH9jwoL._AC_SL1024_.jpg) **Features:** -- [WIP] Can run on Raspberry Pi (3, 4, zero w, pico) or any other Linux driven hardware which has BLE and WiFi support +- [WIP] Can run on Raspberry Pi (3, 4, zero w) or any other Linux driven hardware which has BLE and WiFi support - [WIP] Storing temperature, humidity and battery state as json in a text file -- [WIP] Make in runnable in a docker container (because only cool people are using docker) +- [WIP] Implement a loop for fetching the data every x minute +- [DONE] Make in runnable in a docker container (because only cool people are using docker) +- [TODO] Make docker image smaller. I mean shiiit 1GB D: should be possible to be under 500MB +- [TODO] Make a microPython version for using the raspberry pico w or any other microcontroller with BLE and WiFi support - [TODO] Collect data from multiple devices/gateways - [TODO] Command line tool for managing the devices - [TODO] Analyzing tool for making statistics diff --git a/python/src/loop.py b/python/src/loop.py new file mode 100644 index 0000000..e50ca33 --- /dev/null +++ b/python/src/loop.py @@ -0,0 +1,9 @@ +from time import sleep + +from discovery import start_discovery + + +def start_loop(interval=60): + while True: + start_discovery() + sleep(interval)