possible Plugboard issue

2 replies [Last post]
AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012

Hi all,

 

I seem to have picked up a strange bug almost out of the blue whilst creating some plugboard scripts
this is the debug when running xap-plugboard manually

At first i suspected this was an error in a recent lua script but i have sinced removed them from the HAH but continue to have the same error

I have also tried flashing  V310 and Beta V310.1

 

# xap-plugboard
lua: /usr/share/lua/5.1/pl/config.lua:121: attempt to index local 'key' (a nil value)
stack traceback:
        /usr/share/lua/5.1/pl/config.lua:121: in function 'process_name'
        /usr/share/lua/5.1/pl/config.lua:152: in function 'read'
        /etc_ro_fs/plugboard/plugboard.lua:52: in main chunk
        [C]: ?
#

 

Thanks Andrew

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
Andrew, i might be putting 2

Andrew,

 

i might be putting 2 and 2 together and getting 6, but the config.lua file is part of the penlight library used for reading config files. I know the HAh is liable to xap-livebox.ini corruption and maybe this has happened to yours. Not sure if Brett uses the penlight library to read this config file for the plugboard but it makes sense.

i would suggest looking at you xap-livebox.ini file and restoring a backup if you have one.

 

Garry

 

edit: indeed it does. Plugboard.lua uses the config.lua part of penlight as shown here

 

 

collectgarbage("setpause",150) -- default 200%
local scriptdir = args.appletdir
local ini = config.read("/etc/xap-livebox.ini")
AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012
Dear Garry,If i had not

Dear Garry,

If i had not already found a few bugs in the xap-livebox.ini which has just cleared up the issue before checking back here 

i would be saying Garry you are a genius!!

But i think you deserve it anyway!

Cheers

p.s Have 4 sliders controlling various lights in the lounge / kitchen excellent work on the decoding of the dimmable sockets

 

Andrew

Hardware Info