diff --git a/README.md b/README.md index 6b65307..554477d 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,10 @@ Has multiple export locations out of the box: * PVOutput - Load into PVOutput.org * InfluxDB - Load data directly into InfluxDB * Simple webserver showing collected data +* Rasberry Pi Docker support * and more coming.... -I have borrowed HEAVILY from the following projects, THANK YOU +I have learned a lot from the following projects, THANK YOU * [solariot](https://github.com/meltaxa/solariot) * [modbus4mqtt](https://github.com/tjhowse/modbus4mqtt) * [ModbusTCP2MQTT](https://github.com/TenySmart/ModbusTCP2MQTT) @@ -45,10 +46,8 @@ I have borrowed HEAVILY from the following projects, THANK YOU

(back to top)

## Raodmap / TO DO -* Rasberry Pi Docker support * Full Home Assistant integration, as HACS addon - ## Updates **0.3.0** **IMPORTANT: If updating from v0.1.x or v0.2.x please check config against config-example. some options for MQTT and PVOutput have changed** @@ -56,6 +55,7 @@ I have borrowed HEAVILY from the following projects, THANK YOU * Fixed PVOutput not working after midnight * MQTT now auto-reconnects * MQTT/PVOutput now verify values exist before trying to publish +* Rasberry Pi Docker support * lots more... @@ -261,11 +261,19 @@ SH5K-20, SH3K6, SH4K6, SH5K-V13, SH5K-30, SH3K6-30, SH4K6-30, SH5.0RS, SH3.6RS, ## Building +Multi Arch (BuildX) Including Raspberry Pi +```sh +docker run --privileged --rm tonistiigi/binfmt --install all +docker buildx create --platform linux/amd64,linux/arm64/v8 --use +docker buildx build --push --platform linux/amd64,linux/arm64/v8 -t bohdans/sungather:latest -t bohdans/sungather:v . +``` +Current Arch (docker build) ```sh docker build --no-cache --rm -t bohdans/sungather:latest -t bohdans/sungather:v . docker push bohdans/sungather -a ``` +

(back to top)

## License diff --git a/SunGather/exports/mqtt.py b/SunGather/exports/mqtt.py index 783cbd2..18b106a 100644 --- a/SunGather/exports/mqtt.py +++ b/SunGather/exports/mqtt.py @@ -58,8 +58,9 @@ class export_mqtt(object): logging.info(f"MQTT: Server Disconnected code: {rc}") def on_publish(self, client, userdata, mid): - self.mqtt_queue.remove(mid) - logging.info(f"MQTT: Message {mid} Published") + if mid: + self.mqtt_queue.remove(mid) + logging.info(f"MQTT: Message {mid} Published") def cleanName(self, name): return name.lower().replace(' ','_')