mirror of
https://github.com/alexhopeoconnor/SunGather.git
synced 2026-10-23 19:12:11 +10:00
Quick fix to MQTT publish messages
This commit is contained in:
@@ -35,9 +35,10 @@ Has multiple export locations out of the box:
|
|||||||
* PVOutput - Load into PVOutput.org
|
* PVOutput - Load into PVOutput.org
|
||||||
* InfluxDB - Load data directly into InfluxDB
|
* InfluxDB - Load data directly into InfluxDB
|
||||||
* Simple webserver showing collected data
|
* Simple webserver showing collected data
|
||||||
|
* Rasberry Pi Docker support
|
||||||
* and more coming....
|
* 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)
|
* [solariot](https://github.com/meltaxa/solariot)
|
||||||
* [modbus4mqtt](https://github.com/tjhowse/modbus4mqtt)
|
* [modbus4mqtt](https://github.com/tjhowse/modbus4mqtt)
|
||||||
* [ModbusTCP2MQTT](https://github.com/TenySmart/ModbusTCP2MQTT)
|
* [ModbusTCP2MQTT](https://github.com/TenySmart/ModbusTCP2MQTT)
|
||||||
@@ -45,10 +46,8 @@ I have borrowed HEAVILY from the following projects, THANK YOU
|
|||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
|
|
||||||
## Raodmap / TO DO
|
## Raodmap / TO DO
|
||||||
* Rasberry Pi Docker support
|
|
||||||
* Full Home Assistant integration, as HACS addon
|
* Full Home Assistant integration, as HACS addon
|
||||||
|
|
||||||
|
|
||||||
## Updates
|
## Updates
|
||||||
**0.3.0**
|
**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**
|
**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
|
* Fixed PVOutput not working after midnight
|
||||||
* MQTT now auto-reconnects
|
* MQTT now auto-reconnects
|
||||||
* MQTT/PVOutput now verify values exist before trying to publish
|
* MQTT/PVOutput now verify values exist before trying to publish
|
||||||
|
* Rasberry Pi Docker support
|
||||||
* lots more...
|
* lots more...
|
||||||
|
|
||||||
|
|
||||||
@@ -261,11 +261,19 @@ SH5K-20, SH3K6, SH4K6, SH5K-V13, SH5K-30, SH3K6-30, SH4K6-30, SH5.0RS, SH3.6RS,
|
|||||||
|
|
||||||
|
|
||||||
## Building
|
## 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<version> .
|
||||||
|
```
|
||||||
|
Current Arch (docker build)
|
||||||
```sh
|
```sh
|
||||||
docker build --no-cache --rm -t bohdans/sungather:latest -t bohdans/sungather:v<version> .
|
docker build --no-cache --rm -t bohdans/sungather:latest -t bohdans/sungather:v<version> .
|
||||||
docker push bohdans/sungather -a
|
docker push bohdans/sungather -a
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||||
<!-- LICENSE -->
|
<!-- LICENSE -->
|
||||||
## License
|
## License
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ class export_mqtt(object):
|
|||||||
logging.info(f"MQTT: Server Disconnected code: {rc}")
|
logging.info(f"MQTT: Server Disconnected code: {rc}")
|
||||||
|
|
||||||
def on_publish(self, client, userdata, mid):
|
def on_publish(self, client, userdata, mid):
|
||||||
|
if mid:
|
||||||
self.mqtt_queue.remove(mid)
|
self.mqtt_queue.remove(mid)
|
||||||
logging.info(f"MQTT: Message {mid} Published")
|
logging.info(f"MQTT: Message {mid} Published")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user