Hi everyone,
This is my first post here. First of all, I should say congratulation for the formidable work you're putting in there. I've discovered MySensors about 2 months ago and I'm loving it.
I've recently built:
- A MQTT gateway with a NodeMCU + RFM69W
- A temperature node (Arduino ProMini 3.3v) + SI7021 + RFM69W. Running on a CR2032 cell.
Initially tested the whole thing for a few days and it works like a charm. But I noticed battery level dropping slowly (well expected I suppose). I thought, maybe I can actually do something to minimize energy used. I read a bunch online and implemented the following:
- Remove the led (well that one everyone seems to remove)
- Remove the regulator
- Add 100uF capacitor between GND and 3.3V on RFM69W (helps battery I've heard)
- Add sleep instructions here and there in my code to allow the battery to rest. The code is mostly the SI7021 example found in MySensors plus a few sleeps...
- Disable BOD (otherwise actually noticed that since adding my capacitor, my sensor would struggle to start, because of initial drain taking the battery to ~2.7V I suppose)
- Lower CPU clock to 1MHz to allow to run when battery gets lower voltage (I read that 8MHz wouldn't be stable around 1.8V but the radio, sensor and arduino could still work at that voltage).
Now, it still works. And if anyone has any feedback on what I just explained, they would be most welcome as I'm sure I've got more to learn.
One thing doesn't work as expected: when running on 1MHz, most of the time, my Gateway receives duplicate transmissions of my node. When running on 8MHz (everything else the same), no duplicates. Sensor is close to GW (3m). I suspected maybe on 1MHz I need to increase the ACK timeout of sensor, so I increased it to 2seconds. I can now see duplicate messages being 2s apart on the gateway, so that didn't do the trick.
My current solution is to not allow retries, but that is really a bad workaround... Anyone has an idea of what I could try to see what is the problem here?
Thanks everyone.