• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ideas Wanted Decision Matrix
#31
(03-11-2019, 04:04 PM)felfert Wrote: Regarding this error:

Code:
root@raspberrypi:/usr/local/lib/pilight/functions# lua testmod.lua oktovent 20 30 23 25
lua: testmod.lua:1: attempt to call field 'pack' (a nil value)
stack traceback:
        testmod.lua:1: in main chunk
        [C]: ?

The pack() function was introduced in lua 5.2.x. So: obviously you have an older lua. (My PC runs Fedora19 which provides a newer - current - lua). On the raspberry, there's only lua 5.1.5. You can print your lua version by running:

Code:
[felfert@fritz ~]$ lua -v

Lua 5.3.5  Copyright (C) 1994-2018 Lua.org, PUC-Rio


Sorry for the inconvenience. Here is a new testmod.lua which is backward-compatible to lua 5.1.x (as found on my raspian "Raspbian GNU/Linux 9 (stretch)"):

Code:
local args = {...}
local argc = select('#', ...)
if (argc < 1) then
    error("testmod requires at least a module name")
end
print(string.format("Testing module %s", args[1]))
m = require(args[1])
print(m .run(select(2,...)))

Great, this testmod is working. So there is probably a Problem with the rule itself, so that pilight is doing Nothing.

If I understand the Manual in the Right way, there should be a comparsion of Arguments:

Code:
"IF oktovent (x,x,x,x) == true, THEN...

But pilight is doing nothing, although testmod Returns true.

@ Curlymo: How will the right Syntax look alike?

PS:A big "Thank you" to felfert!! I wish, I could understand lua…;-)
 
Reply
  


Messages In This Thread
Ideas Wanted Decision Matrix - by Alex - 02-26-2019, 01:53 PM
RE: Ideas Wanted Decision Matrix - by curlymo - 02-27-2019, 09:52 PM
RE: Ideas Wanted Decision Matrix - by Alex - 02-28-2019, 07:10 AM
Ideas Wanted Decision Matrix - by curlymo - 02-28-2019, 07:51 AM
RE: Ideas Wanted Decision Matrix - by Alex - 02-28-2019, 03:38 PM
RE: Ideas Wanted Decision Matrix - by curlymo - 02-28-2019, 09:32 PM
RE: Ideas Wanted Decision Matrix - by Alex - 03-01-2019, 01:35 PM
RE: Ideas Wanted Decision Matrix - by curlymo - 03-01-2019, 02:28 PM
RE: Ideas Wanted Decision Matrix - by Alex - 03-01-2019, 04:57 PM
RE: Ideas Wanted Decision Matrix - by curlymo - 03-01-2019, 06:48 PM
RE: Ideas Wanted Decision Matrix - by Alex - 03-02-2019, 02:50 PM
RE: Ideas Wanted Decision Matrix - by felfert - 03-02-2019, 10:29 AM
RE: Ideas Wanted Decision Matrix - by felfert - 03-02-2019, 01:09 PM
RE: Ideas Wanted Decision Matrix - by felfert - 03-02-2019, 03:33 PM
RE: Ideas Wanted Decision Matrix - by Alex - 03-02-2019, 04:45 PM
RE: Ideas Wanted Decision Matrix - by felfert - 03-02-2019, 05:00 PM
RE: Ideas Wanted Decision Matrix - by Alex - 03-02-2019, 07:07 PM
RE: Ideas Wanted Decision Matrix - by curlymo - 03-02-2019, 04:53 PM
RE: Ideas Wanted Decision Matrix - by curlymo - 03-02-2019, 07:31 PM
RE: Ideas Wanted Decision Matrix - by felfert - 03-03-2019, 01:36 PM
RE: Ideas Wanted Decision Matrix - by curlymo - 03-03-2019, 02:33 PM
RE: Ideas Wanted Decision Matrix - by felfert - 03-03-2019, 04:45 PM
RE: Ideas Wanted Decision Matrix - by felfert - 03-03-2019, 04:56 PM
RE: Ideas Wanted Decision Matrix - by curlymo - 03-03-2019, 06:00 PM
RE: Ideas Wanted Decision Matrix - by felfert - 03-03-2019, 07:31 PM
RE: Ideas Wanted Decision Matrix - by Alex - 03-04-2019, 07:30 AM
RE: Ideas Wanted Decision Matrix - by Alex - 03-10-2019, 06:30 PM
RE: Ideas Wanted Decision Matrix - by curlymo - 03-10-2019, 06:45 PM
RE: Ideas Wanted Decision Matrix - by Alex - 03-10-2019, 07:07 PM
RE: Ideas Wanted Decision Matrix - by felfert - 03-11-2019, 04:04 PM
RE: Ideas Wanted Decision Matrix - by Alex - 03-11-2019, 05:15 PM
RE: Ideas Wanted Decision Matrix - by felfert - 03-11-2019, 06:39 PM
RE: Ideas Wanted Decision Matrix - by curlymo - 03-11-2019, 07:07 PM
RE: Ideas Wanted Decision Matrix - by Alex - 03-26-2019, 09:59 AM

Forum Jump:


Browsing: 1 Guest(s)