2017-10-15, 14:54
I am currently working on a small programm to switch a LED connected to a seral header on my motherboard on or off depending on the current recording state. My first idea was to make use of the recording-hooks of VDR which provides an easy method to detect if a recording has begun or ended.
Then I thought it would be nice to extend the use case and create an addon which uses JSON-RPC API to query kodi if a recording is currently active. However, the query must be repeated with an appropriately small time interval to react shortly after a state change has occcured. Thus, I was looking for a method to watch out for an active notification if a recording has started/ended which can be received via xbmc.Monitor - yet to no avail so far.
Anyone has an idea how to achieve this or is the JSON RPC query the only possible way?
Then I thought it would be nice to extend the use case and create an addon which uses JSON-RPC API to query kodi if a recording is currently active. However, the query must be repeated with an appropriately small time interval to react shortly after a state change has occcured. Thus, I was looking for a method to watch out for an active notification if a recording has started/ended which can be received via xbmc.Monitor - yet to no avail so far.
Anyone has an idea how to achieve this or is the JSON RPC query the only possible way?