@fsgraz Did some testing Today and my RFM range is over 80 meters node to node, with no long range antenna. That will be my next test, just waiting for a shipment from China to arrive. I did how ever notice an extreme improvement when I connected the gateway through a USB hub and then started to dig through the forum. @AWI once wrote about using an external PSU to power the long range NRF PA/LAN. I'll try that this weekend as connecting it to they USB port of my PI extended the range to 20 meters Node to Node.
@Knightan
I believe that your problem may be related to this block of code. See my thoughts as comments....
if (message.type == V_STATUS) { //This is true for all messages received
// Change relay state
state_1 = message.getBool(); //This sets state for state_1 to the received value.
digitalWrite(LED_PIN_Channel_1, state_1?RELAY_1_ON:RELAY_1_OFF);
// Store state in eeprom
saveState(CHILD_ID_5, state_1);
// Write some debug info
Serial.print("Incoming change for sensor: STATE 1");
Serial.print(message.sensor);
Serial.print(", New status: ");
Serial.println(message.getBool());
}
if (message.type == V_STATUS) {
// Change relay state
state_2 = message.getBool(); //This sets state for state_2 to the received value.
digitalWrite(LED_PIN_Channel_2, state_2?RELAY_2_ON:RELAY_2_OFF);
// Store state in eeprom
saveState(CHILD_ID_6, state_2);
// Write some debug info
Serial.print("Incoming change for sensor: STATE 2");
Serial.print(message.sensor);
Serial.print(", New status: ");
Serial.println(message.getBool());
}
It seems to me that state_1 = message.getBool(); AND state_2 = message.getBool(). So they both get set to the incoming value.
I think you need to not set both to the same value and instead differentiate them to unique values. I could be wrong as I have not had chance to do anything related to mysensors for a long time now - I also don't use Domoticz.
Have a look at the code on this page, it might help you a lot.... https://www.mysensors.org/build/relay