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
908ae30a
Commit
908ae30a
authored
9 years ago
by
Oliver Wagner
Browse files
Options
Downloads
Plain Diff
Merge pull request #7 from drlobo/master
Added Authentication settings
parents
889df3f5
2cd38aa3
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
+15
-0
15 additions, 0 deletions
service.mqtt/resources/language/English/strings.po
service.mqtt/resources/settings.xml
+6
-1
6 additions, 1 deletion
service.mqtt/resources/settings.xml
service.mqtt/service.py
+3
-1
3 additions, 1 deletion
service.mqtt/service.py
with
24 additions
and
2 deletions
service.mqtt/resources/language/English/strings.po
+
15
−
0
View file @
908ae30a
...
...
@@ -32,3 +32,18 @@ msgctxt "#30013"
msgid "MQTT Topic Prefix"
msgstr ""
msgctxt "#30100"
msgid "Authentication"
msgstr ""
msgctxt "#30101"
msgid "Use anonymous connection"
msgstr ""
msgctxt "#30102"
msgid "Username"
msgstr ""
msgctxt "#30103"
msgid "Password"
msgstr ""
This diff is collapsed.
Click to expand it.
service.mqtt/resources/settings.xml
+
6
−
1
View file @
908ae30a
...
...
@@ -5,4 +5,9 @@
<setting
label=
"30012"
type=
"number"
id=
"mqttport"
default=
"1883"
/>
<setting
label=
"30013"
type=
"text"
id=
"mqtttopic"
default=
"kodi/"
/>
</category>
<category
label=
"30100"
>
<setting
label=
"30101"
type=
"bool"
id=
"mqttanonymousconnection"
default=
"true"
/>
<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)"
/>
</category>
</settings>
This diff is collapsed.
Click to expand it.
service.mqtt/service.py
+
3
−
1
View file @
908ae30a
...
...
@@ -207,6 +207,8 @@ def startmqtt():
mqc
.
on_message
=
msghandler
mqc
.
on_connect
=
connecthandler
mqc
.
on_disconnect
=
disconnecthandler
if
__addon__
.
getSetting
(
"
mqttanonymousconnection
"
)
==
'
false
'
:
mqc
.
username_pw_set
(
__addon__
.
getSetting
(
"
mqttusername
"
),
__addon__
.
getSetting
(
"
mqttpassword
"
))
topic
=
__addon__
.
getSetting
(
"
mqtttopic
"
)
if
not
topic
.
endswith
(
"
/
"
):
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