Hi All,
In other platforms I see the use of a "device name" and a "friendly name". The device name can be something like: "VirtualSwitchFoo", where the friendly name can be "Foo switch".
This would help using more complex names as the device name for use in scripts, while the dashboard stays readable for the day-to-day users of Domoticz.
Is this something the community would like to see implemented (so we can open a request ticket)?
Pro's and con's are also welcome! Can I have your votes!
Thanks,
Ralph
Request for the use of friendly names in addition to device names
Moderators: leecollings, remb0
- rbisschops
- Posts: 63
- Joined: Monday 12 May 2014 11:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2563
- Location: Schiedam, Netherlands
- Contact:
Request for the use of friendly names in addition to device names
RPi 3B (master): RFXtrx433, Harmony Hub, Z-Wave devices, CoCo units, Hue, Xiaomi Aquara
RPi 2B (slave): P1 connection, MySensors with custom built watermeter sensors on Aquadis+
RPi’s with: Mosquitto MQTT, Home Bridge, Home Assistant (for evaluation only)
RPi 2B (slave): P1 connection, MySensors with custom built watermeter sensors on Aquadis+
RPi’s with: Mosquitto MQTT, Home Bridge, Home Assistant (for evaluation only)
-
- Posts: 241
- Joined: Tuesday 16 May 2017 13:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: The Neterlands
- Contact:
Re: Request for the use of friendly names in addition to device names
in dzvents you can do this by defining this at the top of the execute section:
Code: Select all
local scriptname = domoticz.devices("dashboardname")
raspberry pi | xiaomi vacuum | yeelight | philips hue | zwave | ubiquiti unifi | harmony | sonoff | zigbee2mqtt | https://www.youtube.com/channel/UC2Zidl ... m1OLuNldfQ
- rbisschops
- Posts: 63
- Joined: Monday 12 May 2014 11:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2563
- Location: Schiedam, Netherlands
- Contact:
Re: Request for the use of friendly names in addition to device names
Good suggestion, thinking out loud this might me something to define as global variables is dzVents for the time beeing, however there is more than dzVents when it comes to scripting, so imho this still might be a viable request.snellejellep wrote: ↑Monday 18 June 2018 12:52 in dzvents you can do this by defining this at the top of the execute section:Code: Select all
local scriptname = domoticz.devices("dashboardname")
edit: is this possible (defining at a global level)
RPi 3B (master): RFXtrx433, Harmony Hub, Z-Wave devices, CoCo units, Hue, Xiaomi Aquara
RPi 2B (slave): P1 connection, MySensors with custom built watermeter sensors on Aquadis+
RPi’s with: Mosquitto MQTT, Home Bridge, Home Assistant (for evaluation only)
RPi 2B (slave): P1 connection, MySensors with custom built watermeter sensors on Aquadis+
RPi’s with: Mosquitto MQTT, Home Bridge, Home Assistant (for evaluation only)
-
- Posts: 107
- Joined: Tuesday 08 December 2015 9:59
- Target OS: NAS (Synology & others)
- Domoticz version: 2020.1
- Location: Netherlands
- Contact:
Re: Request for the use of friendly names in addition to device names
And for use in voice commands, obviously.
I moved to HomeAssistant. It was fun while it lasted!
- rbisschops
- Posts: 63
- Joined: Monday 12 May 2014 11:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2563
- Location: Schiedam, Netherlands
- Contact:
Re: Request for the use of friendly names in addition to device names
Was overthinking this again. Using local vars is not very helpfull. If you have coded device names like PirLivingroom and PirHalway, you want to use filters or wildcards to select these. That does not work with the local vars. It also isn’t a logical name either. In the frontend you want to see Motion livingroom or somthing like that.snellejellep wrote: ↑Monday 18 June 2018 12:52 in dzvents you can do this by defining this at the top of the execute section:Code: Select all
local scriptname = domoticz.devices("dashboardname")
Any thoughts?
RPi 3B (master): RFXtrx433, Harmony Hub, Z-Wave devices, CoCo units, Hue, Xiaomi Aquara
RPi 2B (slave): P1 connection, MySensors with custom built watermeter sensors on Aquadis+
RPi’s with: Mosquitto MQTT, Home Bridge, Home Assistant (for evaluation only)
RPi 2B (slave): P1 connection, MySensors with custom built watermeter sensors on Aquadis+
RPi’s with: Mosquitto MQTT, Home Bridge, Home Assistant (for evaluation only)
- DeBaat
- Posts: 33
- Joined: Saturday 27 January 2018 14:52
- Target OS: NAS (Synology & others)
- Domoticz version: V3.8153
- Contact:
Re: Request for the use of friendly names in addition to device names
The data set of a device now contains the ID to identify a device.
In order to get this suggestion working, we only need to define an additional field (e.g. "slug") and the ability to set and change its value.
Of course there also needs to be some validation when setting and changing the value to ensure that each device has a unique slug.
The next thing would then be to add the "slug" as additional identifying field to the methods selecting a device.
For efficiency, we could define an index on the database for this new field.
And maybe a sorting button to sort the list on this value.
I would also like to suggest to define a slug as to only contain lower case characters, digits and some 'special' characters like '_'.
When entering a value, you could program to force correct input with something like tolower() and replace any non-alphanumeric character to '_'.
Hope this helps.
In order to get this suggestion working, we only need to define an additional field (e.g. "slug") and the ability to set and change its value.
Of course there also needs to be some validation when setting and changing the value to ensure that each device has a unique slug.
The next thing would then be to add the "slug" as additional identifying field to the methods selecting a device.
For efficiency, we could define an index on the database for this new field.
And maybe a sorting button to sort the list on this value.
I would also like to suggest to define a slug as to only contain lower case characters, digits and some 'special' characters like '_'.
When entering a value, you could program to force correct input with something like tolower() and replace any non-alphanumeric character to '_'.
Hope this helps.
Who is online
Users browsing this forum: No registered users and 1 guest