Granted, it was a pain switching between python, SQL, and php, but after a while, you kind of get used to it. I took the XBee example I previously posted that does asynchronous reads of XBee network packets and modified it to save some of the data items to my SQLite3 database. Then I modified the php web page from a couple of days ago to get the items out of the database and display them. Things went much faster and easier since I didn't have to install anything, just add things here and there.
That's the way it usually goes; getting started is over 50% of the work. Then the next 40% moves along pretty well with the last 10% taking forever.
Here's the updated XBee python code to catch stuff and save it in the database. If you look closely, I started grabbing the packets from the Acid Pump and saving them. That's my first attempt at grabbing a particular device and saving it. The status packet I've been grabbing is forwarded by my controller <link> that I've been using for a couple of years and hope to replace. I'll have to work on the packets being sent by my XBee thermostat <link> that is setting in a housing on a fence post outside next.
This has my most recent discoveries regarding python and its interface to the SQLite3 database. It took me a while to figure out how to grab a single item out of the data base, but it's illustrated above. Of course I updated the web page I'm working on to show off the current power usage and outside temperature that is forwarded by my controller. Here's the modified web page:
There's not a whole lot I can point out that isn't already in the comments above. Here's the web page as the browser displays it:
Yep, I've discovered how to put up a degree symbol. Now, I have two processes that run in background all the time updating the database with different items. That's a bit silly, so I'm going to combine them into one piece of code that goes over my lan and talks to the web devices as well as monitoring the XBee network for updates. That way I only have one thing to make sure is running all the time.
And yes, the temperature up there is correct. The rainstorm has lowered the temperature enough that I have all the doors open that don't get rained into. Time to air out the house.