Make a connection using 2 nodeMCU in one IoT device?

have a look at this topic Adding a New Device using MQTT