From 0b1c87323a2cd42bca5777aa2c8c2d0da737d2fc Mon Sep 17 00:00:00 2001 From: Magnus Persson Date: Wed, 9 Nov 2022 21:50:49 +0100 Subject: [PATCH] Cleanup --- .gitignore | 5 --- README.md | 2 +- test/configure.py | 91 ----------------------------------------------- 3 files changed, 1 insertion(+), 97 deletions(-) delete mode 100644 test/configure.py diff --git a/.gitignore b/.gitignore index b71bf55..b9451a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,4 @@ .pio/* .vscode/* *.map -test/*.md -test/env/* -test/configure_*.py -TODO.md src_docs/_build/* -data/*.min.htm diff --git a/README.md b/README.md index d45046d..c996f3d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ GravityMon is a replacement firmware for the iSpindle firmware. It's 100% compatible with the iSpindle hardware design so it does not require any hardware changes. -Now also works with ESP32, either an ESP32 d1 mini or ESP32 c3 mini which both are pin compatible with ESP8266. +Now also works with ESP32 d1 mini, ESP32 c3 mini, ESP32 S2 mini which both are pin compatible with ESP8266. Installation can be made using https://www.brewflasher.com or the web version at https://web.brewflasher.com diff --git a/test/configure.py b/test/configure.py deleted file mode 100644 index 9906e87..0000000 --- a/test/configure.py +++ /dev/null @@ -1,91 +0,0 @@ -import requests -import json - -host = "192.168.1.1" # IP adress (or name) of the device to send these settings to -id = "ee1bfc" # Device ID (shown in serial console during startup or in UI) - -def set_config( url, json ): - headers = { "ContentType": "application/json" } - print( url ) - #print( json ) - resp = requests.post( url, headers=headers, data=json ) - if resp.status_code != 200 : - print ( "Failed " ) - else : - print ( "Success " ) - -# -# Configure the device settings. -# -url = "http://" + host + "/api/config/device" -json = { "id": id, - "mdns": "gravmon", # Name of the device - "temp-format": "C", # Temperature format C or F - "sleep-interval": 30 # Sleep interval in seconds - } -set_config( url, json ) - -# -# Configure the push settings. Blank means that its no used. -# -url = "http://" + host + "/api/config/push" -json = { "id": id, - "token": "", - "http-push": "http://192.168.1.1/ispindel", # HTTP endpoint - "http-push2": "", # HTTP endpoint2 - "http-push-h1": "Content-Type: application/json", - "http-push-h2": "", - "http-push2-h1": "Content-Type: application/json", - "http-push2-h2": "", - "influxdb2-push": "", # InfluxDB2 settings - "influxdb2-org": "", - "influxdb2-bucket": "", - "influxdb2-auth": "" , - "mqtt-push": "", - "mqtt-port": 1883, - "mqtt-user": "", - "mqtt-pass": "" - } -set_config( url, json ) - - -# -# Configure the gravity settings. -# -url = "http://" + host + "/api/config/gravity" -json = { "id": id, - "gravity-formula": "", # If you want to set the gravity formula - "gravity-format": "G", - "gravity-temp-adjustment": "off" # on or off - } -set_config( url, json ) - -# -# Configure the hardware settings. -# -url = "http://" + host + "/api/config/hardware" -json = { "id": id, - "voltage-factor": 1.59, # Default value for voltage calculation - "temp-adjustment": 0, # If temp sensor needs to be corrected - "gyro-temp": "off", # Use the temp sensor in the gyro - "ota-url": "" # if the device should seach for a new update when active - } -set_config( url, json ) - -# -# Configure the gravity formula settings. If this is called the formula will be updated based on these measurements (zero angle values will be ignored) -# -url = "http://" + host + "/api/formula" -json = { "id": id, - "a1": 22.4, - "a2": 54.4, - "a3": 58, - "a4": 0, - "a5": 0, - "g1": 1.000, - "g2": 1.053, - "g3": 1.062, - "g4": 1, - "g5": 1 - } -set_config( url, json )