Menu

getting CID from TIVO to XBMC

Help
XBMClover
2007-11-22
2012-09-29
  • XBMClover

    XBMClover - 2007-11-22

    The only scripts I can find for XBMC are YAC scripts. Can someone please explain (as you would a child) how I can get my tivo NCIDD to broadcast YAC info to my XBMC?

    I already have NCID working on my TIVO; with the server and client both running on the tivo box itself and working happily (v.67). There is some very scant info on an output module "ncid-yac" but I can't make sense of it.

    I have calleridlite script on my xbox and it runs and reports no errors, but of course it's not listening to the NCIDD on my tivo.

    Any help would be supremely appreciated. The tivo is the only device in the house that has a modem installed, so the server has to run there. I have the ncid v.69 client running on my PC and it works as expected - so if it can be configured to relay the info to my xbox that would work as well.

     
    • hsiboy

      hsiboy - 2008-03-14

      Hi John,

      sorry i haven't responded sooner, but i've had not internet access.

      So while i've been off air, i've tried a different modem, a "US Robotics 3Com 56k Professional Message Modem" which has worked for days on end (15 was the longest run without trouble).

      So problem solved. Now to get on and fettle with XBMC to get ncid integration working well.

      HSIBOY

       
    • John L. Chmielewski

      You need to configure ncid (the client) to use ncid-yac (a output module). You also need to configure ncid-yac so it knows the IP address of your YAC box.

      Edit /var/hack/ncid/ncidmodules.conf and change YACLIST (you might also need to change YACPORT, if you are not using the default). Normally you would also uncomment some other lines, but they require a service script that is not currently on the TiVo.

      Lets assume your xbox is on 192.168.5.21. You would change one line in ncidmodules.conf:
      from: YACLIST="localhost"
      to: YACLIST="192.168.5.21"

      If you had another listener at 192.168.5.22
      the line would become: YACLIST="192.168.5.21 192.168.5.22"

      Next, you want to test it, so you would start ncid like this:
      ncid --no-gui --message --call-prog --program ncid2yac

      Call yourself and see if it works. If it does, then you can restart the ncid command line in the background

       
    • XBMClover

      XBMClover - 2007-11-24

      Thanks for all the info. Still having problems...
      I managed to update the tivo ncid to version .69 (port 3333) and it's still working on the tivo (and also pops up on my pc with ncidpop)

      The xbox test came back with "nc: connect: Connection refused" at first....but then....
      PROGRESS!! - Checked xbox log file and managed to get one step further...The xbmc script had a bogus dns name, which i fixed and now when I run the script it reports a continuous "(running)" status and displays "calleridlite active" for a few seconds. Awesome.

      Still having trouble though...perhaps at this point it's a message formatting problem...The xbox reports "incoming call..." but never displays a name or number. so here is where I am...

      1- what can be done to make sure the yac script and the ncid-yac module are speaking the same language etc

      2- The conf file specified that only 1 module could be used at a time, so I am running 2 distinct processes...once using the defaults in the conf file for tivocid, and once using the command line options given by J.L.C. ("./tivocid --no-gui --message --call-prog --program ncid-yac"). Is that the correct way to get both modules running?

      Thanks for your quick response over the holiday!

       
    • John L. Chmielewski

      The ncid-yac module is a simple shell script. It is easy to test by itself, just run it as: sh ./ncid2yac. It will wait until you type in 5 lines, in this order: date, time, number, name, telephone-line-indicator. It does not do any checking of data so you can type anything. Only the name and number are sent to YAC so you can just hit <ENTER> for input lines not used. You should be able to see the line sent to YAC and compare it to what the YAC developer page says it should be.

      You can run ncid multiple times. Each instance can have only one module, but each module can be different. The best way to do this is to specify the module name in the command line.

      The configuration file can only handle one module if called from a Fedora init script, but should be OK for you. If it causes trouble, comment out the line in ncid2yac so it does not use it to set variables, and set YACLIST in the module itself.

       
      • XBMClover

        XBMClover - 2007-11-26

        Got it working now. A new version of the XBMC script came out 11.21.07 and that is working just fine. I put both ncid commands in my author file; for some reason it didn't work when I was running 2 copies of tivocid, so I changed one of them to tivoncid and now both are happy.

        Much Thanks.

        cd /var/hack/sbin; ./ncidd
        cd /var/hack/bin; ./tivocid &
        cd /var/hack/bin; ./tivoncid --no-gui --message --call-prog --program ncid-yac &

         
    • John L. Chmielewski

      Tivoncid and tivocid are symbolic links to ncid. They just set up the proper options for a TiVo.

      This line: ./tivnocid &
      same as: ./ncid --no-gui --message --call-prog --program ncid-tivo &

      Your last line could be: ./tivoncid --program ncid-yac &
      or: ./ncid --no-gui --message --call-prog --program ncid-yac &

       
    • hsiboy

      hsiboy - 2008-01-20

      Hi, after reading this post i tried ncid with xbmc, as i want to migrate away from YAC on windows.

      I have it mostly working on debian, however the xbmc only appears to display line 4, is it my setup, or a flaw in the calleridlite script?

      cheers,

      HSIBOY

       
    • hsiboy

      hsiboy - 2008-01-21

      never mind, i just realised ncid sends "NO NAME" and the calleridlite script checks to see if name == "", if it is it shows the number, else it shows the name, which is "NO NAME", so a quick edit of the calleridlite script to check for empty name or "NO NAME" has fixed that little issue.

      Cheers,

      HSIBOY

       
    • John L. Chmielewski

      NCID purposely changes a NULL into "NO NAME" for its displays. It likes to display both the name and telephone number. Maybe you could send in a patch for the calleridlite script so the next release will contain it.

      Can you document what you did to get NCID working with the XBMC, complete with screen shot? I could put it up on http://ncid.sourceforge.net or provide a link if you can put up your own page. You can email me using my sourceforge email.

       
    • hsiboy

      hsiboy - 2008-01-24

      Hi John,

      i will right up a how too, just as soon as i get it working fully. I'm an active member of the XBMC team so i have a vested interest in it working fully.

      I have a problem where ncidd just seems to hang, its running, but not logging calls.
      I've edited the /etc/init.d scripts to start up ncid with ncid-yac as the ext prog, and it works for one or two calls, then stops.

      I haven't had time to work on it though as a large rash of DIY has broken out around here :(

      HSIBOY.

       
      • hsiboy

        hsiboy - 2008-01-24

        of course that should be "write up" not right up....

        HSIBOY

         
    • John L. Chmielewski

      You can bump verbose up to level 3 to see modem responses. You probably should also "touch /var/log/ciddata.log" (shows modem or gateway output) to see if the modem sends anything to ncidd when the phone rings. Usually this is a problem with the modem being reset without ncidd knowing about it. If the modem is no longer in Caller ID mode, it will never send the information to ncidd when a call comes in.

      You can test to see if the modem is being reset. You need to create a modem lock file and then delete it. If ncidd starts receiving calls, then something is reseting the modem on you.

      The lockfile default is normally /var/tmp/modemlock for TiVo's and /var/lock/LCK..ttyS0 otherwise. It can be changed by setting lockfile in ncidd.conf or on the command line.

      The ncidd.log file will indicate TTY in use with date and time when you create the log file, and TTY free with date and time when you remove it. It will also reinitialize the modem.

       
    • John L. Chmielewski

      I noticed in two prior posts I incorrectly referred to ncid-yac as ncid2yac. The ncid output module is called ncid-yac. There is no module called ncid2yac.

       
    • hsiboy

      hsiboy - 2008-01-30

      Hi John,

      i had worked out the whole ncid-yac as ncid2yac thing, and i had fettled with
      the ncidd.conf to increase the debug.

      here is the output from a sample session (as root):

      microblue2:#/etc/init.d/ncidd start

      microblue2:# tail -n 50 -f /var/log/ncidd.log

      Started: 01/30/2008 12:28
      Server: ncidd 0.69
      Processed config file: /etc/ncid/ncidd.conf
      Configured to send 'cidlog' to clients.
      Configured to send 'cidinfo' to clients.
      Processed alias file: /etc/ncid/ncidd.alias
      Verbose level: 5
      CID logfile: /var/log/cidcall.log
      CID logfile maximum size: 110000 bytes
      Data logfile: /var/log/ciddata.log
      TTY port opened: /dev/modem
      TTY port speed: 19200
      TTY lock file: /var/lock/LCK..modem
      TTY port control signals enabled
      ATZM0
      OK
      Try 1 to init modem: return = 0.
      Modem initialized.
      AT#CID=1
      OK
      Modem set for CallerID.
      Network Port: 3333
      Wrote pid 16851 in pidfile: /var/run/ncidd.pid

      so the lock file is being created, lets go and find it...

      microblue2:# cd /var/lock/
      microblue2:/var/lock# ls -als

      total 3
      1 drwxrwxrwt 3 root root 1024 2008-01-25 14:56 .
      1 drwxr-xr-x 14 root root 1024 2007-11-10 22:19 ..
      1 drwxr-xr-x 2 www-data root 1024 2007-12-31 10:50 apache2

      so the lock file isnt being created?

      lets check ncid is running

      microblue2:/var/lock# ps -ef |grep -i ncid

      root 16851 1 0 12:28 ? 00:00:00 /usr/sbin/ncidd
      root 16874 16795 0 12:32 pts/0 00:00:00 grep -i ncid

      lets look for the pid

      microblue2:/var/lock# cat /var/run/ncidd.pid
      16851

      Okay, lets just double ckeck the modem lock file isnt being written to the
      default Tivo location

      microblue2:# cd /var/tmp/
      microblue2:/var/tmp# ll
      total 1
      drwxrwxrwt 2 root root 1024 2008-01-30 12:22 vi.recover

      so i think you are right, its the lock file for the modem that is breaking
      things.

      if i create a lock file manualy

      microblue2:# touch /var/lock/LCK..modem

      then start ncidd, it behaves as i expect it would

      microblue2:#/etc/init.d/ncidd start

      microblue2:# tail -n 50 -f /var/log/ncidd.log

      Started: 01/30/2008 12:45
      Server: ncidd 0.69
      Processed config file: /etc/ncid/ncidd.conf
      Configured to send 'cidlog' to clients.
      Configured to send 'cidinfo' to clients.
      Processed alias file: /etc/ncid/ncidd.alias
      Verbose level: 5
      CID logfile: /var/log/cidcall.log
      CID logfile maximum size: 110000 bytes
      Data logfile: /var/log/ciddata.log
      Exiting - TTY port in use (lockfile exists): /var/lock/LCK..modem
      Terminated: 01/30/2008 12:45

      /dev/modem is linked to /dev/ttyS0

      ncid will work for an undetermined amount of time, then stop without any errors
      being thrown.

      any ideas? permissions?

      I'm working on having the CID data being displayed on the LCD display
      (where fitted) as well as flashed up on screen of the XBOX.

      Cheers,

      HSIBOY

       
    • hsiboy

      hsiboy - 2008-01-30

      Sorry John,

      part of my post disappeared in a copy & paste action, here is the output from the /var/log/ncid.log when ncid is running and i "touch" a modem lock file, then remove it.

      ...
      TTY port control signals enabled
      ATZM0
      OK
      Try 1 to init modem: return = 0.
      Modem initialized.
      AT#CID=1
      OK
      Modem set for CallerID.
      Network Port: 3333
      Wrote pid 16929 in pidfile: /var/run/ncidd.pid
      TTY in use: releasing modem 01/30/2008 12:56
      TTY free: using modem again 01/30/2008 12:57
      ATZM0
      OK
      Try 1 to init modem: return = 0.
      Modem initialized.
      AT#CID=1
      OK
      Modem set for CallerID.

      So ncid can see the modem is in use and resets it.

      I should mention that i'm running debian on a diskless thin client

      microblue2:/var/lock# uname -a
      Linux microblue2 2.6.18-5-486 #1 Tue Oct 2 23:38:54 UTC 2007 i686 GNU/Linux

      Cheers,

      HSIBOY

       
    • hsiboy

      hsiboy - 2008-01-30

      Ah ha,

      i see now where you were going with the modem lock file.

      I've just read the post "Modem forgets to use CID"

      and my modem is a U.S. Robotics 56K FAX EXT:

      ati3
      U.S. Robotics 56K FAX EXT Rev. 11.16.63

      So it may be the same problem, however i had set the default state to be CID=1, but none the less i will investigate this more fully.

      HSIBOY

       
    • John L. Chmielewski

      You might have a getty running on the modem port. Mgetty knows how to initialize initialize a modem.

      John

       
    • hsiboy

      hsiboy - 2008-01-31

      Hi John,

      no, no getty or mgetty on /dev/ttyS0
      /etc/inittab is commented out for getty on serial device.

      I wonder if it this modem?

      On a different note, i noticed that when i stared minicom, the output from mincom ended up in /var/log/ncid.log so minicom didn't set a lock file, despite it being configured.

      Well back to the man/info pages to see if I've missed anything fundamental.

      HSIBOY

       
    • hsiboy

      hsiboy - 2008-01-31

      OKay something very fishy,
      it stopped again, despite an hourly cron job to touch and remove the modem lock file.

      However this was in /var/log/ncid.log

      Try 3 to init modem: return = 2.
      No Modem Response
      Try 4 to init modem: return = 2.
      No Modem Response
      Try 5 to init modem: return = 2.
      No Modem Response
      Try 6 to init modem: return = 2.
      No modem found: /dev/modem
      Removed pidfile: /var/run/ncidd.pid
      Terminated: 01/31/2008 12:00

      so something else is afoot.

      HSIBOY

       
    • John L. Chmielewski

      It looks like you have a port problem between minicom and ncid. The default for NCID is to use /dev/modem. Minicom is using /dev/ttyS0. This will cause problems with your lock file. Minicom will place a lock file on /dev/ttyS0 but NCID is looking for a lock file on /dev/modem. You need to configure NCID to use /dev/ttyS0, the same as minicom. You can just uncomment the "# set ttyport = /dev/ttyS0" in ncidd.conf to fix it.

      This might also solve the modem reset problem you have. Try it without the cron job to see if it fixes it.

      The "No Modem Response" problem happens once in a while when the modem gets in a very strange state.

      I think the next release will change the NCID default so it uses /dev/ttyS0 instead of /dev/modem.

       
    • hsiboy

      hsiboy - 2008-02-01

      Hi John,

      i'm completely puzzled.

      I changed the config to point at /dev/ttyS0 instead of the symlink, and the modem hasn't "gone funny" but... ncidd seems to loose its marbles.

      I Teed /dev/ttyS0 and i could see the RING message from the modem, but tailing /var/log/ncidd.log nothing was happening. i restarted the daemon and everything back to normal. i had the verbosity set to 5, but its doesn't show anything, and without timestamps for each entry its hard to pinpoint when it falls over. Now the odd thing i that ncidd responds to the restart request, and prints a happy:

      Removed pidfile: /var/run/ncidd.pid
      Terminated: 02/01/2008 19:24
      Started: 02/01/2008 19:24
      Server: ncidd 0.69.....

      and on its merry way it goes, for how long i don't know.

      HSIBOY

       
    • John L. Chmielewski

      Actually a verbose level of 3 is best for most troubleshooting. A verbose level of 1 is sufficient for normal operation. The log file will indicate the verbose level in use.

      Are you saying that ncidd did not respond to a call when you changed the tty port to /dev/ttyS0? How did you see the RING message? In the log file? I assume you are still using ttyS0?

       

Log in to post a comment.