Menu

Notifications - $POPUP configuration using NCIDpop Call Log

Help
nospam
2022-02-11
2022-04-12
  • nospam

    nospam - 2022-02-11

    Is it possible to change the order of the data presented in $POPUP for notifications?

    Currently I get notifications in the format:

    01022014 1234
    TEST NAME
    123-456-7890
    

    For aesthetic reasons I would prefer to get the same info in the following order

    TEST NAME
    123-456-7890
    01022014 1234
    

    The reason for my request is that I have my PC forward Caller ID on my POTS line as an iMessage to my mobile. The way Apple parses the iMessage notifications I only see

    01022014 1234
    TEST NAME...
    

    in my notifications and I have to open iMessage and find the message in order to see the incoming caller number. Many times the caller name doesn't show up so simply seeing "No Caller ID" isn't helpful for me. One of the quirks of iMessages sent from my PC is that the messages appear as already "read" so finding my notification can be tricky if I'm getting a lot of other messages around the same time.

    As an aside I'd also prefer to see dates posted as YYYYMMDD or YYYY-MM-DD since PC's tend to sort text lines left to right. Is that possible?

     

    Last edit: nospam 2022-02-11
  • Ed Attfield

    Ed Attfield - 2022-03-12

    After some checking, and lining up someone who can build the Windows installer, I think this reordering can be done.

    Are you using the "3rd party notifier" option? When I try it, everything in $POPUP comes out as a string without any line separation.

     
  • nospam

    nospam - 2022-03-12

    Yes , I am using 3rd Party Notifier.

    I am also using NCIDpop 0.10.11 on my MacOSX if that makes any difference.

     
  • Ed Attfield

    Ed Attfield - 2022-04-12

    I have changed the order of the information that comes out in the pop-up and put new files in https://sourceforge.net/projects/ncid/files/ncidpop/0.10.13/

    I don't have the tools to build the installer for the Mac but I'm hoping you can find your current NCIDpop.jar file and replace it with a new one.

    As another thought, have you considered using the ncid client with a module to call your iMessage sender?

     

    Last edit: Ed Attfield 2022-04-12
  • nospam

    nospam - 2022-04-12

    Seems to work, thanks.

    I'm not sure what you mean by "ncid client with a module to call your iMessage sender"? My NCIDD server is running on a raspberry pi (legacy setup) and I recently set up a mac-mini as a DVR which is allowing me to forward calls to iMessage. As far as I know apple doesn't allow non-mac clients to connect to iMessage.

    I use an applescript on my mac-mini to send my message via command line when NCIDpop receives a call notification.

    One quick comment/question: NCIDpop now shows the number differently. Before it only showed the "Number" column as a formatted seven digit number with hyphens, now it seems to show the raw cidcall.log string which may or may not include hyphens, country code etc.

    example
    222-333-4444
    now displays as
    +1 222-333-4444
    and callers with more than 11 digits
    442038850412
    are displayed without any formatting but in the previous version was displayed as
    203-885-0412

     
  • Todd Andrews

    Todd Andrews - 2022-04-12

    Hi nospam,

    I'm not sure what you mean by "ncid client with a module to call your iMessage sender"? My NCIDD server is running on a raspberry pi (legacy setup) and I recently set up a mac-mini as a DVR which is allowing me to forward calls to iMessage. As far as I know apple doesn't allow non-mac clients to connect to iMessage.

    I use an applescript on my mac-mini to send my message via command line when NCIDpop receives a call notification.

    If I'm understanding this correctly, it should be easy to create an ncid module to handle this as you're already sending the message via command line in NCIDpop. The ncid module can execute an applescript using the osascript command. This could be a useful module for other Mac users as well so if you'd like to send me details via email and attachment to my personal email address -- how you've set it up in NCIDpop, and the applescript itself -- I can wrap the ncid module code around it.

     
  • nospam

    nospam - 2022-04-12

    It's pretty straight forward. Here is the script, saved in my home directory as "imessage" and use 744 for permissions. I attached a screen shot for the NCIDpop settings.

    #!/usr/bin/osascript
    
    -- another way of waiting until an app is running
    on waitUntilRunning(appname, delaytime)
        repeat until my appIsRunning(appname)
            tell application "Messages" to close window 1
            delay delaytime
        end repeat
    
        -- the fact that Messages.app is running
        -- does not mean it is ready to send,
        -- unfortunately, add another small delay
        delay delaytime
    end waitUntilRunning
    
    on appIsRunning(appName)
        application appname is running
    end appIsRunning
    
    -- use system events (unused)
    on SysevAppIsRunning(appName)
        tell application "System Events" to (name of processes) contains appName
    end appIsRunning
    
    -- use finder (unused)
    on finderAppIsRunning(appName)
        tell application "Finder" to (name of every process) contains appName
    end appIsRunning
    
    -- create initial conversation in Messages
    -- adapted from @iSilentP
    on createMessagesConversation(phoneNumber, message)
        activate application "Messages"
        tell application "System Events" to tell process "Messages"
            key code 45 using command down -- press Command + N to start a new window
            keystroke phoneNumber -- input the phone number
            key code 36 -- press Enter to focus on the message area 
            keystroke message -- type some message
            key code 36 -- press Enter to send
        end tell
    end createMessagesConversation
    
    -- taken from:
    -- http://stackoverflow.com/questions/11812184/how-to-send-an-imessage-text-with-applescript-only-in-provided-service
    -- thanks to users @Senseful and @DigiLord
    on run {targetBuddyPhone, targetMessage}
        -- handles conversation not started
        -- does not handle contact not existing
        set hasError to false
    
        tell application "Messages"
            -- if Messages.app was not running, launch it
            set wasRunning to true
            if it is not running then
                set wasRunning to false
                launch
                close window 1
                my waitUntilRunning("Messages", 1)
                close window 1
            end if
    
            log "trying via imessage"
            try
                set targetService to 1st service whose service type = iMessage
                set targetBuddy to buddy targetBuddyPhone of targetService
                send targetMessage to targetBuddy
                log "sent via imessage"
            on error
                log "trying via SMS"
                try
                    set targetService to service "SMS"
                    set targetBuddy to buddy targetBuddyPhone of targetService
                    send targetMessage to targetBuddy
                    log "sent via SMS"
                on error
                    set hasError to true
                end try
            end try
    
            -- if the app was not running, close the window
            if not wasRunning
                close window 1
            end if
        end tell
    
        if hasError
            log "trying via new conversation"
            try
                createMessagesConversation(targetBuddyPhone,targetMessage)
                log "sent via new conversation"
            on error
                log "contact does not exist, can not send message"
            end try
        end if
    end run
    
     

Log in to post a comment.