ERROR -> GetLuaInterface can't find device type:

Trying to figure out why one of my functions won’t run at startup. I’ve installed the “eMail Notification” plugin and created a custom function to send email using the plugin. the function is pretty simplistic (see code below).

function sendSMS(theMessage) luup.call_action("urn:upnp-org:serviceId:SmtpNotification1", "SendEmail", { Recipient_Name="sebby", Recipient_eMail="my@email.address", Subject="", Message=theMessage}, DEV["Smtp Notification"]) end

It works like a champ most of the time, except when i try to call it during intial run of my custom code. in my custom code i call the fucntion, but i get these errors in the log:

01 03/31/16 16:00:22.118 GetLuaInterface can't find device type: 0/0xfd61b0 str: (null) <0x2d720680> 08 03/31/16 16:00:22.119 JobHandler_LuaUPnP::HandleActionRequest device: 0 service: urn:upnp-org:serviceId:SmtpNotification1 action: SendEmail <0x2d720680> 08 03/31/16 16:00:22.120 JobHandler_LuaUPnP::HandleActionRequest argument Message=system is starting up. <0x2d720680> 08 03/31/16 16:00:22.120 JobHandler_LuaUPnP::HandleActionRequest argument Subject= <0x2d720680> 08 03/31/16 16:00:22.121 JobHandler_LuaUPnP::HandleActionRequest argument Recipient_eMail=my@email.address <0x2d720680> 08 03/31/16 16:00:22.121 JobHandler_LuaUPnP::HandleActionRequest argument Recipient_Name=sebby <0x2d720680> 02 03/31/16 16:00:22.122 JobHandler_LuaUPnP::HandleActionRequest can't handle service: urn:upnp-org:serviceId:SmtpNotification1 <0x2d720680>

I think it may be because the plugin is not yet loaded, but i am not sure how to ensure it is loaded before i do the call.

I added a luup.calll_delay of 30 seconds before calling the initiial email call and now things seem to be working. weird thing is that i also do a luup.call_delay for all my code in the startup lua section and upping that delay to over 2 minutes never yielded a success.