First corrections in the question :)
* I'm trying to tell a person that he was away when I had COME in. (better still, when I had visited him)
* Is THIS a right expression:
* Is "get on to" the correct verb to use in this situation?
Now to answer your question :
You can use the sentences fdmaxey has said
Or you can be more vocal and say:
"I had visited you, but you were out"
"I had visited you, but you were not at home"