Kodi Community Forum
Send notification to addon when recordings starts/ends - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: PVR & Live TV Support (https://forum.kodi.tv/forumdisplay.php?fid=167)
+---- Forum: VDR (https://forum.kodi.tv/forumdisplay.php?fid=169)
+---- Thread: Send notification to addon when recordings starts/ends (/showthread.php?tid=322525)



Send notification to addon when recordings starts/ends - Spirou - 2017-10-15

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?


RE: Send notification to addon when recordings starts/ends - FernetMenta - 2017-10-16

That is more a request to generic PVR component. Isn't there any notification for timer changes already?


RE: Send notification to addon when recordings starts/ends - Spirou - 2017-10-16

(2017-10-16, 18:20)FernetMenta Wrote: Isn't there any notification for timer changes already?

Yes, I see notifications for timer changes when a recording starts or ends. I just didn't find any example on how to tap into this.
Maybe this request is better suited for the developer section...