Cleanup
This commit is contained in:
parent
787e39eff1
commit
0b1c87323a
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,9 +1,4 @@
|
||||
.pio/*
|
||||
.vscode/*
|
||||
*.map
|
||||
test/*.md
|
||||
test/env/*
|
||||
test/configure_*.py
|
||||
TODO.md
|
||||
src_docs/_build/*
|
||||
data/*.min.htm
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 )
|
Loading…
Reference in New Issue
Block a user