Hi @posborne
Thanks for the reply,
Lazy loading of subdrivers can be a good improvement.
I think it will need a lot of testing to avoid errors since there are many subdrivers and many peculiarities.
I have been slow to answer because I was fighting with a bug that was suggested to me in a custom subdriver for “fibaro-rgbw-controller”, which uses the 4 channels independently and only fails when the lazy loading function of the subdriver is used, that is always the same error when executing commands from the app and when emit the event
Since I don’t have the 9 libraries, I couldn’t see the code for the line that fails.
And in the end I could see that it may due to the assignment of the 4 endpoints to the four components.
EDIT:
Mysteriously, when I reinstalled the driver it gave the error again continuously and there is no way for it to work again with the lazy loading of the subdriver.
2024-02-05T21:37:33.921546751Z INFO Z-Wave Bulb Mc <ZwaveDevice: e78f6785-37e1-48bd-a197-ecf8dbc13260 [27] (Fibaro RGBW)> received command: {"args":{},"capability":"switch","command":"on","component":"white","positional_args":{}}
2024-02-05T21:37:33.953046667Z INFO Z-Wave Bulb Mc <ZwaveDevice: e78f6785-37e1-48bd-a197-ecf8dbc13260 [27] (Fibaro RGBW)> Lazy loaded driver into dispatcher: Fibaro RGBW Controller
2024-02-05T21:37:33.960921667Z TRACE Z-Wave Bulb Mc Found CapabilityCommandDispatcher handler in zwave_bulb -> Fibaro RGBW Controller
2024-02-05T21:37:33.967323292Z ERROR Z-Wave Bulb Mc Fibaro RGBW thread encountered error: [string "st/dispatcher.lua"]:261: Error encountered while processing event for <ZwaveDevice: e78f6785-37e1-48bd-a197-ecf8dbc13260 [27] (Fibaro RGBW)>:
arg1: table: 0x2a69480
"\x5B\x73\x74\x72\x69\x6E\x67\x20\x22\x73\x74\x2F\x64\x69\x73\x70\x61\x74\x63\x68\x65\x72\x2E\x6C\x75\x61\x22\x5D\x3A\x32\x36\x31\x3A\x20\x45\x72\x72\x6F\x72\x20\x65\x6E\x63\x6F\x75\x6E\x74\x65\x72\x65\x64\x20\x77\x68\x69\x6C\x65\x20\x70\x72\x6F\x63\x65\x73\x73\x69\x6E\x67\x20\x65\x76\x65\x6E\x74\x20\x66\x6F\x72\x20\x3C\x5A\x77\x61\x76\x65\x44\x65\x76\x69\x63\x65\x3A\x20\x65\x37\x38\x66\x36\x37\x38\x35\x2D\x33\x37\x65\x31\x2D\x34\x38\x62\x64\x2D\x61\x31\x39\x37\x2D\x65\x63\x66\x38\x64\x62\x63\x31\x33\x32\x36\x30\x20\x5B\x32\x37\x5D\x20\x28\x46\x69\x62\x61\x72\x6F\x20\x52\x47\x42\x57\x29\x3E\x3A\x0A\x20\x20\x20\x20\x61\x72\x67\x31\x3A\x20\x74\x61\x62\x6C\x65\x3A\x20\x30\x78\x32\x61\x36\x39\x34\x38\x30\x0A\x22\x5B\x73\x74\x72\x69\x6E\x67\x20\x22\x66\x69\x62\x61\x72\x6F\x2D\x72\x67\x62\x77\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2F\x69\x6E\x69\x74\x2E\x6C\x75\x61\x22\x5D\x3A\x38\x35\x39\x3A\x20\x61\x74\x74\x65\x6D\x70\x74\x20\x74\x6F\x20\x69\x6E\x64\x65\x78\x20\x61\x20\x6E\x69\x6C\x20\x76\x61\x6C\x75\x65\x20\x28\x66\x69\x65\x6C\x64\x20\x27\x3F\x27\x29\x22"
2024-02-05T21:42:59.240993053Z TRACE Z-Wave Bulb Mc Received event with handler capability
2024-02-05T21:43:00.087143845Z INFO Z-Wave Bulb Mc <ZwaveDevice: e78f6785-37e1-48bd-a197-ecf8dbc13260 [27] (Fibaro RGBW)> received command: {"args":{},"capability":"switch","command":"on","component":"main","positional_args":{}}
2024-02-05T21:43:00.114087428Z TRACE Z-Wave Bulb Mc Found CapabilityCommandDispatcher handler in zwave_bulb -> Fibaro RGBW Controller
2024-02-05T21:43:00.120917512Z PRINT Z-Wave Bulb Mc <<<< set_switch >>>>
2024-02-05T21:43:00.135980553Z PRINT Z-Wave Bulb Mc <<<< command.component main
2024-02-05T21:43:00.172384887Z PRINT Z-Wave Bulb Mc <<<< value 255
2024-02-05T21:43:00.181463137Z ERROR Z-Wave Bulb Mc Fibaro RGBW thread encountered error: [string "st/dispatcher.lua"]:261: Error encountered while processing event for <ZwaveDevice: e78f6785-37e1-48bd-a197-ecf8dbc13260 [27] (Fibaro RGBW)>:
arg1: table: 0x2ac0f20
"\x5B\x73\x74\x72\x69\x6E\x67\x20\x22\x73\x74\x2F\x64\x69\x73\x70\x61\x74\x63\x68\x65\x72\x2E\x6C\x75\x61\x22\x5D\x3A\x32\x36\x31\x3A\x20\x45\x72\x72\x6F\x72\x20\x65\x6E\x63\x6F\x75\x6E\x74\x65\x72\x65\x64\x20\x77\x68\x69\x6C\x65\x20\x70\x72\x6F\x63\x65\x73\x73\x69\x6E\x67\x20\x65\x76\x65\x6E\x74\x20\x66\x6F\x72\x20\x3C\x5A\x77\x61\x76\x65\x44\x65\x76\x69\x63\x65\x3A\x20\x65\x37\x38\x66\x36\x37\x38\x35\x2D\x33\x37\x65\x31\x2D\x34\x38\x62\x64\x2D\x61\x31\x39\x37\x2D\x65\x63\x66\x38\x64\x62\x63\x31\x33\x32\x36\x30\x20\x5B\x32\x37\x5D\x20\x28\x46\x69\x62\x61\x72\x6F\x20\x52\x47\x42\x57\x29\x3E\x3A\x0A\x20\x20\x20\x20\x61\x72\x67\x31\x3A\x20\x74\x61\x62\x6C\x65\x3A\x20\x30\x78\x32\x61\x63\x30\x66\x32\x30\x0A\x22\x5B\x73\x74\x72\x69\x6E\x67\x20\x22\x66\x69\x62\x61\x72\x6F\x2D\x72\x67\x62\x77\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72\x2F\x69\x6E\x69\x74\x2E\x6C\x75\x61\x22\x5D\x3A\x38\x30\x37\x3A\x20\x61\x74\x74\x65\x6D\x70\x74\x20\x74\x6F\x20\x69\x6E\x64\x65\x78\x20\x61\x20\x6E\x69\x6C\x20\x76\x61\x6C\x75\x65\x20\x28\x66\x69\x65\x6C\x64\x20\x27\x3F\x27\x29\x22"
NEW EDIT:
After several tests, in a driver reinstallation it worked again without changing anything.
And in the same way, without changing anything, it stopped working with the same error on another reinstallation.
It seems to have to do with a problem with lazy loading of the subdriver and its handlers, some times do not load fine.
Normally work fine the subdriver zwave handlers and works bad the capability handlers
May be the is a big subdriver??
What I have seen is that the lazy loading function can be used very flexibly and you can not use lazy loading for a specific subdriver or subdrivers and it works perfectly.
Everything else works fine on the 6 drivers I’m testing works fine, but I only use one or two subdrivers per driver.