Installation- Copy the thermdstats folder from the downloaded zip file onto a directory on your webserver.
- Edit tempstats-cfg.php to include the correct database settings, and all the log IDs for the sensors you'd like to use. Settings are commented so should hopefully make some sense.
Image generationIncluded by default are some scripts to generate the image as shown in the examples. If you have a look at tempstats-img.php, you should see that it starts an image with specified dimensions, and then adds various 'widgets' to this image. If you don't have any of the sensors listed here, you'll need to comment out or remove the relevant line. Each line also has coordinates of its own so you can customise the look of the image by moving things around. In addition to that, tempstats-inc.php includes a bit of JS/HTML/CSS to include the image on a page of your choosing and update it automatically every 60 seconds. Pay special attention to the paths in this file when installing it. ReportingIf you don't want to use any of the image generation features of the script, you can use the contained functions for your own reporting purposes. tempstats-img.php is probably the best example. Create a new instance of class ThermdStats, and call the various functions contained within to get a result.
|