Exclellent question, and very topical since I see that @bucko has asked the same thing recently. So thank you for starting a new thread on the topic. [Edit: so I actually merged them into one topic]
Plugin devices need to be created explicitly following the example shown in the startup.lua file. You can either do this in that file or run the commands interactively in the Lua Test window. The downside of doing the latter is that you will lose them if you ever need to start from scratch again. My recommendation would be always to have a startup.lua file which can be run to create your current system.
All that’s needed is a one-liner to create the device. Usually it’s enough just to provide a name and the Device xml filename, such as for DataYours
luup.create_device ("", "", "DataYours", "D_DataYours.xml")
At this time your could also configure key device attributes and/or variables. For example Sonos
do -- Sonos
local sonos = luup.create_device ('', "Sonos", "Sonos", "D_Sonos1.xml")
luup.ip_set ("172.16.42.195", sonos)
end
Does this answer your question?