Caller ID alternate using xyac

Version 2 (Transverse, 05/08/2012 02:26 am) → Version 3/14 (Transverse, 05/08/2012 02:26 am)

h1. Caller ID Display, alternate, using xyac.

This is based on [[Caller ID displayed on your LinHES screen]] but uses xyac to overlay text on the X11 window. The benefit of this is that it will display the caller id information, not just during playback, but also when viewing menus etc.

Tested under R7.2 R6.02

Follow the procedure at [[Caller ID displayed on your LinHES screen]], but when it comes to editing /etc/sv/ncid/run, change it to this instead:

<pre>
#!/bin/sh
exec 2>&1
export TERM=linux
. /etc/rc.conf
. /etc/rc.d/functions

svwaitup -s 3 /var/service/ncidd || exit 1

which ncid 2>/dev/null >/dev/null

if [ $? = 0 ]
then
if [ -f /var/service/ncidd/run ]
then
sv start ncidd
fi

stat_runit "Starting callerid client"

exec /usr/bin/ncid --no-gui --message --call-prog --program ncid-yac
fi

</pre>

This uses ncid-yac along with xyac, instead of using ncid-mythtv.

Continue and follow along with the rest of the procedure. When you're done, come back here.

Now, the additional steps...
ncid-yac needed to be modified slightly, as it wasn't stopping on its own and wasn't sending until it was stopped.
<pre>
sudo nano /usr/share/ncid/ncid-yac
</pre>

This line:
<pre>
echo -n "@CALL${CIDNAME}~${CIDNMBR}" | nc -w1 $YACCLIENT $YACPORT
</pre>

Needs to change to:
<pre>
echo -n "@CALL${CIDNAME}~${CIDNMBR}" | nc -c $YACCLIENT $YACPORT
</pre>

So now, instead of waiting for a timeout, nc just sends and closes. That timeout never happened on my system, so the yac messages were only occurring on shutdown.

ncid-yac depends on netcat. So install netcat:
<pre>
sudo pacman -S gnu-netcat
</pre>

This gave me a warning, but it functions.

Now to set up "xyac...":http://www.bah.org/~greg/tivo
modified for R6 from "elgordo123's procedure":http://mysettopbox.tv/phpBB2/viewtopic.php?t=4836

xyac depends on xosd, so install that.
<pre>
sudo pacman -S xosd
</pre>

pacman doesn't know xyac, so we'll have to compile it...
<pre>
wget http://www.bah.org/~greg/tivo/xyac/xyac-0.1.tar.gz
tar zxvf xyac-0.1.tar.gz
cd xyac*
su
make
make install
</pre>

This installs xyac to /usr/local/bin

To get xyac to run, it'll need an entry in fluxbox apps.
<pre>
sudo nano /home/mythtv/.fluxbox/apps
</pre>

Add this line:
<pre>
[startup] {/usr/local/bin/xyac -p middle -A center -c yellow -s 5 -f lucidasanstypewriter-bold-24 &}
</pre>
Make sure it is all on ONE line in the apps file or it wont start.


Note: (Note can also use lucidasanstypewriter-bold-18 if 24 is too big. big)
For more variety, (Note: the command xlsfonts will show a list of fonts available avail to you. you)
(Make sure it is all ONE line in the apps file or it wont start)


Restart x,
<pre>
sudo killall xinit
</pre>
x and give yourself a call.

If you'd like to manually test xyac from the same machine, you can fire off one of these...
<pre>
echo -n "testing testing 123" | nc -c 127.0.0.1 10629
</pre>

or from a different machine, adjust that 127.0.0.1 to meet your needs.

If you'd like to serve yac information to other machines on your network, set the list of listeners for ncid-yac at the bottom of /etc/ncid/ncidmodules.conf. I've got ncid-yac serving out to my windows box too, with the yac client "here.":http://www.sunflowerhead.com/software/yac/