Iotawatt Fails to post to EmonCMS

@overeasy it’s my understanding that the Iotawatt has the data from day 1, correct? At least for the webserver side where it will be able to recover from a server side loss?

I think it is. The unixtime stamp corresponds to the data IoTaWatt would be trying to upload, and one of the values looks to be a voltage.

You can see the scope of your datalogs in the status display. Here you can see the Current and History logs of an IoTaWatt. The Current log is 5 second averages. The History log is 1 minute averages. All of the data in the current log is available to upload to Emoncms. So if I were to create a new node, I could prime it with about a year’s worth of history from the IoTaWatt.

That said, it would take a long time to upload a years worth of history at 5 second intervals. More like days than hours. No problem, the IoTaWatt will continue to monitor, but it will just take a long time to chug out all that data to Emoncms in the background.

image

All of the data, including the history log, is available directly from the IoTaWatt using the newer graph+ or the query API:

Sounds good, worst case and I reload the system at least I can recover it a bit. Best case would be to see about getting the system fixed preserving what’s in it.

Just looking, the load average looks a bit high.

I think something is taking CPU up.

I have to agree with you. That does appear high. This is a Raspberry Pi Model A that I had laying around. I kind of wondered if this might be a bit much for it to handle so I ordered a Raspberry Pi 3 to help up the specs a bit, in the meantime though want to fix this one if possible.

If you check the processes using htop it may well tell you what is taking all the time.

In any rate, you will be able to do a backup from the UI and restore that with no bother.

Performed a router reboot, no change.

Looking at htop and it appears that nothing is taking up the CPU in any meaningful way.

Going ahead with a backup. Hopefully the issue isn’t coming with the backup.

You need to click on ‘time’ column to sort. Redis-server looks a bit high.

For comparison, though this Pi is relatively lightly loaded.

Curious, is that a Pi B+?

Yes, but Just the EmonPi inputs/feeds.

In my case I’m using the emonsd (downloaded) on just a Raspberry Pi B+. Going to just perform a reinstall to see if that solves this.

Ah no, sorry, I misled you. This is an EmonPi so a Pi 3 I think. I’ve got a B+ sitting in front of me which confused me :cry:.

No worries. I actually have a 3 B+ on the way and will replace this old B+ with it. Kind of wonder if the old single core might be overworked. Either way, new image is being written right now. Backup made. See if this fixes it.

Maybe my similar recent experience will be useful. I was running emoncms/emonpi on a Pi 2B for the last year, no problem, with iotawatt as the only data source. I needed the 2B for something else and moved the environment to a PI B v1.2 (single core). I realized after a while that it was not getting updated from iotawatt. Tried a lot of things, including updating from stretch to buster, reinstalling emonpi, restoring db from backup. I saw the same behaviors - start things up, get one update maybe, then nothing. The PiB CPU was very busy most of the time. I did see that http -11 error in the iotawatt log often, but could not find a definition for that. Finally moved the environment (that is, SD card) back to a Pi 2B, started up, and everything worked again! The 2B is way less busy. I did end up deleting all the data in emoncms and telling iotawatt to do a history update from the beginning of its log, as I found no way to remove just the bad scattered data points from the emoncms db. So I’d also vote for iotawatt getting timeouts trying to send updates to emonpi, due to the Pi being too slow.

Kind of my feeling in the end that the little Pi B just doesn’t have the horsepower needed at times when the data gets large and more requests start to come in. Got a Pi 3B+ and was hoping to have it up already. (Also going to move the root file system to an old 30GB HDD that I have laying around.) Sadly, it looks like the USB power supply that says it puts out 2A lied and it isn’t. So, waiting on a new power supply from Sparkfun to arrive. Maybe this week?