Custom Notificaiton with Signal Messenger does not work with sink

  • Hi,


    I have been using custom notification with telegram following this guide: [GUIDE] Use Telegram as notification service. This works very good also with OMV5.


    However, I am thinking to switch to Signal Messenger. I thought I could use a similar approach. I have duplicated the Telegram OMV sink.d file and inserted this code for signal:


    Bash
    #!/bin/bash
    
    sender="+49xxxxxx"
    recipiant="+49yyyyyyy"
    
    echo -e "${OMV_NOTIFICATION_SUBJECT} on the ${OMV_NOTIFICATION_DATE} \n\n $(cat ${OMV_NOTIFICATION_MESSAGE_FILE})" |signal-cli -u $sender send $recipiant


    However, this script seems not to be triggered.


    I tested already manual message sending with signal which works very well. Also using this commands it works without any issues:


    Code
    export OMV_NOTIFICATION_SUBJECT=test
    export OMV_NOTIFICATION_DATE=testdate
    export OMV_NOTIFICATION_MESSAGE_FILE=/tmp/testfile 
    
    /usr/share/openmediavault/notification/sink.d/./20signal


    Any idea why it does not work automatically with custom notification and sink scripts?

  • I needed the same. I am running signal-cli-rest-api within node-red so I simply can use an http endpoint on node-red like this:


    Bash
    #!/bin/bash
    content=$(echo -e "${OMV_NOTIFICATION_SUBJECT} on the ${OMV_NOTIFICATION_DATE} \n\n $(cat ${OMV_NOTIFICATION_MESSAGE_FILE})")
    curl -X POST -H "Content-Type: text/plain" --data "${content[@]}" http://node-red.hostname.url/notify/omv 



    Maybe this helps someone :)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!