I finally got round to working a bit on my Eventghost config, and will have a bit of time to finish it. Basically, I want it to combine the following:
- Kodi: xbmc2 addon
- MPC-HC: mpc-hc addon (it is my external player configured in Kodi)
- Squeezeboxes: xap plugin
- Marantz amplifier: modified Marantz RS232 addon
- Loxone home automation: http based communication
Are these good practices?
1.
I started out with a tree that has sub-branches for all actions of each plugin. Every time I need an action, I do a jump with return to macros in these branches. I feel this may make it easier if something changes (e.g. amplifier gets replaced by something else, mpc-hc gets replaces, ...) as all actions are grouped there.
Code: Select all
|+ all actions
||- Marantz
||- xmbc2
|'- ...
|
I made a tree that takes behaves the same as the tree in 1, but combines the jump to those macros with sending status updates to the home automation. This will be the tree I will jump to when I have events.
3.
I will a tree that takes events, and then performs appropriate jumps to macros in the tree in 2.
4.
To control kodi/mpc-hc, I have a sub-tree for each, with actions triggered by the same incoming http events. Using the process watch addon, I do an exclusive enable of the correct sub-branch: select if kodi is running but mpc hc is not, then it is kodi-branch; if kodi and mpc-hc are running, it is the mpc-hc branch. If neither is running, I don't really care at the moment (
Code: Select all
|+ control
||- Kodi
||- mpc-hc
|'- ...
|
The test mentioned in 4. is in its own sub-tree, where I put events and subsequent actions.
At this point, I have the tree mentioned in 1, I have the structure mentioned in 4 and am working on the trees 2 (not all actions will trigger sending a status update to the home automation, and I want to send as little as possible) and on 3.
Does this seem like a good structure? Am I missing things? Are the large number of jumps bad (e.g. should I merge tree 1 and 2) ?
Thanks!
J├Ârg
