Logic Machine Forum
communication vbus solar resol - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: communication vbus solar resol (/showthread.php?tid=346)

Pages: 1 2 3


RE: communication vbus solar resol - KoBra - 24.01.2023

(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?


RE: communication vbus solar resol - admin - 24.01.2023

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.