homieiot/convention

Changes

Changes from v3.0.0 to v3.0.1

Commits

Commit title Date Hash
Stateful attribute for properties (#108) 2018-10-27 15:22:20 +0200 730357e
Remove regex requirement (#88) 2018-04-29 14:32:39 +0200 081214d
Use “true” instead of “on” (#89) 2018-04-27 14:51:40 +0200 5cbe5ee
Add FAQ, discuss getter topic (#87) 2018-04-27 14:29:27 +0200 fb8d153
Add my ESP32 IDF implementation (#73) 2018-04-23 15:25:24 -0700 7d9f236

Differences


v3.0.0
v3.0.1
n3version: v3.0.0n3version: v3.0.1
4releasedate: 25. March 20184releasedate: 27. October 2018
nn30* [FAQ and Rationale](#faq)
31
nn97
98Properties can be **retained**.
99A property is retained by default. A non-retained property would be useful for momentary events (door bell pressed).
100
101A combination of those flags compiles into this list:
102
103* **retained + non-settable**: The node publishes a property state (temperature sensor)
104* **retained + settable**: The node publishes a property state, and can receive commands for the property (by controller or other party) (lamp power)
105* **non-retained + non-settable**: The node publishes momentary events (door bell pressed)
106* **non-retained + settable**: The node publishes momentary events, and can receive commands for the property (by controller or other party) (brew coffee)
nn446 </tr>
447 <tr>
448 <td>$retained</td>
449 <td>Device → Controller</td>
450 <td>Specifies whether the property is retained (<code>true</code>) or non-retained (<code>false</code>). Publishing to a non-retained property topic MUST always happen with the MQTT 'retain' flag off.</td>
451 <td><code>true</code> or <code>false</code></td>
452 <td>Yes</td>
453 <td>No (<code>true</code>)</td>
n495 <code>regex:pattern</code> to provide a regex that can be used to match the value. e.g. <code>regex:[A-Z][0-9]+</code>.n
496 <br>Valid for datatype <code>string</code>
497 </li>
498 <li>
n506 <td>Depends on $datatype</td>n522 <td>No for $datatype <code>string</code>,<code>integer</code>,<code>float</code>,<code>boolean</code>. Yes for <code>enum</code>,<code>color</code></td>
n530homie/kitchen-light/light/power/set ← "on"n546homie/kitchen-light/light/power/set ← "true"
nn601----
602----
tt604## FAQ
605
606In this section frequently asked questions will be answered.
607This includes design decisions and drawn compromises in the specifics of the Homie convention.
608
609### How do I query/request a property?
610
611You don't.
612The MQTT protocol does not implement the request-reply but rather the publish-subscribe messaging pattern.
613The Homie convention follows the publish-subscribe principle by publishing data as retained messages on a regular basis.
614You might want to rethink the design of your application - in most scenarios a regularly updated information is sufficient.
615
616*Workaround:* You are free to implement your own ideas on top of the basic structure of the Homie convention.
617You could either implement a `get` getter topic and its logic to trigger a value update, or you may exploit the concept of Homie properties and define a settable property to trigger a value update.
618
619A discussion on the matter can be found in issue [#79](https://github.com/homieiot/convention/issues/79).
620
621