Have to agree with @SJHT ;re: his comments above.
FWIW, I'm still using iRule for now, though I have "outsourced" some functions to my Vera IoT hub as a sort of middleware. It's frustrating to have to think of a remote interface re-do after spending literally hundreds of hours tweaking iRule's interface. I don't want to repeat that experience.
So, right now when say I want to pause a movie, 2 commands get sent by iRule. One to my Kodi box and one to the Vera. Kodi is sent the "play/pause" command and Vera is sent a scene execution command. So, the bulk of the work is handled by Vera. When I pause a movie, Vera adjusts lighting in the room (ceiling lights on 25%, but not the lights over the stage). When I un-pause/play, Vera turns off the ceiling lights and turns on the step lights and a hallway floor light.
Contrast that with what I had before - iRule handled everything. I *could* have my Vera send the play/pause commands to Kodi as well, but the interface in Vera that detects whether or not the Kodi server is "up" is flaky. It's not reliable enough for me to count on it knowing whether or not Kodi is truly running. If it were more reliable, I'd take the load completely off iRule and have it just send a single command to Vera. Again, avoiding iRule doing the heavy lifting when possible due to its planned obsolescence.