Node ACK issue
-
Apparently nothing changes if I reboot the ethernet GW, the node remains disconnected.
-
@daniele looks like the problem on node side.
-
I fully agree with you, but I cannot understand what can be causing the issue.
On the software side, do you suggest any change on the node code?
Could it be an hardware issue?
I tried changing both the arduino and the NRF24, but without any luck.
I tried switching from the 3.3V pin to the 5V pin with a voltage regulator, but still the same issue. -
@daniele Can you try with a different version of MySensors library? What the current version of MySensor library?
-
I'm using version 2.2.0, which is the last one.
-
@daniele ok, When I get time, I will try to reproduce this locally.
-
@daniele said in Node ACK issue:
pinMode(ledPin, OUTPUT);
pinMode(relayPin, OUTPUT);
pinMode(ventolePin, OUTPUT);// Set relay to last known state (using eeprom storage)
relay = loadState(CHILD_ID_RELAY)?RELAY_ON:RELAY_OFF;Hi!,
Might not be an issue, however from a code perspective you should set the stuff below in the setup loop:
pinMode(ledPin, OUTPUT); pinMode(relayPin, OUTPUT); pinMode(ventolePin, OUTPUT); // Set relay to last known state (using eeprom storage) relay = loadState(CHILD_ID_RELAY)?RELAY_ON:RELAY_OFF;
Before() is called prior to setup... not sure if this really is an issue, but just try it...
What might help is the example from the mysensors site. It contains an example to control relays:
https://www.mysensors.org/build/relayIt does basically the same you want... can you try the example?
-
That's exactly the example I started with, then I changed it trying to avoid this issue (basically I only change the value of a variable during the receive() function to reduce the time needed to process a new message).
I also tried using the setup() instead of the before(), but the effect is the same.
-
@jkandasa , the ack issue is probably related to some hardware interference, not to your code.
Yesterday as a last test I turned off a wireless thermostat I have close to arduino (working on 433 Mhz, so really far from the 2.4 GHz I use with NRF24), and the disconnections suddenly disappeared!
I'm sorry I bothered you.
Thank you very much for your support!
Daniele -
@daniele no worries. I am happy that you find the root cause of the issue