@Heinz No need to write the code for me, I've done most of the work already but the only problems I have now is that with the sketch from this thread I can't control the 3 switches I have and the two temperature sensors are not detected by the Vera interface (I guess they aren't initialized correctly ?). I would appreciate if you could take a look at it.