1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Caller ID on TIVO via IFTTT

Discussion in 'TiVo Coffee House - TiVo Discussion' started by shparson, Mar 10, 2018.

  1. DBrunetti

    DBrunetti Member

    87
    21
    Dec 6, 2016
    Connecticut
    The Applet ID is not the key. You must create a Webhooks account to get a unique key.

    Creating an IFTTT Key and Applet : Help Desk
     
  2. TiVotion

    TiVotion Early Adoptersaurus

    1,167
    35
    Dec 6, 2002
    Tampa, FL
    Ah ha! Did not realize that, thank you! I have found the proper key and made the changes to the arguments in CallClerk. Now that I'm using the correct key, the IFTTT Applet IS firing off in my tests, as indicated by the IFTTT notifications I just got.

    I also downloaded a fresh Curl package from a different repository - near as I can tell, this doesn't need to be installed (Windows)...the commands just need to reference the correct path to it, no?

    At the moment I'm still not sure if it's working because I'm remoting in to my home PC...so I can't actually see if the message is displaying on my TV or not. I will check that when I get home. I have noticed however a new message in the CallClerk logs, not sure if it means anything:

    (84) 3/12/2018 4:43:06 PM
    Failed at ( EnsureState )
    Process has exited, so the requested information is not available.

    Thanks again!

    EDIT: SUCCESS! Just got home and tested, and the notification appears on my TV screen. Awesome! Between CallClerk and my Echo Connect announcing incoming calls to all the Amazon Echos in my house, incoming calls create quite the commotion! :)
     
    Last edited: Mar 12, 2018
    ClearToLand, bradleys and DBrunetti like this.
  3. gonzotek

    gonzotek tivo_xml developer

    2,527
    55
    Sep 24, 2004
    Outside...
    If it's working you can see the applet activity in ifttt: IFTTT Activity.
    You should be able to see the caller id number as part of the details under the 'Applet Ran' messages there.

    FWIW, I got this working with a cheap usb modem and a raspberry pi 2 I had doing other light server duties on my network already. I set up ncid using the raspbian instructions (& verified it was working), then installed pyfttt (only to make my life easier, it's just a lightweight wrapper around the python requests module). Then I modified a simple python ncid client to produce a script pretty similar to this:
    Code:
    #!/usr/bin/python
    #-*-coding: utf-8-*-
    
    import socket
    import re
    import pyfttt
    import os
    import time
    
    def incomingCall(call):
        nmbr = re.search(r"(NMBR\*)([\w]*)(\*)", call).group(2)
        return nmbr
    
    def main():
    #CHANGE PREFS TO YOUR PERSONAL NEEDS
        host = "192.168.1.141"
        port = 3333
        maker_key = "SECRET_KEY_HERE"
        maker_event = "phone_call"
    #END PREFS
    
        s = socket.socket()
        try:
            s.connect((host, port))
            while True:
                data = s.recv(1024)
                if data[:4] == "CID:":
                    nmbr = incomingCall(data[:-1])
                    pyfttt.send_event(maker_key, maker_event, nmbr)
                    time.sleep(10)
        except:
            pass
        finally:
            s.close()
    
    
    if __name__ == "__main__":
        main()
    
    On the ifttt site, create an applet with a webhook trigger, with event name: "phone_call", and TiVo Display Message: "Incoming call {{Value1}} {{OccurredAt}}". Get the maker_key variable from IFTTT Webhooks Settings. It's the last section of the URL shown there (e.g.):
    Code:
    https://maker.ifttt.com/use/SECRET_KEY_HERE
    in the webhook settings.

    Make the python script executable, run it and call the landline you're monitoring. If all works, you should see the message on the tivo.

    The above is *really* untested, and not necessarily what I'll be using long-term, but it seems to work well enough out of the gate. Still to do:Get the script to startup on boot, and various other minor changes (like showing name if available).
     
    ClearToLand likes this.
  4. bradleys

    bradleys It'll be fine....

    4,020
    179
    Oct 31, 2007
    Love it! @gonzotek! I

    have a Rasberry Pi on order so do not be stingy with the instructions!
     
  5. gonzotek

    gonzotek tivo_xml developer

    2,527
    55
    Sep 24, 2004
    Outside...
    I'll be pretty busy for at least another week or two, but I'll be playing with this when I find the time, and if no one else has beat me to it, I'll eventually document everything and get something up on github with what I've got at that point.
     
    bradleys likes this.
  6. bradleys

    bradleys It'll be fine....

    4,020
    179
    Oct 31, 2007
    I should have everything this weekend, so i am going to give it a go... I suspect I will “update” my code once you have it complete. :)

    I have been wanting to do a Raspberry Pi project and this has my interest.
     
    krkaufman and gonzotek like this.
  7. dlfl

    dlfl Cranky old novice

    7,858
    289
    Jul 6, 2006
    Dayton OH
    ncid for dummies (e.g. me):

    wiki Network_Caller_ID

     
  8. man cave

    man cave Member

    33
    5
    Nov 14, 2014
    Bolt not running Hydra no ifttt support.
     
  9. krkaufman

    krkaufman TDL shepherd

    11,301
    1,418
    Nov 25, 2003
    If this is supposed to be a statement that IFTTT is only supported on Hydra, it is incorrect. The Hydra/gen4 requirement only applies to the AutoSkip applet; IFTTT is available to Roamios, BOLTs and Minis running either software version; Premieres are TBD.
     
  10. man cave

    man cave Member

    33
    5
    Nov 14, 2014
    I tried, but did not get any code.
     
  11. man cave

    man cave Member

    33
    5
    Nov 14, 2014
    I have bought a voice remote control but still a little Leary about switching to Hydra.
     
  12. krkaufman

    krkaufman TDL shepherd

    11,301
    1,418
    Nov 25, 2003
    Understandable. It's a big change, with a painful cost should you want to rollback the update.

    The VOX Remote will require Hydra/gen4 for voice controls, but the IFTTT AutoSkip applet is supposed to be coming to gen3 boxes, as is native Alexa/Google voice support, later.

    As for your IFTTT code, maybe reboot the DVR and give it another try. I recall seeing posts about people having issues getting the code, but didn't have any trouble, myself.
     
  13. bradleys

    bradleys It'll be fine....

    4,020
    179
    Oct 31, 2007
    IFTTT is an open beta - have you gone onto the Facebook page and requested the code?
     
  14. krkaufman

    krkaufman TDL shepherd

    11,301
    1,418
    Nov 25, 2003
    The app request form is a Google Form.

    See: IFTTT Apps for Tivo
     
  15. bradleys

    bradleys It'll be fine....

    4,020
    179
    Oct 31, 2007
    @gonzotek

    Well, I have my Raspberry Pi, but I am still waiting on my modem.

    This evening I installed Raspbian, NCID and Pyfttt - i think that is enough for one evening!

    Even though I mostly just followed a lot of instructions, I learned a lot. I should get the modem tomorrow and then I can see if I am actually capturing the call data. It will likely be the weekend before I can work on much more...

    I am still not absolutley sure haow to fire the code to and send the webhooks html - but the internet is full of answers! :)


    How do you load the NCID client you wrote so that it can be executed?
     
    Last edited: Mar 13, 2018
  16. gonzotek

    gonzotek tivo_xml developer

    2,527
    55
    Sep 24, 2004
    Outside...
    I've been working on this in fits and starts this week. I've got the github page set up and some improved code committed to it. I just need to decide how I'll implement start-on-boot so it's always running, and then I'll write up and post as clear of directions as I can...I'm sure there will be questions that need answering or issues that need addressing, but we'll take them as they come up. Should have something posted tonight or tomorrow, if nothing else comes up.

    @bradleys I started with a text editor on my Macbook, and copied and pasted into nano, a simple text editor included in raspbian, over an ssh session. Then I saved it and made the script executable (chmod +x scriptname.py). But I'd recommend waiting until I have the time to post proper directions, I'll point to github to download everything (script and example config) directly from there. If you're not super comfortable in the unix/linux command line world already it'll be a lot easier.
     
    bradleys likes this.
  17. dcrowell77

    dcrowell77 Member

    64
    1
    Dec 27, 2007
    I don't want to hijack the thread but I've looked all over with no luck to find any kind of list of what sort of operations we can actually perform on the TiVo via IFTT. I'm shocked that there is a way to display text on the screen like you did. Any pointers?
     
  18. bradleys

    bradleys It'll be fine....

    4,020
    179
    Oct 31, 2007
    Do you have Facebook? Check out TiVo.ifttt.inovate
     
    dcrowell77 likes this.
  19. kdmorse

    kdmorse Well-Known Member

    5,905
    475
    Jan 29, 2001
    Germantown, MD
    1. Visit https://ifttt.com/tivo
    2. Scroll way down, below the More button, and click on "TiVo triggers and actions"
    3. A list of currently available triggers and actions should appear.
    It's a short list, but it's growing. Discussion (including the TiVo developers) is occurring on the Facebook group bradleys mentioned.

    Edit: Grrr, stop editing my links you silly forum software. I posted it just the way I wanted it!
     
    Last edited: Mar 16, 2018
    gonzotek likes this.
  20. dcrowell77

    dcrowell77 Member

    64
    1
    Dec 27, 2007
    Ahh, below the More button. Thanks both of you!
     

Share This Page