Open toggledbits opened 6 years ago
The current STABLE branch (180724) has a workaround that I think is both simple and diabolically clever for the above problem. It turns out that the implementation functions defined in the functions tag of the implementation file do have separate context (just not the modules it may load), and that luup.device is set within those functions and available. So the answer is to make skeleton callbacks in the implementation that call the module's callback handlers, passing an additional argument for the parent device (which is luup.device in the skeleton). Needs testing, but promising.
Due to a key difference in the way openLuup loads modules compared to Vera Luup, AVT thus far is not able to run under openLuup.
For the curious, the critical differences are these:
The combination of the above two facts makes the current code unable to determine, in the watch callback, which AVT device is in context.