Hello,
I'm doing a simple wireless thermostat for my house heating. I'm using those cheap nrf24l01 modules and arduino pro mini 3.3V 8MHz.
So I have two arduinos, one is powered with batteries, with a nokia 5110 display, a temperature sensor and a clock. If temperature drops from the setpoint, it sends a message asking to switch on the heater (or switch off in case of rising above setpoint). So nothing special or complicated.
But I ask you for advice because I'm afraid with reliability. I mean, The sender sends and order that usually is received and processed, but what about the order not being received?
So, as I'm using ack payloads there are different scenarios:
1- sender ----> receiver (message OK)
receiver ---_> sender (ack OK)
Everything OK, so no problem here,
2- - sender ----> receiver (message OK)
receiver ---_> sender (ack not received)
The heater switched but controller don't know.
3- - sender ----> receiver (message not received)
receiver ---_> sender (----- N/A ----)
in cases 2 and 3, I think I could keep sending until I receive the ack, but: how many times? kind of while (!ack)? or is better repeat just a number of times?
the real problem here is that the heater could stay in on state, heating too much. or stay off aloing the house to cool down too much.
So, any tip?
Thanks a lot in advance.