This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

communication vbus solar resol
#41
(09.01.2023, 10:45)KoBra Wrote:
(09.01.2023, 09:29)admin Wrote: You need to remove these lines from the library:
Code:
  for _, searcher in ipairs(package.searchers or package.loaders) do
    name = "cjson"
    local loader = searcher(name)
    if type(loader) == 'function' then
      package.preload[name] = loader
      cjson  = require (name)
      break
    end
    name = "json"
    local loader = searcher(name)
    if type(loader) == 'function' then
      package.preload[name] = loader
      cjson  = require (name)
      break
    end
  end

  for _, searcher in ipairs(package.searchers or package.loaders) do
    name = "vbusprofiles"
    local loader = searcher(name)
    if type(loader) == 'function' then
      package.preload[name] = loader
      vbusprofiles  = require (name)
      break
    end
    name = "user.vbusprofiles"
    local loader = searcher(name)
    if type(loader) == 'function' then
      package.preload[name] = loader
      vbusprofiles  = require (name)
      break
    end
  end

  for _, searcher in ipairs(package.searchers or package.loaders) do
    name = "luavbuspacket"
    local loader = searcher(name)
    if type(loader) == 'function' then
      package.preload[name] = loader
      luavbuspacket  = require (name)
      break
    end
    name = "user.luavbuspacket"
    local loader = searcher(name)
    if type(loader) == 'function' then
      package.preload[name] = loader
      luavbuspacket  = require (name)
      break
    end
  end

now we go to 
Code:
User library vbus:303: bad argument #3 to 'format' (no value)
stack traceback:
[C]: in function 'format'
User library vbus:303: in function 'packetExtract'
User library vbus:205: in function 'waitData'

nobody with a clue?
Reply
#42
Most likely that's a "luavbus.log" call. Find the relevant line in the library and add comments before this luavbus.log (--) to disable it:
Code:
-- luavbus.log(...)
But I think that it will fail somewhere else as the original error is caused by a missing variable/value.
Reply


Forum Jump: