Code that hides elements whose name is prefixed with a $

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
redswan
Posts: 19
Joined: Monday 23 October 2017 17:07
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.5
Contact:

Code that hides elements whose name is prefixed with a $

Post by redswan »

Hi all,

I'm looking for the file(s) that contain the code for hiding elements by prefixing the name with a $. I've looked through a lot of the source, XXcontroller.js, some .cpp, to no avail. Is this done server side or client side - I imagine it's client side. If someone can point me in the right direction I'd me most grateful. I have an idea for another use of this idea, with a different character - hiding the icon - especially for text devices and was curious how this was implemented.

Thanks in advance.

Chris
HvdW
Posts: 624
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Code that hides elements whose name is prefixed with a $

Post by HvdW »

Here you go Chris.
viewtopic.php?t=42583
Bugs bug me.
User avatar
waltervl
Posts: 5991
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Code that hides elements whose name is prefixed with a $

Post by waltervl »

redswan wrote: Sunday 20 July 2025 22:41 I have an idea for another use of this idea, with a different character - hiding the icon - especially for text devices and was curious how this was implemented.
This requested functionality could better be implemented by an edit option on the device, not by some special character in the name.
This probably would require an extra column in the device definition table of the database.
Perhaps not needed if you would add an option to change the icon to none instead of default or some custom.

Or a default UI setting in menu Setup-Settings to hide Icons for Text devices.

You could also hide icons for text devices in the theme.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
redswan
Posts: 19
Joined: Monday 23 October 2017 17:07
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.5
Contact:

Re: Code that hides elements whose name is prefixed with a $

Post by redswan »

HvdW wrote: Monday 21 July 2025 9:43 Here you go Chris.
viewtopic.php?t=42583
Thanks HvdW for the tip but I was actually looking for the code which implemented this, i.e. detects the presence of a $ and hides the device.
waltervl wrote: Monday 21 July 2025 11:03 This requested functionality could better be implemented by an edit option on the device, not by some special character in the name.
This probably would require an extra column in the device definition table of the database.
Agreed, it was just an idea and I wondered how the $ mechanism was implemented.
waltervl wrote: Monday 21 July 2025 11:03 Perhaps not needed if you would add an option to change the icon to none instead of default or some custom.
I'd also thought of this, in fact I have already, almost, implemented this on my installation. i.e. I hide the icon if it is the default icon. Maybe the default icon for Text devices could be "none" though this would change the behaviour for current installations.
Probably the easiest solution to implement.
waltervl wrote: Monday 21 July 2025 11:03 Or a default UI setting in menu Setup-Settings to hide Icons for Text devices.

You could also hide icons for text devices in the theme.
Kedi
Posts: 578
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Code that hides elements whose name is prefixed with a $

Post by Kedi »

I think if you search the source of 'WebServerCmds.cpp' and/or 'WebServer.cpp' for '$' you will find what you are searching for.
Logic will get you from A to B. Imagination will take you everywhere.
redswan
Posts: 19
Joined: Monday 23 October 2017 17:07
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.5
Contact:

Re: Code that hides elements whose name is prefixed with a $

Post by redswan »

Kedi wrote: Tuesday 22 July 2025 13:57 I think if you search the source of 'WebServerCmds.cpp' and/or 'WebServer.cpp' for '$' you will find what you are searching for.
Thanks Kedi, I missed those files as I only looked in the folder "webserver" and not in "main". All I have to do now is understand ;)
HvdW
Posts: 624
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Code that hides elements whose name is prefixed with a $

Post by HvdW »

When you have found how it works please share how to hide the icons in text devices.
Bugs bug me.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest