Thursday, September 5, 2013

Raspberry Pi and Xively Part 3

I ran the python script I posted previously overnight <link>.  Here's graphs I picked up from Xively:

The little downward spikes in the temperature chart are an artifact of the way I measure outside temperature <link>.  I have techniques to correct this, but I didn't bother for this experiment.  The power chart is real and corresponded to my regular stuff that is running live.

It was interesting working out how to run the script in background with the terminal disassociated, but like everything else, it turned out to be easy once I figured it out.  Seems the python interpreter doesn't output text when you disassociate the terminal so you can't tell it's working.  That is unless you discover the secret parameter '-u' that makes it flush the output.  The command turned out to be:

nohup python -u > logfile &

Then you can 'tail -f logfile' to see what's happening.  None of this is unusual for *nix systems, it's just annoying to have to do a web search every 2.7 seconds to find out something that isn't obvious.  I'm sure it will get better over time ... maybe.

So, I have a way of grabbing and logging it to the cloud now and I'm testing ideas for temporary storage of the various data for web presentation.  Feels like some progress.

No comments:

Post a Comment