Hi all,
All works fine now! After the reshuffle of the connection pins it does what I want it to do.
Only thing I need to change is the sleeptime, it's now set to 6000 and when no change send a value to the GW after ten readings. But it is to often now..