I think it has a lot to do with it, but it’s not the cause. As I understand Emoncms (not talking about the Emoncms.org server), it uses Redis to maintain the inputs database in memory. They do this to reduce the amount of updating to the disk, which in the most common case is an SDcard, subject to wear and failure when written to excessively.
Whenever it’s restarted, deliberately or as a result of power failure, the inputs database is not up to date, and so the date of last posting is not there. Upon query, the inputs appear to IoTaWatt to be new inputs. So at this point, IoTaWatt drops back to the “upload history from” date.
In your case, as I understand it, you use a hard disk drive. There are various settings for Redis to obtain various levels of persistence. If you can find where the Emoncms instance sets the persistence, you might try setting that up.
I haven’t done anything with this, and it would be a boost to the IoTaWatt community if you could investigate this. Specifically I’d be inyerested in using RDB persistence with a daily interval. Even an SDcard version of Emoncms would not suffer significant wear with daily snapshots, and it would limit any restart upload to 24 hours. As previously mentioned, I believe Emoncms will simply discard any redundant data. I would consider even 12 or 6 hours if power failures or restarts are common. With a HDD, one hour or less would be fine.
Given that redundant uploads are not a problem, I wouldn’t attempt to use the AOF journals.
If you figure this out, I’d appreciate posting a tutorial about how to set persistence in the Emoncms distribution. I would probably work that into the IoTaWatt/Emoncms docs.