Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper Ennik committed Jun 13, 2022
1 parent 76d3519 commit f71665e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Examples/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ services:

- pvinflux=True
- pvinflux2=True
- pvifhost=influxdb
- pvifhost=localservername
- pvif2protocol=http
- pvif2org=acme
- pvif2bucket=fusionsolar
Expand All @@ -61,7 +61,7 @@ services:
- pvpvoutputapikey=GENERATE_THIS_AND_SYSTEMID_ON_PVOUTPUT.ORG

- pvmqtt=True
- pvmqtthost=mosquitto
- pvmqtthost=localservername
- pvmqttauth=False

volumes:
Expand Down
4 changes: 2 additions & 2 deletions pvmqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def publish_to_mqtt(self, fusionsolar_json_data):
auth_obj = None

try:
self.logger.info("Publishing to MQTT. Data: {}".format(jsonmsg))
publish.single(
self.conf.mqtttopic,
payload=jsonmsg,
Expand All @@ -30,8 +31,7 @@ def publish_to_mqtt(self, fusionsolar_json_data):
client_id=self.conf.pvsysname,
keepalive=60,
auth=auth_obj
)
self.logger.info("Published data to MQTT: {}".format(str(jsonmsg)))
)

except TimeoutError as e:
self.logger.error("Timeout while publishing to MQTT: '{}'".format(str(e)))
Expand Down

0 comments on commit f71665e

Please sign in to comment.