forked from snaptec/openWB
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Batt_json and Values for JSON Parameters in UpdateConfig.sh (sna…
…ptec#1074) * Fix Batt_json and Values for UpdateConfig JSON PArameters Batt_jason had a problem in SOC Line as htmlspecialcharacters were not masked. It is necessary to keep jq Filter Statements in single quotes so double qoutes are not interpreted by the bash.
- Loading branch information
Showing
2 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -339,19 +339,19 @@ updateConfig(){ | |
echo "evnotifytokenlp2=token" >> $ConfigFile | ||
fi | ||
if ! grep -Fq "wrjsonwatt=" $ConfigFile; then | ||
echo "wrjsonwatt=.watt" >> $ConfigFile | ||
echo "wrjsonwatt='.watt'" >> $ConfigFile | ||
fi | ||
if ! grep -Fq "wrjsonkwh=" $ConfigFile; then | ||
echo "wrjsonkwh=.kwh" >> $ConfigFile | ||
echo "wrjsonkwh='.kwh'" >> $ConfigFile | ||
fi | ||
if ! grep -Fq "wrjsonurl=" $ConfigFile; then | ||
echo "wrjsonurl=http://192.168.0.12/solar_api" >> $ConfigFile | ||
fi | ||
if ! grep -Fq "wr2jsonwatt=" $ConfigFile; then | ||
echo "wr2jsonwatt=.watt" >> $ConfigFile | ||
echo "wr2jsonwatt='.watt'" >> $ConfigFile | ||
fi | ||
if ! grep -Fq "wr2jsonkwh=" $ConfigFile; then | ||
echo "wr2jsonkwh=.kwh" >> $ConfigFile | ||
echo "wr2jsonkwh='.kwh'" >> $ConfigFile | ||
fi | ||
if ! grep -Fq "wr2jsonurl=" $ConfigFile; then | ||
echo "wr2jsonurl=http://192.168.0.12/solar_api" >> $ConfigFile | ||
|
@@ -378,13 +378,13 @@ updateConfig(){ | |
echo "mpm3pmpvlanip=192.168.1.12" >> $ConfigFile | ||
fi | ||
if ! grep -Fq "bezugjsonwatt=" $ConfigFile; then | ||
echo "bezugjsonwatt=.watt" >> $ConfigFile | ||
echo "bezugjsonwatt='.watt'" >> $ConfigFile | ||
fi | ||
if ! grep -Fq "bezugjsonkwh=" $ConfigFile; then | ||
echo "bezugjsonkwh=.kwh" >> $ConfigFile | ||
echo "bezugjsonkwh='.kwh'" >> $ConfigFile | ||
fi | ||
if ! grep -Fq "einspeisungjsonkwh=" $ConfigFile; then | ||
echo "einspeisungjsonkwh=.kwh" >> $ConfigFile | ||
echo "einspeisungjsonkwh='.kwh'" >> $ConfigFile | ||
fi | ||
if ! grep -Fq "bezugjsonurl=" $ConfigFile; then | ||
echo "bezugjsonurl=http://192.168.0.12/solar_api" >> $ConfigFile | ||
|
@@ -445,10 +445,10 @@ updateConfig(){ | |
echo "battjsonurl=192.168.0.10/speicher" >> $ConfigFile | ||
fi | ||
if ! grep -Fq "battjsonsoc"=" $ConfigFile; then | ||
echo "speichersoc_json=.RSOC" >> $ConfigFile | ||
echo "speichersoc_json='.RSOC'" >> $ConfigFile | ||
fi | ||
if ! grep -Fq "battjsonwatt"=" $ConfigFile; then | ||
echo "battjsonwatt=.Consumption_W" >> $ConfigFile | ||
echo "battjsonwatt='.Consumption_Wi'" >> $ConfigFile | ||
fi | ||
if ! grep -Fq "soc_tesla_username=" $ConfigFile; then | ||
echo "[email protected]" >> $ConfigFile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters