I have an iPhone and an iPad, both connected via WiFi. My girlfriend also has an iPhone and and iPad, and iMessage works fine, until you take the phone out of the house. The phone is then not connected to WIFI, but the iPad is. Now, when an iMessage comes in, it is delivered to the iPad and the 'Delivered' message goes back to the sender, BUT it doesn't go to the phone until the phone next logs on to WIFI, so the sender is told that message was delivered, and it WASN'T. You would not believe how much trouble this little flaw has just got me into!!!!
I have a Mac mini, an iPhone without cellular, and an iPhone with cellular. iMessage works as intended for me.
Go into the settings for each device and make sure that both your Apple ID and mobile number are used. Set new conversations to start from your mobile number.