Skip to content

Commit ac8d882

Browse files
committed
Change Docker image to run MQTT by default.
1 parent 61bb2c0 commit ac8d882

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ RUN pip install --no-cache-dir -r requirements.txt .
77

88
WORKDIR /opt/PyGrowatt/scripts
99
ENTRYPOINT [ "python" ]
10-
CMD [ "growatt_pvoutput.py", "--config", "/opt/PyGrowatt/scripts/config.ini" ]
10+
CMD [ "growatt_mqtt.py" ]

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Build a [Docker](https://www.docker.com/) container:
3030
```bash
3131
docker build -t pygrowatt .
3232
```
33-
By default, the container runs the example ```growatt_pvoutput.py``` script.
33+
By default, the container runs the example ```growatt_mqtt.py``` script.
3434

3535
### Kubernetes Deployment _(optional)_
3636
At least in minikube, a pod will start with GMT time by default. To enable easy toggling for local time the TZ environment variable was added to the deployment template and can be updated with the [tz database time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for your locale. By default, it is set to Etc/GMT for compatability.
@@ -64,12 +64,19 @@ cp scripts/Growatt.lua ~/.config/wireshark/plugins
6464
```
6565

6666
## Usage
67+
Configure the computer running this script with a staic IP and the ShineWifi-X module to communicate with that IP address, then run one of the following example scripts or create your own!
68+
### MQTT Example Script
69+
To use the example MQTT script you will need to enter your MQTT `ServerIP` and `ServerPort` in the configuration file, then execute the script:
70+
```bash
71+
cd scripts
72+
python growatt_mqtt.py
73+
```
74+
### PVOutput Example Script
6775
To use the example PVOutput script you will need to enter your `Apikey` and `SystemId` in the configuration file, then execute the script:
6876
```bash
6977
cd scripts
70-
python growatt_pvoutput.py --config config.ini
78+
python growatt_pvoutput.py
7179
```
72-
Finally, you need to configure the ShineWifi-X module to communicate with the computer running this script. You will also need to configure the computer running this script with a static IP address.
7380

7481
## Contributing
7582
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

0 commit comments

Comments
 (0)