Until few months ago to communicate with my Raspberry Pi I used Yowsup that is able to connect to the Whatsapp servers.
Unfortunately this method has several issues that made me choose something different... First of all the need of a sim card or at least a phone number not used for other Whatsapp connections, the frequent changes on the Whatsapp protocol and so to the Yowsup libraries that force you to always check for them and eventually update the software and your scripts also on the RPi and least but not last the fact that Whatsapp do not like that their servers are used with a software that is not their messenger!
There are several different solutions to communicate with a RPi. One that I'm using is Pushover, but it's just a one way system (from RPi to the smartphone). It works quite well if you just need text notifications, but if you need something really like Whatsapp the solution could be Telegram.