I've been trying to get Dashticz up and running, as Imperihome has gone west... had some strange things happening; hopefully someone knows of a way around these.
When using friendly block IDs rather than the idx number, I don't think that everything works quite as well as with idx values:
(i) using spaces in the names - e.g. 'Hall sensor' - causes the device to display as an empty widget, no text or icon, but clickable and pops up the right chart;
(ii) the _1, _2 syntax for getting at the sub-devices (temp, hum, etc) doesn't work when the block ID isn't the idx number; '653_1' works, 'HallSensor_1' does not (no widget, just empty space). Notably, using '653_1' still works even when the block ID is 'HallSensor', and the widget label is the domoticz device name not the one defined in the dashticz block, so I guess that the sub-device handling is not using the blocks as defined in CONFIG.js but instead is hard-wired to the device ids.
Is there a way to use friendly names with sub-devices?
Friendly names are much more readable and also provide a layer of abstraction so that columns don't have to be changed in addition to the block if the underlying device idx changes in domoticz.
Also, is there a single widget for temp/hum sensors, or do those have to be handled as two items that show in separate widgets? A simple '23C / 45%' in one widget would look cleaner IMO.
Thanks!
Using sub-devices and friendly device IDs (e.g. Sensor_1)
Moderators: leecollings, htilburgs, robgeerts
-
- Posts: 75
- Joined: Monday 23 January 2017 23:30
- Target OS: Linux
- Domoticz version: 2023.1
- Location: UK
- Contact:
Using sub-devices and friendly device IDs (e.g. Sensor_1)
Domoticz, Z-Stick Gen.5, zzh Zigbee, rxftrx433XL on Ubuntu 22.04, HP 290 G1.
Node Red, MQTT, 80+ Z-wave, ESP8266 & Shelly, handful of Zigbee bulbs. EMS-ESP gateway for Bosch boiler. Controlicz, until it dies :-(
Node Red, MQTT, 80+ Z-wave, ESP8266 & Shelly, handful of Zigbee bulbs. EMS-ESP gateway for Bosch boiler. Controlicz, until it dies :-(
-
- Posts: 2291
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Using sub-devices and friendly device IDs (e.g. Sensor_1)
The last question is most easy. Add the following block parameter to show temp and humidity in one block:
I see this is not documented, and will be added (@hansienl?)
Spaces in friendly name are not supported.
Main reason: the 'friendly name' is also used in the CSS class definitions and the function calls in custom.js. In both situations spaces are not allowed.
You can't attach a subindex to a friendly name. However, you can use a subidx in the idx parameter. So I would recommend to use something like:
Then some background on how Dashticz select the block definition. In case you add '653_1' to a column definition, then first Dashticz creates a default block for device 653, subdevice 1. Next, Dashticz will search for a block definition with the name '653', and merge the settings from this block into the newly created block. As a last step Dashticz searches for block definition '653_1' and merges these settings as well.
So in case there is no block definition '653' or '653_1', then Dashticz will just add a default block for device 653, subdevice 1 to the column.
I hope this answers your questions.
Code: Select all
single_block: true
Spaces in friendly name are not supported.
Main reason: the 'friendly name' is also used in the CSS class definitions and the function calls in custom.js. In both situations spaces are not allowed.
You can't attach a subindex to a friendly name. However, you can use a subidx in the idx parameter. So I would recommend to use something like:
Code: Select all
blocks['HallSensorTemp'] = {
idx: '653_1'
}
So in case there is no block definition '653' or '653_1', then Dashticz will just add a default block for device 653, subdevice 1 to the column.
I hope this answers your questions.
Who is online
Users browsing this forum: No registered users and 1 guest