mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-24 17:17:06 +01:00
mqtt: settings refactoring & custom topics
- customize will topic qos and retain, ref. #2616 - allow to fully replace will and json topics. empty string means the default <root>/<name> replacement is taken as-is, after applying placeholders - validate will and data topic structure before connecting - validate {suf,post}fix as {suf,post}fix, not as topic
This commit is contained in:
@@ -106,6 +106,42 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Status & Will</legend>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label>Topic</label>
|
||||
<input name="mqttWill" type="text" >
|
||||
<span class="pure-form-message">
|
||||
Status payload will be sent to this topic. When empty, defaults to <strong><root>/<status></strong>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label>Retain flag</label>
|
||||
<input class="checkbox-toggle" type="checkbox" name="mqttWillRetain">
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label>QoS</label>
|
||||
<select class="pure-input-2-3" name="mqttWillQoS">
|
||||
<option value="0">0: At most once</option>
|
||||
<option value="1">1: At least once</option>
|
||||
<option value="2">2: Exactly once</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label>Online payload</label>
|
||||
<input name="mqttPayloadOnline" type="text" required >
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label>Offline payload</label>
|
||||
<input name="mqttPayloadOffline" type="text" required >
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>JSON</legend>
|
||||
|
||||
@@ -120,10 +156,10 @@
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label>Topic name</label>
|
||||
<input type="text" name="mqttJson" required >
|
||||
<label>Topic</label>
|
||||
<input type="text" name="mqttJson" >
|
||||
<span class="pure-form-message">
|
||||
JSON message will be sent to <strong><root>/<name></strong> topic (<strong>data</strong> by default).
|
||||
JSON message will be sent to this topic. When empty, defaults to <strong><root>/<data></strong>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user