Hello!
As the title says, I would like to dynamicaly change the title of a device using LUUP-code. Would that be possible? In this case I would like to change the title of a VariableContainer that I use as a kind of info panel.
Thanks! ;D
Hello!
As the title says, I would like to dynamicaly change the title of a device using LUUP-code. Would that be possible? In this case I would like to change the title of a VariableContainer that I use as a kind of info panel.
Thanks! ;D
One of the problems with this is that much of the display context is held in JavaScript in the browser (if you’re talking about the normal Vera GUI), so a browser refresh would probably be required to view it. Even if could could change it. However, it’s really easy to change the device icon dynamically and have the browser see that change. Switches and security devices do that all the time.
When you want to change the core attributes of a Device, it’s done through
[tt]luup.attr_set()[/tt].
It’s a little trial-and-error, in terms of the attr names since they’re not well documented, but generally it works.
Are you talking about renaming the device or the the name of the variables?
Refer to wiki device renaming or previous post for the other
http://wiki.micasaverde.com/index.php/Luup_Requests#device
[quote=“guessed, post:3, topic:180326”]When you want to change the core attributes of a Device, it’s done through
[tt]luup.attr_set()[/tt].
It’s a little trial-and-error, in terms of the attr names since they’re not well documented, but generally it works.[/quote]
It works very well! Thank You a million times. ;D ;D ;D
Hi @farang
Are you’re willing to share your code?
I’d be interested to see how you’ve used luup.atr_set () with the variable container to do what you wanted.
[quote=“parkerc, post:6, topic:180326”]Hi @farang
Are you’re willing to share your code?
I’d be interested to see how you’ve used luup.atr_set () with the variable container to do what you wanted.[/quote]
Sure, I use it for fetching a weather forecast and presenting the result in a variable container. The title of the variable container may say something like “Tuesday: Possible rain”. And then I add more forecast weather data in the 5 variable holders.
The actual code:
local VCdId = 50 -- My Weather forecast variable Container Id. YOU SHOULD CHANGE THIS
luup.attr_set("name", "Tuesday: Rainstorm", VCdId)
It’s very usable indeed.
Best Home Automation shopping experience. Shop at Ezlo!
© 2026 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules