Scripts not working
I want to get started with the more intelligent stuff. So, I started with sample script to switch off the relay1 after its on for 30 secs., but I get this error:-
# cd /etc
# cd plugboard
# ls
relay1AutoOffApplet.lua
# lua relay1AutoOffApplet.lua
lua: relay1AutoOffApplet.lua:7: bad argument #1 to 'module' (string expected, got nil)
stack traceback:
[C]: in function 'module'
relay1AutoOffApplet.lua:7: in main chunk
[C]: ?
I'm sure that is documented here http://www.dbzoo.com/livebox/hah_plugboard_v2
Applet cannot run standalone without modifications (minor), as supplied they are configured to ran by the plugboard engine.
Brett
The LUA engine is not dependant on any AVR firmware version.
Rebooting will load the applet but if you want to see what is going on its best to stop the plugboard daemon and run it manually from the command line.
# /etc/init.d/xap stop plugboard
# xap-plugboard -i br0
The applet should fire after 30sec of detecting an ON event for relay 1.
I might add that anytime the plugboard engine crashes, when started automatically it will log into /var/log a stack trace for diagnosis. Rebooting erases this area so if you want to find out why it broke, do so BEFORE rebooting.
Have you rebooted the box with the Applet in the /etc/plugboard directory. I don't think you can run it using the command line (lua relay1AutoOffApplet.lua) the plugboard script needs to pick it up when the box starts up.