Request for the use of friendly names in addition to device names

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.
Post Reply
User avatar
rbisschops
Posts: 80
Joined: Monday 12 May 2014 11:20
Target OS: Raspberry Pi
Domoticz version: 2.2563
Location: Schiedam, Netherlands
Contact:

Request for the use of friendly names in addition to device names

Post by rbisschops » Monday 18 June 2018 12:36

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
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)

snellejellep
Posts: 116
Joined: Tuesday 16 May 2017 13:05
Target OS: Raspberry Pi
Domoticz version: 3.97xx
Location: The Neterlands
Contact:

Re: Request for the use of friendly names in addition to device names

Post by snellejellep » 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")
raspberry pi | xiaomi gateway/vacuum | yeelight | philips hue | zwave |ubiquiti unifi | harmony

User avatar
rbisschops
Posts: 80
Joined: Monday 12 May 2014 11:20
Target OS: Raspberry Pi
Domoticz version: 2.2563
Location: Schiedam, Netherlands
Contact:

Re: Request for the use of friendly names in addition to device names

Post by rbisschops » Monday 18 June 2018 14:17

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")
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.

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)

mcwieger
Posts: 83
Joined: Tuesday 08 December 2015 10:59
Target OS: NAS (Synology & others)
Domoticz version: 3.7243
Location: Netherlands
Contact:

Re: Request for the use of friendly names in addition to device names

Post by mcwieger » Monday 18 June 2018 15:28

And for use in voice commands, obviously.
Synology DS414|Zwave.Me RC2|Harmony Elite|Imperihome|Alexa
Aeotec: Stick 5|3x MultiSensor 6|4x Smart Dimmer 6
Qubino: 6xZMNHDD1|4xZMNHAD1|1x ZMNHBD1
Fibaro: 6x FGRM222|3x FGS212|1x FGS223|2x FGWPE
Onkyo TX-NR616|D-Link DCS-825L|Kodi HTPC|SE4000|P1 Cable

User avatar
rbisschops
Posts: 80
Joined: Monday 12 May 2014 11:20
Target OS: Raspberry Pi
Domoticz version: 2.2563
Location: Schiedam, Netherlands
Contact:

Re: Request for the use of friendly names in addition to device names

Post by rbisschops » Wednesday 20 June 2018 22:31

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")
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.

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)

User avatar
DeBaat
Posts: 31
Joined: Saturday 27 January 2018 15:52
Target OS: NAS (Synology & others)
Domoticz version: V3.8153
Contact:

Re: Request for the use of friendly names in addition to device names

Post by DeBaat » Wednesday 20 June 2018 22:47

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests