Skip to content

Commit

Permalink
Merge pull request #25 from junalmeida/incorrect-default
Browse files Browse the repository at this point in the history
FIx incorrect mqtt_url default
  • Loading branch information
junalmeida authored Jun 9, 2022
2 parents fc7dc8a + 1127fd4 commit 74e9392
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
10 changes: 6 additions & 4 deletions meterparser/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Changelog

## [1.0.1.0]
### [1.0.1.1]
- Fix incorrect mqtt_url default
### [1.0.1.0]
- Set an specific aruco marker number so you can add multiple counters using the same camera
- Move custom mqtt setting to a single url (breaking change)
- If url schema is not http(s), try get an image using ffmpeg
## [1.0.0.28]
### [1.0.0.28]
- Adjust time limit for camera scan interval
- Update base docker images
## [1.0.0.25]
### [1.0.0.25]
- Deal with possible HA restart and username/password change.
## [1.0.0.*]
### [1.0.0.*]
- Make a lower limit so device won't be unavailable
- Easier to read log messages
- Tune limits and fail safe OCR readings
Expand Down
3 changes: 1 addition & 2 deletions meterparser/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Meter Parser
version: 1.0.1.0
version: 1.0.1.1
slug: meter-parser
description: Read meter needles and numbers from a camera snapshot.
url: https://github.com/junalmeida/homeassistant-addons/tree/main/meterparser
Expand All @@ -14,7 +14,6 @@ arch:
- armv7
- i386
options:
mqtt_url: "mqtt://auto_username:auto_password@auto_hostname"
cameras:
- snapshot_url: http://192.168.100.153/snapshot.jpg
name: Water Meter
Expand Down
2 changes: 1 addition & 1 deletion meterparser/src/app/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def run(self):
self.check_auth()

def check_auth(self):
if "mqtt_url" in config:
if "mqtt_url" in config and config["mqtt_url"] is not None and config["mqtt_url"] != "":
mqtt_url = urlparse(config["mqtt_url"])
self._mqtt_config = {
"username": mqtt_url.username,
Expand Down

0 comments on commit 74e9392

Please sign in to comment.