This is an old revision of the document!
Note that I am in the process of updating and reorganizing all the XTdb pages. Things may be in flux, missing, or just confusing for the next few days.
XTdb is a plugin/helper for XTension that provides database functionality, motion reports, gauges and graphs. By default it records changes in value or events for all Units in your XTension database. XTension provides interfaces for you to view historical data from this database as well as create graphical motion reports as well as gauges and graphs. These can all be displayed live updating in XTension views and any of the web interfaces.
Motion reports are available on the Web Interfaces and the built in XTension Views. As of this moment full day reports are only available on the web interfaces.
Example of live 1 hour motion reports:
Example of 24 hour motion reports from the Web Interface:
When running it will record all unit value changes and provide for motion reports and graphing of data. The motion reports are available for free but the graphing functionality requires the purchase of a serial number. More information is available on the purchasing page
Version 3.5 and newer requires at least build 947 of XTension or newer
Download the latest version XTdb v3.5.7 (build 90) (10/26/2020)
To select which data lines you wish to have show up in the mouseover select the “mouse” checkbox in the edit graph dialog for that data source:
* Retina resolution graphs and gauges. To turn on high resolution graphs turn on the “Create Retina Resolution Graphs” checkbox at the bottom of the XTdb preferences window. Keep in mind that these graphs will take twice as much memory and space and time to transfer to remote web pages and such. If you regularly connected via slow connections you may not want to do this. They do look wonderful though.
query v: returns the data between the 2 dates for the specified unit. If the optional saving to property is supplied then the data will be written to that file in a comma separated value standard format. If the file exists it will be overwritten. If this is used then the verb itself will return the number of records written to the applescript caller instead of the raw data.
If no file specification is included then a “list of lists” is returned. Each data point will return a list of 2 elements, the value and the date. {{34.5, 1/2/19 3:45pm}, {44.7, 1/2/2016 3:55pm}, etc…} The dates are applescript date objects and not just strings as I’ve drawn them there.
set myData to query “brew temperature” starting at date “2/5/2016 4:00pm” ending at date “2/5/2016 4:30pm”
Version 3 requires at least build 897 of XTension or newer
For XTension versions prior to build 897 please use XTdb version 2.2 (build 62)
Suitable for multiple units. Each pointer may be configured for color, outline, size, length and style. Displaying the title and legend is optional. You can add colored zones, raise them with a 3D effect, draw them on top of or behind the tick marks, draw with any opacity and also add labels to the zones.
Semicircle meters are also suitable for multiple values. Each pointer is configurable as to start and end point as well as width. There are several pointer styles. In these examples the long pointers are “pencil” and the small triangle points are triangle points with their start and end point adjusted. You can configure colored zones and choose if they will fill to the center of the graph. Zone labels are not supported on circular meters. Drawing the title or the legend is optional.
All the same pointer and zone options of the Semicircle meter but with the data space continuing all the way around. Suitable for things like a wind direction display.
All the same pointer and zone options of the Semicircle meter and the Full Circle Meter, but with a gap at the bottom of the meter for better seeing a start and end point of the range.
Smaller meter types in 4 orientations. All the same display and zone options as the other rounded meters. The last item in the list of units will have it’s value displayed in the value box.
All the same pointer and zone options as the other rounded meters but with a wider arc section for data display.
Useful for showing many values from similar devices at the same time. Supports all the same zone coloring options as the rest of the meters.
10/2/2015
By way of example here is a Gauge I’m currently running. The pointers are highly configurable as to where they are and their size. Experiment with the sliders that control their width and start and end points.
9/25/2015
9/18/2015
8/28/2015
8/25/2015
4/19/2015
set GarageFridgeDutyCycle to (duty cycle of "GARAGE fridge compressor" for 12)
duty cycle of “name of unit” for (number of past hours)
returns a percent. You can run this say every 5 minutes in a scheduled event in XTension to keep a watch on something.