2019-10-26, 15:55
Hi,
My script primarily runs as a service, waiting for OnAvStarted, etc events to manage Hue lights. I'm looking for a way to provide users with easy manual control / shortcuts to force those same events to happen.
So far I've added a plug-in extension to create a menu of commands and those can easily be added to favourites so it seems like a good way to make shortcuts - but I'm open to other ideas.
What I'm wondering is what is the best way to pass the command from the plugin script to the running service script. I'm a python & kodi newbie so although I can figure out ways to do it, what would you guys recommend as best practice?
I don't want to import the relevant parts of the service since initializing the service and connection to the Hue hub would take too long. Considering there's only 6 commands with no data or parameters, an sqllite command queue in addon_data seems like overkill. I suppose I could write a text/data file but that seems sketchy
I'm probably not the first with this need - is there a best practice or suggestions? Considering the original need is just to create shortcuts to trigger service actions, the ideas I've come up with seem overengineered for the need.
My script primarily runs as a service, waiting for OnAvStarted, etc events to manage Hue lights. I'm looking for a way to provide users with easy manual control / shortcuts to force those same events to happen.
So far I've added a plug-in extension to create a menu of commands and those can easily be added to favourites so it seems like a good way to make shortcuts - but I'm open to other ideas.
What I'm wondering is what is the best way to pass the command from the plugin script to the running service script. I'm a python & kodi newbie so although I can figure out ways to do it, what would you guys recommend as best practice?
I don't want to import the relevant parts of the service since initializing the service and connection to the Hue hub would take too long. Considering there's only 6 commands with no data or parameters, an sqllite command queue in addon_data seems like overkill. I suppose I could write a text/data file but that seems sketchy
I'm probably not the first with this need - is there a best practice or suggestions? Considering the original need is just to create shortcuts to trigger service actions, the ideas I've come up with seem overengineered for the need.