PDA

View Full Version : W800RF32 Code error in luaconsole


danward79
January 11th, 2007, 11:58 PM
Hi Mike,

I keep getting this in the lua console, it seems to be everytime the W800 receives a status or a signal from a security device.

Serial Error (CallLua): ...s\Promixis\Girder5\luascript\components\W800RF3 2.lua:595: attempt to index field `SecurityDevices' (a nil value)
stack traceback:
...s\Promixis\Girder5\luascript\components\W800RF3 2.lua:595: in function `ReceiveSecurityDevice'
...s\Promixis\Girder5\luascript\components\W800RF3 2.lua:421: in function <...s\Promixis\Girder5\luascript\components\W800RF3 2.lua:340>

Rob H
January 12th, 2007, 03:35 AM
Hmm... I only have 531 lines in my components\W800RF32.lua - can you post the file that you're using here?

danward79
January 12th, 2007, 10:34 AM
Ah Yeah,

Here you are.

danward79
January 14th, 2007, 05:34 AM
Any Luck with this Rob?

Rob H
January 14th, 2007, 06:02 AM
I think you need to add an empty SecurityDevices table to the DefaultSettings table (starting at line 24). Not sure if any other changes are required though, e.g. you may need to add something to the LoadSettings method.

I'm sure Mike will pipe up if that's required.

danward79
January 14th, 2007, 06:52 AM
cool that is better, thanks.

Now Auto adding is not working thou. It is failing at line 614, which is

self:AddSecurityDevice (deviceid, {Name = (self.SecurityDeviceTypes [dt] or 'Unknown') .. ' ' ..deviceid,Type = dt,Location = 'W800RF32'})
end

There is no AddSecurityDevice function in the lua file.

If I change it to "self:AddDevice", it will add but the logger says
LOG: Device Manager : 5 - Provider: W800RF32 Property change not sent - not implemented use the device manager

Rob H
January 14th, 2007, 07:49 AM
Mike, any idea?

Promixis
January 14th, 2007, 10:41 AM
Dan,

Bug fixed.

The log message means that changes to the name of the device only happen when done in the device manger. ie naming changes on the w800 config page and the devicemanager pages are not linked.

danward79
January 14th, 2007, 10:56 AM
Thanks Mike,

Will it be in the next release?