-
Notifications
You must be signed in to change notification settings - Fork 7
Home
See rtl-wx.htm for the html/javascript code that produced the webpage below.
The web page above uses data collected by the rtl-wx program. The program logs data received from 433Mhz sensors and the javascript web page above visualizes that data. A javascript file called rtl-wx.htm (in www) produced this webpage with help from the HighStock charting library and the JustGage gauge library. Note that HighStock requires a paid license for commercial use.
rtl-wx.htm is currently set up to show data from 6 Oregon Scientific temperature/humidity sensors, data from an Efergy electricity monitor connected to the mains power panel, plus data from an Owl CM119A electricity monitor connected to an oil burner circuit. The Owl electricity monitor is used to track oil consumption by measuring the time that the oil burner is on. The oil burner 'on' time is computed by measuring the time that the power draw on the oil circuit is above a configurable threshold (eg 300 watts).
For performance reasons, rtl-wx.htm reads up to 4 different csv files to produce the gauges and chart. The gauges use data from rtl-wx-latest.csv, which is a single record data file that's re-written every 3 minutes by the main program. When the 1-day or 3-day buttons are selected in the chart, rtl-wx.htm uses data from rtl-wx-15minute.csv to draw the chart. As the name indicates, the records in this file each cover 15 minute intervals. When the user selects a 'Week' button, rtl-wx-1hr.csv is automatically loaded. When a 'Month' button is selected, rtl-wx-4hr.csv is used to produce the graph. Finally, when the 'All' button is selected, rtl-wx-daily.csv is used. The javascript code in rtl-wx.htm handles the dynamic loading behind the scenes and each csv file is only loaded from the web server the first time it's needed. With this approach, the data files all stay small and the chart loads and updates fast.