Hi I have a similar setup but I'm using MCP23017 for the relays wich only takes two pins and it works perfect. As to your question about presenting sensors to gateway. Code snippet below is one way to do this I think // in my setup ID for tempsensors starts with number of relays plus one uint8_t RELAY_First_Child_ID = 1;//First relay Child-ID uint8_t DS_First_Child_ID = NUMBER_OF_RELAYS + 1; //First Child-ID to be used by Dallas Bus; set this to be higher than number of relays who need EEPROM storage to avoid conflicts // in YOUR setup ID för trmpsensors could be like below uint8_t RELAY_First_Child_ID = 1;//First relay Child-ID uint8_t DS_First_Child_ID =100; // //PRESENT TO GATEWAY void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Your info", "1.0"); // Register relays to gateway for (int i = 0; i <= NUMBER_OF_RELAYS-1; i++) { present(RELAY_First_Child_ID + i, S_BINARY);// delay(200);//uncomment if all relays not being registered correct }// end for loop //----------------------------------------------------------------------------- // Register temperature sensors to gateway as child devices // Fetch the number of attached temperature sensors // Present all temperature sensors to controller for (int i = 0; i < numberOfDevices; i++) { present(DS_First_Child_ID + i, S_TEMP);// in your case first ID=100 //delay(200);//uncomment if all sensors not being registered correct }// end for loop Hope this might give you an idea how to. If you want I can give you my sketch doing what you want to accomplish but as I said it's based on MCP23017 to drive relays