Luup.io.intercept() not working as expected

If you search the forum for luup intercept you will find a significant number of posts. Some of these date back to the very early days, but are still relevant. This is one such

https://community.getvera.com/t/proper-usage-of-io-intercept-and-passing-data-back-to-incoming/184600

In my implementation of openLuup, a Vera emulation environment, I have always struggled with this, and never achieved consensus within the community on how it does/should work.

Suffice to say that this is an appallingly badly ‘designed’ and implemented functionality. I would follow the sage advice of @futzle from the above thread

She was a true expert on such matters, and sadly rarely participates in the forum these days… a huge loss.

Abandon Vera’s flawed approach, use the LuaSocket library for low-level I/O, and roll your own state machine, per her advice.

2 Likes