Caution
This is the documentation for the current development branch of the CometVisu. It is possible that some of the described features are not yet available in the current release.
Also there might be lots of errors in this documentation as some parts of the content have been translated by an online translation service.
The RTC widget
Description
The RTC widget allows to control a room temperature controller. The widget shows the currently set target temperature and offers the possibility to change it, as well as to change the operating mode of the controller (normal, eco, off, etc.). For the target temperature a Spinner is used and for the mode a Select.
<cv-rtc>
<cv-address slot="hvacAddress" transform="DPT:20.102">1/4/0</cv-address>
<cv-address slot="temperatureAddress" transform="DPT:9.001">1/4/1</cv-address>
<span slot="label">Living room</span>
</cv-rtc>
The widget requires an address for the target temperature slot="temperatureAddress"
and one for the mode
slot="hvacAddress"
. An optional label can be specified by using <span slot="label">Living room</span>
.
If you only want to show the possibility to change the target temperature when the controller is in normal operation,
you can specify an additional temperatureAddress
with the target show-hide
and a special Mapping.
...
<cv-meta>
<cv-mapping name="RtcOn" type="boolean">
<entry value="comfort">true</entry>
<entry value="economy">false</entry>
<entry value="building Protection">false</entry>
<entry value="stondby">false</entry>
</cv-mapping>
</cv-meta>
...
<cv-rtc>
<cv-address slot="hvacAddress" transform="DPT:20.102">1/4/0</cv-address>
<cv-address slot="temperatureAddress" transform="DPT:9.001">1/4/1</cv-address>
<cv-address slot="temperatureAddress" transform="DPT:20.102" mode="read" target="show-hide" mapping="RtcOn">1/4/0</cv-address>
<span slot="label">Living room</span>
</cv-rtc>
The widget can be customized by specifying the attributes min
, max
, step-width
and format
for the spinner of the target temperature.
For example, the widget can be changed to Fahrenheit by using <cv-rtc min="0" max="100" format="%d °F">
.
If in your use case it is not possible to control the operating mode, the current temperature can be displayed instead.
<cv-rtc format="%.1f">
<cv-address slot="measuredTemperatureAddress" transform="DPT:9.001">1/4/0</cv-address>
<cv-address slot="temperatureAddress" transform="DPT:9.001">1/4/1</cv-address>
<span slot="label">Living room</span>
<span slot="unit">°C</span>
</cv-rtc>
Allowed Attributes in the RTC-Element
Element |
Attribute |
|||
---|---|---|---|---|
Name |
Content |
Description |
||
cv-rtc |
mapping |
string |
Map the bus value to a different value, text or symbol for displaying. See also mapping |
|
styling |
string |
Change the color of the displayed value depending on its value. See also styling |
||
format |
string |
Formatting of the value (printf syntax). |
||
min |
decimal |
Minimum value. |
||
max |
decimal |
Maximum value. |
||
step-width |
decimal |
Step with. |
||
size |
button, 0.5x0.5, 1x0.5, 1x1, 2x1, 2x1.5, 1x2, 2x2, 2x4 or 4x2 |
Size of the tile in {columns}x{rows}, 1x1 is the default size. |
||
visible-on |
mobile or desktop |
Controls this element’s visibility by screen size. |
||
class |
string |
Add this value to the CSS class so that it can be formatted by a user provided style sheet. |
||
style |
string |
Custom CSS style rules for this widget. |
Allowed child-elements and their attributes
Element |
Attribute |
|||
---|---|---|---|---|
Structure |
Name |
Content |
Description |
|
|
slot |
hvacAddress, temperatureAddress, measuredTemperatureAddress or tileAddress |
||
transform |
string |
Defines the datatype in the backend, e.g. DPT:1.001 for KNX datapoint type 1.001. |
||
mode |
disable, read, write or readwrite |
Defines if this address is only used to |
||
value |
string |
Fixed value sent to this address. |
||
on |
click, down or up |
Event on which a |
||
target |
string |
Target in the parent widget the value if this address should be use for. The possible values depend on the parent widget. |
||
format-pos |
decimal |
Position for format string when multiple addresses are used. |
||
qos |
decimal |
Only MQTT: QoS |
||
retain |
true or false |
Only MQTT: retain flag |
||
selector |
string |
Only MQTT: JSON selector |
||
backend |
string |
Optional name of the backend this address belongs to. |
||
mapping |
string |
Map the bus value to a different value, text or symbol for displaying. See also mapping |
||
format |
string |
Formatting of the value (printf syntax). |
||
delay |
positiveInteger |
Optional delay in milliseconds that a write-request to this address is delayed. |
||
send-mode |
on-change or always |
Usually the elements that are using this address receive an update-event only when that value hast changed ( |
Element |
Attribute |
|||
---|---|---|---|---|
Structure |
Name |
Content |
Description |
|
|
slot |
label or unit |
||
tr |
true or false |
Defines that the text content of this element should be translated. |