Push notifications on ZNC?! Really?!
by José Antonio Rey
A couple days ago I did a post about going to school, and it in-between the lines it had the words “I’m deatached from my ZNC it has got push notifications on” hidden. One person did notice, and asked about how this feature worked and mentioned some tedious points in the process. But let’s get to it!
If you use ZNC, you should already know that ZNC supports the use of modules. Some of them are already built-in with the packaged system, but some others can be compiled manually. If you host your own ZNC, this may be of your interest.
The module for this is called ‘push’ (a bit obvious, huh?) and is hosted on Github, right here. In order to be able to compile and grab the module, first execute:
sudo apt-get install git znc-dev
Then, pull the git code, make the module and install it:
git clone https://github.com/jreese/znc-push.git
And, finally, load the module on your ZNC by executing the following on your ZNC:
/msg *status loadmod push
In general, there are two services I have checked are good and work: Pushbullet (for Android) and Airgram (for iOS). Each service has some specific configuration options. In the case of Pushbullet, which I use, you need to execute the following on your ZNC:
/msg *push set service pushbullet
/msg *push set secret [secretgoeshere]
/msg *push set target [targetgoeshere]
To find this values, register on Pushbullet and login to your account. Once the device is added, click on your email address and then on ‘Account Settings’. It should explicitly give you the secret. Then, go back to your inbox and click on the device you want to send the notifications to, even if it’s already selected. Now, from the address bar, copy the ‘device_iden’ value – that should be the target. And you’re good to go!
There are many other configuration options, which can be found here. I hope this is useful for many of you who want to stick with ZNC 24/7