From d6767d03e3e0ec6acc19b69c678c5fd0ea1f101a Mon Sep 17 00:00:00 2001 From: System21 <12837962+Systm21@users.noreply.github.com> Date: Mon, 11 Sep 2023 19:28:08 +0200 Subject: [PATCH 1/7] Delete settings-template.toml removed obsolet settings file --- settings-template.toml | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 settings-template.toml diff --git a/settings-template.toml b/settings-template.toml deleted file mode 100644 index 972e384..0000000 --- a/settings-template.toml +++ /dev/null @@ -1,40 +0,0 @@ - -# -- INSTRUCTIONS -- -# Make a copy of this file and rename it settings.toml. -# add information about your system, MQTT broker, OwnTracks setup. -# Create a new settings block for each tag. - -[owntag_options] -password = "password" # macOS password. Used to decrypt location reports. -print_history = 1 - # positive numbers (4), the number of messages you want to see - # negative numbers (-1) will print all fetched locations, - # 0 will turn printing fetched locations off -status_msg = false # publish status and metadata - # Status messages can be sent to an MQTT Topic -status_base = "status/owntags" # topic for status messages - -[mqtt_secrets] -mqtt_broker = "your-broker.com" # broker address -mqtt_port = 1883 # 1883 if no TLS; 8883 if TLS -mqtt_tls = nan # Comment out if using TLS. Uncomment below to use certificates. -mqtt_user = "username" # Broker user -mqtt_pass = "password" # Broker password -# [mqtt_secrets.mqtt_tls] # If TLS is activated, use this -# ca_certs = "keys/isrgrootx1.cer" # where the cert file located - # download HiveMQ certificate: https://community.hivemq.com/t/frequently-asked-questions/514 - # create users at https://console.hivemq.com - -[owntracks_options] -owntracks_device = "owntracks/user" # Topic Base of your phone, used for waypoints -owntags_base = nan # topic Base for tags. If `nan` owntracks_devce will be used. - -# Locations are published as retained, this allows clients to get the most recent -# report at any time. Waypoints are intended to be published *without* retain. -[tag_options.prefix] # Change 'prefix' to match your tag. -location = true # (not required) locations are seen by everyone with access to the topic (they act like users) -waypoint = false # (not required) waypoints are only seen on your phone (or device) -timestamp = 1000000001 # (required for wayponts) Must be unique, can be any past Unix/Posix timestamp. -radius = false # (not required) use number for radius in meters, if `false` turn off, if `true` use confidence -mqtt_topic = nan # (not required) topic for this tag, if `nan` owntags_base will be used -status_topic = false # (not required) if `True` messages will be published to `status_base`/prefix From 8d1391fffa2b1b602713004899c3eb27cd7e6069 Mon Sep 17 00:00:00 2001 From: System21 <12837962+Systm21@users.noreply.github.com> Date: Mon, 11 Sep 2023 19:40:03 +0200 Subject: [PATCH 2/7] temporary disable version check, requires Python<3.11 --- application/OwnTags_plugin.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/application/OwnTags_plugin.py b/application/OwnTags_plugin.py index 327bde2..f2b5fb6 100644 --- a/application/OwnTags_plugin.py +++ b/application/OwnTags_plugin.py @@ -6,20 +6,21 @@ import datetime import paho.mqtt.publish as publish import sys +import tomli as toml def get_configuration(): - """ Check Python version and decide how to handle TOML - """ - py_major, py_minor, py_micro, py_release, serial = sys.version_info - version = float(f'{py_major}.{py_minor}') - if version >= 3.11: - import tomllib as toml - elif version >= 3.7: - import tomli as toml - elif version < 3.7: - print(f'Found Python {version}.\nUpgrade to python 3.7 or higher') - exit() +# """ Check Python version and decide how to handle TOML +# """ +# py_major, py_minor, py_micro, py_release, serial = sys.version_info +# version = float(f'{py_major}.{py_minor}') +# if version >= 3.11: +# import tomllib as toml +# elif version >= 3.7: +# import tomli as toml +# elif version < 3.7: +# print(f'Found Python {version}.\nUpgrade to python 3.7 or higher') +# exit() with open('../settings.toml', mode='rb') as fp: configuration = toml.load(fp) From 423d31eb80baf44b2c5639f90191ef07fa344d17 Mon Sep 17 00:00:00 2001 From: System21 <12837962+Systm21@users.noreply.github.com> Date: Mon, 11 Sep 2023 20:06:50 +0200 Subject: [PATCH 3/7] Fix Output Folder Issue --- settings.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/settings.toml b/settings.toml index 236aeb5..e4b10e4 100644 --- a/settings.toml +++ b/settings.toml @@ -10,6 +10,8 @@ print_history = 1 status_msg = false # publish status and metadata # Status messages can be sent to an MQTT Topic status_base = "status/owntags" # topic for status messages +output_folder = "keys/" + [mqtt_secrets] mqtt_broker = "your-broker.com" # broker address From f857ddbe5a828d85bf81787e12978c98a2ecf42e Mon Sep 17 00:00:00 2001 From: System21 <12837962+Systm21@users.noreply.github.com> Date: Mon, 11 Sep 2023 20:08:22 +0200 Subject: [PATCH 4/7] Create keys --- application/keys | 1 + 1 file changed, 1 insertion(+) create mode 100644 application/keys diff --git a/application/keys b/application/keys new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/application/keys @@ -0,0 +1 @@ + From 18773a0fd0af5fba0d848e0aef5e59124a256fe2 Mon Sep 17 00:00:00 2001 From: System21 <12837962+Systm21@users.noreply.github.com> Date: Mon, 11 Sep 2023 20:09:26 +0200 Subject: [PATCH 5/7] Delete application/keys --- application/keys | 1 - 1 file changed, 1 deletion(-) delete mode 100644 application/keys diff --git a/application/keys b/application/keys deleted file mode 100644 index 8b13789..0000000 --- a/application/keys +++ /dev/null @@ -1 +0,0 @@ - From c4a4e182ee43fcfc4c50528ada6784be3ff8ebf2 Mon Sep 17 00:00:00 2001 From: System21 <12837962+Systm21@users.noreply.github.com> Date: Mon, 11 Sep 2023 20:10:55 +0200 Subject: [PATCH 6/7] create keys folder --- application/keys/temporary space | 1 + 1 file changed, 1 insertion(+) create mode 100644 application/keys/temporary space diff --git a/application/keys/temporary space b/application/keys/temporary space new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/application/keys/temporary space @@ -0,0 +1 @@ + From c09d300184e876d624ea28ec6364d6f09471aaee Mon Sep 17 00:00:00 2001 From: System21 <12837962+Systm21@users.noreply.github.com> Date: Mon, 11 Sep 2023 20:12:41 +0200 Subject: [PATCH 7/7] clearify key directory --- application/keys/{temporary space => put your keyfiles here} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename application/keys/{temporary space => put your keyfiles here} (100%) diff --git a/application/keys/temporary space b/application/keys/put your keyfiles here similarity index 100% rename from application/keys/temporary space rename to application/keys/put your keyfiles here