Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions docker/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ RUN apt-get clean && apt-get update && apt-get upgrade -y
# Set the locale
RUN apt-get install -y locales && locale-gen en_US.UTF-8

#Install required python packages
#Install required python packages
RUN pip install paho-mqtt
RUN pip install requests
RUN pip install requests
RUN pip install influxdb
RUN pip install influxdb-client
RUN pip install influxdb-client
RUN pip install psutil

COPY grott.py /app/grott.py
COPY grottconf.py /app/grottconf.py
COPY grottdata.py /app/grottdata.py
COPY grottproxy.py /app/grottproxy.py
COPY grottsniffer.py /app/grottsniffer.py
COPY grott.ini /app/grott.ini
COPY grottserver.py /app/grottserver.py
COPY examples/grott.ini /app/grott.ini
COPY examples/Extensions/grottext.py /app/grottext.py
COPY examples/Extensions/grotcsv.py /app/grotcsv.py

WORKDIR /app
CMD ["python", "-u", "grott.py", "-v"]
CMD ["python", "-u", "grott.py", "-v"]
17 changes: 14 additions & 3 deletions grottdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,20 @@ def procdata(conf,data):
"d" : pvodate,
"t" : pvotime,
#2.7.1 "v1" : definedkey["pvenergytoday"]*100,
"v2" : definedkey["pvpowerout"]/10,
"v6" : definedkey["pvgridvoltage"]/10
"v2" : definedkey["pvpowerin"]/10, # Power generated by solar
"v3" : definedkey["elocalloadtod"]*100 - definedkey["edischarge1tod"]*100 + definedkey["eharge1tod"]*100, # Energy used by house today, excluding from battery, including battery charge
"v4" : definedkey["plocaloadr"]/10 - definedkey["pdischarge1"]/10 + definedkey["pcharge1"]/10, # Power used by house, excluding battery discharge, including battery charge
"v6" : definedkey["pvgridvoltage"]/10,

"v7" : definedkey["soc"], # Battery state of charge
"v8" : definedkey["pcharge1"]/10 if definedkey["pcharge1"] != 0 else -definedkey["pdischarge1"]/10, # Battery chage power
# "v9" : definedkey["pdischarge1"]/10, # Battery discharge power

"v9" : definedkey["plocaloadr"]/10, # Power used by house
"v10" : definedkey["elocalloadtod"]*100, # Energy used by house today

"v11" : definedkey["pactogridtot"]/10 if definedkey["pactogridtot"] != 0 else -definedkey["pactouserr"]/10, # Power export/imort to/from grid. Negative = import
"v12" : definedkey["etogridtod"]*100 - definedkey["etousertod"]*100 # Energy exported/imported to/from grid. Negative = import
}
if not conf.pvdisv1 :
pvdata["v1"] = definedkey["pvenergytoday"]*100
Expand Down Expand Up @@ -859,4 +871,3 @@ def procdata(conf,data):
##print("\t -", ext_result)
else:
if conf.verbose : print("\t - " + "Grott extension processing disabled ")

Loading