Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge some updates to Readme.MD and added Timezone info #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ ENV MQTT_SERVER="localhost"
ENV MQTT_USERNAME=""
ENV MQTT_PASSWORD=""

ENV TZ=""

RUN apk add -U tzdata

WORKDIR /usr/src/app

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY ginlong-scraper.py ./

CMD [ "python", "./ginlong-scraper.py" ]
CMD [ "python", "./ginlong-scraper.py" ]
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Dockerized version of [ginlong-scraper](https://github.com/dkruyt/ginlong-scraper)

For Docker newbies i would suggest running this with Portainer https://www.portainer.io/installation/

You can also move the environment variables into an ENV file and invoke that on the commandline when
invoking the docker image.

In the case of two inverters (see note below) once you have the deviceid you can set up two seperate docker containers
and just vary the deviceId in the environment variables.

Scrapes PV statistics from the Ginlong monitor pages and outputs it to influxdb, pvoutput or mqtt.

There is a possibility it also works with the following inverters: Omnik Solar, Solarman and Trannergy Inverters
Expand Down Expand Up @@ -31,6 +39,33 @@ There is a possibility it also works with the following inverters: Omnik Solar,
| MQTT_SERVER | No | MQTT server | `localhost` |
| MQTT_USERNAME | No | MQTT username | *empty* |
| MQTT_PASSWORD | No | MQTT password | *empty* |
| TZ | No | TimeZone e.g Australia/Sydney | *empty* |

Note that if you have more than 1 device - then it is not readily apparent where to get the Device ID
In that case - setup the script, and set LOG_LEVEL to DEBUG, then view the logs and search for deviceId -
this will list the IDs of each inverter.

Note that the TZData package will not be installed in the container - do the following from the sh shell prompt in the container

apk add tzdata
ls /usr/share/zoneinfo

Suppose you want to use Sydney - Australia

First copy the proper zone to localtime

cp /usr/share/zoneinfo/Australia/Sydney /etc/localtime
Now specify your timezone

echo "Australia/Sydney" > /etc/timezone
date
Result: Wed Mar 8 00:46:05 CET 2006

You can now remove the other timezones

apk del tzdata



## Bonus

Expand Down