Hi, as a start you could modify the following sketch: remove the flamingo.h include and all flamingo related stuff. https://github.com/windkh/flamingoswitch/blob/master/examples/mysensors/FlamingoSwitchSensor.ino Have a look at the function incommingMessage line 196. Here the message from the gateway is received. Replace 230 with your own code.