Thanks heaps @Hek and @petewill I didn't realise that without the controller running I will not get a node id. I thought incorrectly the node id came from the gateway. I booted up MYSController and it now works as expected. thanks for pointing me in the right direction..
Have a look at the "download and api" page here on mysensors (link).
Read through the section API (link) to see how you can send a message to the gateway and if you need some in-dept info go through the section SERIAL PROTOCOL (link). You'll notice that everytime a message is send to the gateway it contains the node-id.
How this is then relayed to your controller is explained in the section "Controller". I guess you can find this for yourself in the menu on top of the homepage.