Using Lua to get controller name.

I can’t find an example of how to get the controller name using Lua. Anyone else know?

Which name were you thinking of? The unique machine ID is called [tt]pk_accesspoint[/tt] and is an eight-digit number. You can access it with [tt]luup.pk_accesspoint[/tt].

But perhaps you need the DNS name?

Ideally, I’d like to get the unit name, under User Account Info/User Settings.

I just created a table in setup that has the index of the luup.pk_accesspoint and reference a name value. I was mainly wanting it so that I can have the same code on multiple controllers and use situation logic to determine sequences. For instance, sending emails when a reboot occurs, etc.

@akbooer - Thanks for your input.