Skip to content

Commit

Permalink
Added missing properties for HLI, LSP and MQTT (#2334)
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Weitkamp <[email protected]>
  • Loading branch information
cweitkamp authored May 4, 2021
1 parent 31494c0 commit a82d3ef
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
@Component(immediate = true, service = MqttBrokerConnectionServiceInstanceMarker.class, //
property = Constants.SERVICE_PID + "=org.openhab.mqttbroker")
@ConfigurableService(factory = true, category = "MQTT", label = "MQTT system broker connection", description_uri = MqttBrokerConnectionServiceInstanceMarker.CONFIG_URI)
@ConfigurableService(factory = true, category = "MQTT", label = "System MQTT Broker", description_uri = MqttBrokerConnectionServiceInstanceMarker.CONFIG_URI)
@NonNullByDefault
public class MqttBrokerConnectionServiceInstanceMarker {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,19 @@
<parameter-group name="group_connection">
<label>Connection</label>
<description>A group of connection parameters.</description>
<advanced>false</advanced>
</parameter-group>

<parameter-group name="group_message_params">
<label>Message</label>
<description>All message parameters.</description>
<advanced>true</advanced>
</parameter-group>

<parameter-group name="group_lastwill_params">
<label>Last Will</label>
<description>All last-will parameters.</description>
<advanced>true</advanced>
</parameter-group>

<parameter name="name" type="text" required="false" groupName="group_connection">
<parameter name="name" type="text" groupName="group_connection">
<label>Connection Name</label>
<description>A connection name helps to identify a broker connection. If nothing is set, an automatic name based on
the host and port will be generated.</description>
Expand All @@ -34,7 +31,7 @@
<label>Broker Host</label>
<description>Hostname or IP of the broker.</description>
</parameter>
<parameter name="port" type="integer" min="1" max="65535" required="false" groupName="group_connection">
<parameter name="port" type="integer" min="1" max="65535" groupName="group_connection">
<label>Broker Port</label>
<description>A custom broker connection port. Leave empty to use the default MQTT ports for secure or non-secure
connections.</description>
Expand All @@ -45,29 +42,28 @@
<description>A broker connection is either a non-secure TCP connection or a TLS secure connection.</description>
<default>false</default>
</parameter>
<parameter name="username" type="text" required="false" groupName="group_connection">
<parameter name="username" type="text" groupName="group_connection">
<label>Broker Username</label>
<description>Broker username.</description>
</parameter>
<parameter name="password" type="text" required="false" groupName="group_connection">
<parameter name="password" type="text" groupName="group_connection">
<label>Broker Password</label>
<description>Broker password.</description>
<context>password</context>
</parameter>
<parameter name="clientID" type="text" required="false" groupName="group_connection">
<parameter name="clientID" type="text" groupName="group_connection">
<label>Client ID</label>
<description>An optional client ID used for this connection.</description>
<advanced>true</advanced>
</parameter>
<parameter name="keepAlive" type="integer" required="false" unit="s" groupName="group_connection">
<parameter name="keepAlive" type="integer" unit="s" groupName="group_connection">
<label>Keep-Alive</label>
<description>Keep-alive timer in seconds. A too frequent timer could conquest the network / spam the MQTT server, a
too low value might risk that a broken connection is detected very late.</description>
<default>60</default>
<advanced>true</advanced>
</parameter>

<parameter name="qos" type="integer" required="false" groupName="group_message_params">
<parameter name="qos" type="integer" groupName="group_message_params">
<label>Quality of Service</label>
<description>The Quality of Service (QoS) level is an agreement between sender and receiver of a message regarding
the guarantees of delivering a message.</description>
Expand All @@ -78,23 +74,22 @@
</options>
<default>0</default>
</parameter>
<parameter name="retainMessages" type="boolean" required="false" groupName="group_message_params">
<parameter name="retainMessages" type="boolean" groupName="group_message_params">
<label>Retain Messages</label>
<description>Messages send by this connection are retained</description>
<default>false</default>
</parameter>

<parameter name="lwtTopic" type="text" required="false" groupName="group_lastwill_params">
<parameter name="lwtTopic" type="text" groupName="group_lastwill_params">
<label>Last Will - Topic</label>
<description>When the connection dies, the last-will is performed by the MQTT server. This is the last-will topic. It
must be set to perform a last-will.</description>
</parameter>
<parameter name="lwtMessage" type="text" required="false" groupName="group_lastwill_params">
<parameter name="lwtMessage" type="text" groupName="group_lastwill_params">
<label>Last Will - Message</label>
<description>When the connection dies, the last-will is performed by the MQTT server. This is the last-will message.
Can be empty.</description>
</parameter>
<parameter name="lwtQos" type="integer" required="false" groupName="group_lastwill_params">
<parameter name="lwtQos" type="integer" groupName="group_lastwill_params">
<label>Last Will - Quality of Service</label>
<description>The Quality of Service (QoS) level is an agreement between sender and receiver of a message regarding
the guarantees of delivering a message.</description>
Expand All @@ -105,7 +100,7 @@
</options>
<default>0</default>
</parameter>
<parameter name="lwtRetain" type="boolean" required="false" groupName="group_lastwill_params">
<parameter name="lwtRetain" type="boolean" groupName="group_lastwill_params">
<label>Last Will - Retain Message</label>
<description>When the connection dies, the last-will is performed by the MQTT server. If retain message is checked,
the message will be retained by the MQTT server.</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
mqtt.config.systemBrokerConnectionInstance.group.group_connection.label = Connection
mqtt.config.systemBrokerConnectionInstance.group.group_connection.description = A group of connection parameters.
mqtt.config.systemBrokerConnectionInstance.group.group_message_params.label = Message
mqtt.config.systemBrokerConnectionInstance.group.group_message_params.description = All message parameters.
mqtt.config.systemBrokerConnectionInstance.group.group_lastwill_params.label = Last Will
mqtt.config.systemBrokerConnectionInstance.group.group_lastwill_params.description = All last-will parameters.

mqtt.config.systemBrokerConnectionInstance.name.label = Connection Name
mqtt.config.systemBrokerConnectionInstance.name.description = A connection name helps to identify a broker connection. If nothing is set, an automatic name based on the host and port will be generated.
mqtt.config.systemBrokerConnectionInstance.host.label = Broker Host
mqtt.config.systemBrokerConnectionInstance.host.description = Hostname or IP of the broker.
mqtt.config.systemBrokerConnectionInstance.port.label = Broker Port
mqtt.config.systemBrokerConnectionInstance.port.description = A custom broker connection port. Leave empty to use the default MQTT ports for secure or non-secure connections.
mqtt.config.systemBrokerConnectionInstance.secure.label = Secure Connection?
mqtt.config.systemBrokerConnectionInstance.secure.description = A broker connection is either a non-secure TCP connection or a TLS secure connection.
mqtt.config.systemBrokerConnectionInstance.username.label = Broker Username
mqtt.config.systemBrokerConnectionInstance.username.description = Broker username.
mqtt.config.systemBrokerConnectionInstance.password.label = Broker Password
mqtt.config.systemBrokerConnectionInstance.password.description = Broker password.
mqtt.config.systemBrokerConnectionInstance.clientID.label = Client ID
mqtt.config.systemBrokerConnectionInstance.clientID.description = An optional client ID used for this connection.
mqtt.config.systemBrokerConnectionInstance.keepAlive.label = Keep-Alive
mqtt.config.systemBrokerConnectionInstance.keepAlive.description = Keep-alive timer in seconds. A too frequent timer could conquest the network / spam the MQTT server, a too low value might risk that a broken connection is detected very late.
mqtt.config.systemBrokerConnectionInstance.qos.label = Quality of Service
mqtt.config.systemBrokerConnectionInstance.qos.description = The Quality of Service (QoS) level is an agreement between sender and receiver of a message regarding the guarantees of delivering a message.
mqtt.config.systemBrokerConnectionInstance.qos.option.0 = At most once (best effort delivery "fire and forget")
mqtt.config.systemBrokerConnectionInstance.qos.option.1 = At least once (guaranteed that a message will be delivered at least once)
mqtt.config.systemBrokerConnectionInstance.qos.option.2 = Exactly once (guarantees that each message is received only once by the counterpart)
mqtt.config.systemBrokerConnectionInstance.retainMessages.label = Retain Messages
mqtt.config.systemBrokerConnectionInstance.retainMessages.description = Messages send by this connection are retained
mqtt.config.systemBrokerConnectionInstance.lwtTopic.label = Last Will - Topic
mqtt.config.systemBrokerConnectionInstance.lwtTopic.description = When the connection dies, the last-will is performed by the MQTT server. This is the last-will topic. It must be set to perform a last-will.
mqtt.config.systemBrokerConnectionInstance.lwtMessage.label = Last Will - Message
mqtt.config.systemBrokerConnectionInstance.lwtMessage.description = When the connection dies, the last-will is performed by the MQTT server. This is the last-will message. Can be empty.
mqtt.config.systemBrokerConnectionInstance.lwtQos.label = Last Will - Quality of Service
mqtt.config.systemBrokerConnectionInstance.lwtQos.description = The Quality of Service (QoS) level is an agreement between sender and receiver of a message regarding the guarantees of delivering a message.
mqtt.config.systemBrokerConnectionInstance.lwtQos.option.0 = At most once (best effort delivery "fire and forget")
mqtt.config.systemBrokerConnectionInstance.lwtQos.option.1 = At least once (guaranteed that a message will be delivered at least once)
mqtt.config.systemBrokerConnectionInstance.lwtQos.option.2 = Exactly once (guarantees that each message is received only once by the counterpart)
mqtt.config.systemBrokerConnectionInstance.lwtRetain.label = Last Will - Retain Message
mqtt.config.systemBrokerConnectionInstance.lwtRetain.description = When the connection dies, the last-will is performed by the MQTT server. If retain message is checked, the message will be retained by the MQTT server.

service.mqtt.systemBrokerConnectionInstance.label = System MQTT Broker
5 changes: 5 additions & 0 deletions bundles/org.openhab.core.model.lsp/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
https://openhab.org/schemas/config-description-1.0.0.xsd">

<config-description uri="misc:lsp">
<parameter name="port" type="integer">
<parameter name="port" type="integer" min="1" max="65535">
<label>Port</label>
<description>The port the language server listens to</description>
<description>The port the language server listens to.</description>
<default>5007</default>
</parameter>
</config-description>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
misc.config.lsp.port.label = Port
misc.config.lsp.port.description = The port the language server listens to.

service.misc.lsp.label = Language Server (LSP)
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
https://openhab.org/schemas/config-description-1.0.0.xsd">

<config-description uri="voice:rulehli">
<parameter name="item" type="text" required="false">
<parameter name="item" type="text">
<context>item</context>
<filter><criteria name="type">String</criteria></filter>
<label>Voice Command Item</label>
<description>The string item to pass voice commands to.</description>
<description>The String Item to pass voice commands to.</description>
<default>VoiceCommand</default>
</parameter>
</config-description>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
voice.config.rulehli.item.label = Voice Command Item
voice.config.rulehli.item.description = The String Item to pass voice commands to.

service.voice.rulehli.label = Rule Voice Interpreter

0 comments on commit a82d3ef

Please sign in to comment.