Function location/scope question?

Is there somewhere that I can place functions that I wish to be accessible to scenes in a global fashion, so I don’t have to copy & paste between scene-specific luup text entry boxes?

Also, Are these entry boxes in their own namespace, or do the functions I write for each scene need to be uniquely named?


Yes. If you place global functions in the startup Lua code they can be accessed by all scenes since they also run in the same context / namespace, whereas all the device code is in separate contexts (one for each device.)

This also may be of interest to you:,29627.msg209898.html#msg209898

[quote=“a-lurker, post:3, topic:188342”]This also may be of interest to you:,29627.msg209898.html#msg209898[/quote]

Perfect! Thank you!