Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kodi2mqtt_import
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
42loop
kodi2mqtt_import
Commits
108c9914
Commit
108c9914
authored
9 years ago
by
Oliver Wagner
Browse files
Options
Downloads
Plain Diff
Merge pull request #12 from 2Zero/tlsEnable
Add TLS options to service and related strings.
parents
18a4eb57
361c370b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
service.mqtt/resources/language/English/strings.po
+20
-0
20 additions, 0 deletions
service.mqtt/resources/language/English/strings.po
service.mqtt/resources/settings.xml
+10
-5
10 additions, 5 deletions
service.mqtt/resources/settings.xml
service.mqtt/service.py
+7
-0
7 additions, 0 deletions
service.mqtt/service.py
with
37 additions
and
5 deletions
service.mqtt/resources/language/English/strings.po
+
20
−
0
View file @
108c9914
...
@@ -51,3 +51,23 @@ msgstr ""
...
@@ -51,3 +51,23 @@ msgstr ""
msgctxt "#30103"
msgctxt "#30103"
msgid "Password"
msgid "Password"
msgstr ""
msgstr ""
msgctxt "#30104"
msgid "Use TLS connection"
msgstr ""
msgctxt "#30105"
msgid "TLS broker CA crt"
msgstr ""
msgctxt "#30106"
msgid "Use client certificates"
msgstr ""
msgctxt "#30107"
msgid "TLS client certificate"
msgstr ""
msgctxt "#30108"
msgid "TLS client key"
msgstr ""
This diff is collapsed.
Click to expand it.
service.mqtt/resources/settings.xml
+
10
−
5
View file @
108c9914
...
@@ -10,5 +10,10 @@
...
@@ -10,5 +10,10 @@
<setting
label=
"30101"
type=
"bool"
id=
"mqttanonymousconnection"
default=
"true"
/>
<setting
label=
"30101"
type=
"bool"
id=
"mqttanonymousconnection"
default=
"true"
/>
<setting
label=
"30102"
type=
"text"
id=
"mqttusername"
default=
""
visible=
"eq(-1,false)"
/>
<setting
label=
"30102"
type=
"text"
id=
"mqttusername"
default=
""
visible=
"eq(-1,false)"
/>
<setting
label=
"30103"
type=
"text"
id=
"mqttpassword"
option=
"hidden"
default=
""
visible=
"eq(-2,false)"
/>
<setting
label=
"30103"
type=
"text"
id=
"mqttpassword"
option=
"hidden"
default=
""
visible=
"eq(-2,false)"
/>
<setting
label=
"30104"
type=
"bool"
id=
"mqtttlsconnection"
default=
"false"
/>
<setting
label=
"30105"
type=
"file"
id=
"mqtttlsconnectioncrt"
value=
""
default=
""
visible=
"eq(-1,true)"
subsetting=
"true"
/>
<setting
label=
"30106"
type=
"bool"
id=
"mqtttlsclient"
default=
"false"
visible=
"eq(-2,true)"
/>
<setting
label=
"30107"
type=
"file"
id=
"mqtttlsclientcrt"
value=
""
default=
""
visible=
"eq(-3,true) + eq(-1,true)"
subsetting=
"true"
/>
<setting
label=
"30108"
type=
"file"
id=
"mqtttlsclientkey"
value=
""
default=
""
visible=
"eq(-4,true) + eq(-2,true)"
subsetting=
"true"
/>
</category>
</category>
</settings>
</settings>
This diff is collapsed.
Click to expand it.
service.mqtt/service.py
+
7
−
0
View file @
108c9914
...
@@ -213,6 +213,13 @@ def startmqtt():
...
@@ -213,6 +213,13 @@ def startmqtt():
mqc
.
on_disconnect
=
disconnecthandler
mqc
.
on_disconnect
=
disconnecthandler
if
__addon__
.
getSetting
(
"
mqttanonymousconnection
"
)
==
'
false
'
:
if
__addon__
.
getSetting
(
"
mqttanonymousconnection
"
)
==
'
false
'
:
mqc
.
username_pw_set
(
__addon__
.
getSetting
(
"
mqttusername
"
),
__addon__
.
getSetting
(
"
mqttpassword
"
))
mqc
.
username_pw_set
(
__addon__
.
getSetting
(
"
mqttusername
"
),
__addon__
.
getSetting
(
"
mqttpassword
"
))
xbmc
.
log
(
"
MQTT: Anonymous disabled, connecting as user: %s
"
%
__addon__
.
getSetting
(
"
mqttusername
"
))
if
__addon__
.
getSetting
(
"
mqtttlsconnection
"
)
==
'
true
'
and
__addon__
.
getSetting
(
"
mqtttlsconnectioncrt
"
)
!=
''
and
__addon__
.
getSetting
(
"
mqtttlsclient
"
)
==
'
false
'
:
mqc
.
tls_set
(
__addon__
.
getSetting
(
"
mqtttlsconnectioncrt
"
))
xbmc
.
log
(
"
MQTT: TLS enabled, connecting using CA certificate: %s
"
%
__addon__
.
getSetting
(
"
mqtttlsconnectioncrt
"
))
elif
__addon__
.
getSetting
(
"
mqtttlsconnection
"
)
==
'
true
'
and
__addon__
.
getSetting
(
"
mqtttlsclient
"
)
==
'
true
'
and
__addon__
.
getSetting
(
"
mqtttlsclientcrt
"
)
!=
''
and
__addon__
.
getSetting
(
"
mqtttlsclientkey
"
)
!=
''
:
mqc
.
tls_set
(
__addon__
.
getSetting
(
"
mqtttlsconnectioncrt
"
),
__addon__
.
getSetting
(
"
mqtttlsclientcrt
"
),
__addon__
.
getSetting
(
"
mqtttlsclientkey
"
))
xbmc
.
log
(
"
MQTT: TLS with client certificates enabled, connecting using certificates CA: %s, client %s and key: %s
"
%
(
__addon__
.
getSetting
(
"
mqttusername
"
),
__addon__
.
getSetting
(
"
mqtttlsclientcrt
"
),
__addon__
.
getSetting
(
"
mqtttlsclientkey
"
)))
topic
=
__addon__
.
getSetting
(
"
mqtttopic
"
)
topic
=
__addon__
.
getSetting
(
"
mqtttopic
"
)
if
not
topic
.
endswith
(
"
/
"
):
if
not
topic
.
endswith
(
"
/
"
):
topic
+=
"
/
"
topic
+=
"
/
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment