How does Kodi display messages from TVHeadEnd and can I display custom messages?
#1
If you are running Kodi with the TVHeadEnd PVR addon then you know that by default Kodi will display a message at the top of the screen whenever TVHeadEnd starts recording a program, or has finished recording a program, or under certain other circumstances. What I'd like to know is how that is done and whether it's possible to send a custom message from the backend to be displayed in Kodi.

My reason is this: For one channel I need to do some post-processing with ffmpeg before the program can be played in Kodi, due to the non-standard way they send their audio. There is a post-processing script set up to do this on the TVHeadEnd backend system, but it takes a certain amount of time to run, generally around a couple minutes but it could be longer or shorter depending on the original program duration and the current load on the system. What I'd like to be able to do is insert a line into the bash script before the conversion process starts, that says something like "starting post-processing of (program name)" and then when the script completes, I'd like to insert another line that says "post-processing of (program name) completed." And I want to send those messages to all Kodi clients that are running at the time on the local network (not just a single system, nor directed to any specific IP address). In other words I want these messages to go out using the same mechanism that the messages that indicate the start and end of a recording use.

Is this possible, and if so, how do I do it?
Reply
#2
You could use xbmc-send (or is it called kodi-send now , not sure about this). xbmc-send is part of Kodi installation and allows you to send text messages (and commands) from e.g. scripts to Kodi, even from one machine to another. Broadcasts from one machine to a couple of Kodi instances are not possible, though.
Reply
#3
(2015-05-05, 08:02)ksooo Wrote: You could use xbmc-send (or is it called kodi-send now , not sure about this). xbmc-send is part of Kodi installation and allows you to send text messages (and commands) from e.g. scripts to Kodi, even from one machine to another.

Neither of those are included in Kodi Helix (Ubuntu version). But that's not relevant because...

(2015-05-05, 08:02)ksooo Wrote: Broadcasts from one machine to a couple of Kodi instances are not possible, though

And that's exactly what I'm looking for. TVHeadEnd does it somehow, so how is it done?
Reply
#4
It's hard coded case by case into the respective pvr add-ons.
Reply
#5
Thus, not "tvheadend does it somehow", but the pvr add-ons do. The add-ons listen to tvheadend and forward certain events to Kodi. There is no post processing start/stop event from tvheadend, so the add-ons have no chance to pickup and forward this.
Reply
#6
Okay, thanks for the explanation, much appreciated.

That kodi-send program you mentioned, could it be run on a Debian-based TVHeadEnd server and used to send messages to Kodi running on a different machine on the same network? The problem is that you said it is part of Kodi installation but that appears to not be true in the Ubuntu version, but I would need a standalone version anyway to run on the backend server, and I don't think it's available in the Debian repositories? The server does not run Kodi, in fact it is strictly command-line based and there is no desktop package installed. So I'm guessing no way to run kodi-send in that environment?
Reply
#7
Not 100% sure, but I'd say, no chance.
Reply
#8
You could open a feature request against tvheadend, something like a configuration option "set recording done state after post processing script finished". If this gets activated on the server, it would notify Kodi pvr add-on after post processing about finished recordings, not directly after finishing the actual recording. No changes in the add-on would be needed for that. Would that help? Does not "fix" that you want to get explicitly notified on post processing start/stop though.
Reply
#9
He could also request a feature where tvheadend would announce post-processing events. The addon could then handle those by displaying a notification.
Reply

Logout Mark Read Team Forum Stats Members Help
How does Kodi display messages from TVHeadEnd and can I display custom messages?0