Sorry if this is too basic, but I am new and trying to figure out how this great system works :)
My Pi was thrown off the network last night and it seems I lost all data between then and the time I rebooted it. Should there be a data buffer stored somewhere or is it just tough luck? I am using the default Pi/EmonTx setup.
If data is lost, has anyone thought of a solution? Guess a local database would be better but not 100% safe as the Pi may get kicked of the local network also.
Thanks in advance
Mads
Edit: I will program the Pi to auto reconnect (WiFi) if the router drops out which should solve most of the problem :-/
Edid 2:
Setting the base station to auto reconnect seems to solve this issue.
Updated the Pi with WiFi reconnect on dropout and turned off my WiFi for more than 5 minutes. The Pi got back online once the WiFi came back up and all the data from the dropout period could subsequently be found in the emoncms.org database.
Thanks to Paul for explaining the system to me.
Re: [SOLVED] Lost internet -> No data - Emoncms.org
Are you are using the OEM SDcard image ?
Assuming you are for now, emonhub does buffer data in memory only, so this will be lost on reboot.
The best solution is to have the Pi configured to auto reconnect when the network comes up. persistent storage has it's own problems as the SDcard's life will be massively reduced by the intense write frequency. This is why the OS image is read-only and the included emoncms is a "low-write" version.
Using the local emoncms will give you persistent storage by processing the incoming data down to minimal a minimal data size and saving at a slower frequency (once a minute I believe) to a write enabled partition.
If you are using an rfm2pi with you nodes then the Pi could still collect data if the LAN goes down, buffer it in RAM and them pass it on to emoncms(.org) when it becomes available, which is ideally how it should work.
You should test if this is the case by disconnecting the WiFi (disable via router or power down router momentarily) although if your nodes are also connected via LAN there will be no data received during that time but should recommence on reconnection.
Paul
Re: [SOLVED] Lost internet -> No data - Emoncms.org
Thanks for the explanation Paul, this is very useful.
I have the nodes connected to the Pi w. RFM and the Pi connected to LAN w. WiFi. If the Pi stores some amount of data and I set it up to auto reconnect, loss of data would be a very very rare event.
Guess this morning I messed up rebooting the Pi rather than just pulling and reinserting the WiPi dongel. But better to fail, learn and correct, than loosing a lot of data at a later date :-)
Mads