Author Topic: function SVeraAlert_VeraAlert1_SendAlert_job failed: attempt to index field '?'  (Read 173 times)

Offline Wtrdp

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Hello Richard, all,

Alerts stopped coming somewhere last summer, but I only got to trying to get things back working now :( I got simple alerts working again, but when using templates as in below message it seems to fail - logs pasted below. The device is a  connector to Asterisk PBX that I built years ago. It works fine as far as I can see in other events/actions. Do you have any suggestions? Thanks!

08      02/10/18 0:07:52.225    JobHandler_LuaUPnP::HandleActionRequest device: 129 service: urn:richardgreen:serviceId:VeraAlert1 action: SendAlert <0x2ebf4680>
08      02/10/18 0:07:52.226    JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=129 <0x2ebf4680>
08      02/10/18 0:07:52.227    JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:richardgreen:serviceId:VeraAlert1 <0x2ebf4680>
08      02/10/18 0:07:52.227    JobHandler_LuaUPnP::HandleActionRequest argument action=SendAlert <0x2ebf4680>
08      02/10/18 0:07:52.228    JobHandler_LuaUPnP::HandleActionRequest argument Message=Hello, {device([Extension 7201].LastCallerIDName)} ({device([Extension 7201].LastCallerIDNum)}) is calling the M72 land line! <0x2ebf4680>
08      02/10/18 0:07:52.228    JobHandler_LuaUPnP::HandleActionRequest argument rand=0.1639978574234946 <0x2ebf4680>
50      02/10/18 0:07:52.231    luup_log:129: VeraAlert:129:SendAlert:UsingDefaultRecipients:Pushbullet,SMTP-Mail <0x2abb2310>
50      02/10/18 0:07:52.232    luup_log:129: VeraAlert:129:SendAlert:Msg:Hello, {device([Extension 7201].LastCallerIDName)} ({device([Extension 7201].LastCallerIDNum)}) is calling the M72 land line! <0x2abb2310>
01      02/10/18 0:07:52.233    LuaInterface::CallFunction_Job device 129 function SVeraAlert_VeraAlert1_SendAlert_job failed [string "module("veraTemplateDevice", package.seeall..."]:76: attempt to index field '?' (a nil value) <0x2abb2310>
01      02/10/18 0:07:52.234    Lua_Job::Run job#32 : dev:129 (0x12b0268) P:50 S:0 Id: 32 failed <0x2abb2310>
04      02/10/18 0:07:52.235    <Job ID="32" Name="" Device="129" Created="2018-02-10 0:07:52" Started="2018-02-10 0:07:52" Completed="2018-02-10 0:07:52" Duration="0.5049000" Runtime="0.3749000" Status="Failed" LastNote=""/> <0x2abb2310>
02      02/10/18 0:07:52.261    JobHandler::PurgeCompletedJobs purge job#32 : dev:129 (0x12b0268) P:50 S:2 Id: 32  status 2 <0x2abb2310>

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +763/-142
Sounds like you have a misplaced ? in your template.
Maybe you expect to have a conditional evaluation ... but it is being passed as an argument.