Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Candle - the privacy friendly smart home authored Mar 21, 2022
1 parent fa4f1b0 commit 068467f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
7 changes: 6 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"Mute the radio": false,
"Satellite device control": true,
"Disable security": false,
"MQTT port": 1885,
"Debugging": false
},
"schema": {
Expand Down Expand Up @@ -180,6 +181,10 @@
"description": "Advanced. Disabling security might make Voco play nice with older/other versions of Candle or the Webthings Gateway.",
"type": "boolean"
},
"MQTT port": {
"description": "Advanced. By default Candle uses port 1885, but you can override that here by entering a different port number.",
"type": "integer"
},
"Debugging": {
"description": "Advanced. Debugging allows you to diagnose any issues with the add-on. If enabled it will result in a lot more debug data in the internal log (which can be found under settings -> developer -> view internal logs).",
"type": "boolean"
Expand All @@ -190,7 +195,7 @@
}
},
"short_name": "Voco",
"version": "2.8.20",
"version": "2.8.22",
"web_accessible_resources": [
"css/*.css",
"images/*.svg",
Expand Down
18 changes: 16 additions & 2 deletions pkg/voco_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def __init__(self, verbose=True):

# MQTT client
self.mqtt_client = None
self.mqtt_port = 1884
self.mqtt_port = 1885
self.mqtt_connected = False
self.voco_connected = True
self.mqtt_others = {}
Expand Down Expand Up @@ -811,7 +811,7 @@ def add_from_config(self):
self.DEBUG = bool(config['Debugging'])
if self.DEBUG:
print("Debugging enabled")

print("config: " + str(config))

# Disable security
try:
Expand Down Expand Up @@ -1031,6 +1031,20 @@ def add_from_config(self):
print("Error loading voice setting(s) from config: " + str(ex))


# MQTT port
try:
if 'MQTT port' in config:
mqtt_port = config['MQTT port']
if mqtt_port != None:
self.mqtt_port = int(mqtt_port)

if self.DEBUG:
print("-MQTT port was present in the config data: " + str(self.mqtt_port))


except Exception as ex:
print("Error loading mqtt port from config: " + str(ex))




Expand Down

0 comments on commit 068467f

Please sign in to comment.