(09.01.2023, 08:41)admin Wrote: Replace the top part of the user.vbus with this. Then restart the resident script via disable/enable. It will produce an error if your user libraries are not named in all lowercase (vbusprofiles and luavbuspacket).
Code:local luavbus = {}
socket = require ("socket")
cjson = require("json")
vbusprofiles = require("user.vbusprofiles")
luavbuspacket = require("user.luavbuspacket")
local SERIAL, TCPIP = 0, 1
The response:
Code:
User library vbus:15: module 'user.vbusprofiles' not found:
no field package.preload['user.vbusprofiles']
no file './user/vbusprofiles'
no file 'Library user/vbusprofiles'
no file 'User library vbusprofiles'
no file 'Library user/vbusprofiles.so'
no file 'Library user.so'
stack traceback:
[C]: in function 'require'
User library vbus:15: in main chunk
[C]: in function 'require'
Code:
User library vbus:16: module 'uservbuspacket' not found:
no field package.preload['uservbuspacket']
no file './user/luavbuspacket'
no file 'Library user/luavbuspacket'
no file 'User library luavbuspacket'
no file 'Library user/luavbuspacket.so'
no file 'Library user.so'
stack traceback:
[C]: in function 'require'
User library vbus:16: in main chunk
[C]: in function 'require'
now the error is:
Code:
User library vbus:725: attempt to index global 'cjson' (a boolean value)
stack traceback:
User library vbus:725: in function 'readDevicesProfiles'
User library vbus:240: in function 'waitData'