Skip to content

Commit

Permalink
Merge pull request #39 from AnotherDaniel/develop
Browse files Browse the repository at this point in the history
Enable timezone handling, fix minor logging glitch
  • Loading branch information
AnotherDaniel authored Feb 8, 2024
2 parents 7afe9a1 + fb6381b commit 247c203
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM alpine:3

# Prepare base system
RUN apk update && apk upgrade && \
apk add python3 py3-pip pipx git
apk add tzdata python3 py3-pip pipx git

# Set up smahub folder
RUN mkdir -p /opt/smahub
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
# ports:
# - 5678:5678
environment:
- TZ=Europe/London
- TRIPOWERX_ENABLED=true
- TRIPOWERX_ADDRESS=192.0.2.1
- TRIPOWERX_USER=user
Expand Down
5 changes: 1 addition & 4 deletions plugins/sinks/mqtt/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ def execute(config, get_items, register_callback, do_stop):
ssl_certfile = config['server'].get('sslCert', None)
ssl_keyfile = config['server'].get('sslKey', None)

if ssl_cafile is None:
logging.error("Missing CA certificate")

client.tls_set(ssl_cafile, certfile=ssl_certfile, keyfile=ssl_keyfile, tls_version=tls)
client.tls_set(ca_certs=ssl_cafile, certfile=ssl_certfile, keyfile=ssl_keyfile, tls_version=tls)
logging.info("TLS enabled")

tls_insecure = config['server'].get('tls_insecure', None)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]

[project]
name = "smahub"
version = "1.5.5"
version = "1.5.6"
authors = [{ name = "Daniel Krippner", email = "[email protected]" }]
description = "Little daemon that runs plugins for collecting data from SMA PV products, and publishes to eg MQTT via other plugins."
readme = "README.md"
Expand Down

0 comments on commit 247c203

Please sign in to comment.