-
Notifications
You must be signed in to change notification settings - Fork 0
Charts
With Persistence being available in openHAB, one frequent requirement is to visualize time series of values in the UI. openHAB supports the easy definition and creation of such charts.
There are different ways to integrate charts in the UI: They can be created on the server and provided to the UI as PNG or SVG files. They could also be created as HTML5 through Javascript (see e.g. Sencha Charts or Google Chart Tool), where the data would be retrieved from the openHAB server through a REST API.
For the moment, only the server-side chart creation as PNG through rrd4j is implemented. More to come soon!
To use the rrd4j charting solution, you must have installed the addon bundle org.openhab.persistence.rrd4j. The items that you want to show on the graphs must be persisted through the rrd4j persistence service once a minute, see the Persistence on how to set this up.
Charts are not created in a regular interval, but on-the-fly upon access, which means that they are always up-to-date. To access the charts, the org.openhab.persistence.rrd4j bundle registers a servlet that can be accessed at http://<server>:<port>/rrdchart.png
.
What kind of data should be displayed is configured through HTTP parameters. The servlet accepts the following ones:
- w: width in pixels of image to generate - this parameter is optional and defaults to 480
- h: height in pixels of image to generate - this parameter is optional and defaults to 240
- period: the time span for the x-axis. Value can be h,4h,8h,12h,D,3D,W,2W,M,2M,4M,Y - this parameter is optional and defaults to "D", i.e. showing the last 24 hours
- items: A comma separated list of item names to display - mandatory, unless "groups" parameter is provided
- groups: A comma separated list of group names, whose members should be displayed - mandatory, unless "items" parameter is provided
A valid request hence could look like this: http://localhost:8080/rrdchart.png?items=Weather_Temperature,Weather_Temp_Max,Weather_Temp_Min&period=W http://wiki.openhab.googlecode.com/hg/images/screenshots/rrdchart.png
The created chart will be automatically formatted with some sensible defaults. There is currently no way to change e.g. the y-axis range, the line colors, the legend, etc. A flexible configuration solution that allows full control of all rrd tool features is planned for later.
Installation
Community
- Support
- News Archive
- Presentations
- How to Contribute
- IDE Setup
- How to Implement a Binding
- How to Implement an Actions
- User Interfaces
- Classic UI
- iOS Client
- Android Client
- GreenT UI
- Bindings
- Asterisk Binding
- Bluetooth Binding
- Comfo Air Binding
- CUPS Binding
- digitalSTROM Binding
- DMX512 Binding
- EnOcean Binding
- Epson Projector Binding
- Exec Binding
- Fritz!Box Binding
- Fritz AHA Binding
- Homematic Binding
- HTTP Binding
- IHC / ELKO Binding
- KNX Binding
- Koubachi Binding
- MAX!Cube Binding
- MiLight Binding
- Modbus TCP Binding
- MPD Binding
- MQTT Binding
- Network Health Binding
- Nibe Heatpump Binding
- Nikobus Binding
- Novelan/Luxtronic Heatpump Binding
- NTP Binding
- One-Wire Binding
- Onkyo AV Receiver Binding
- OpenSprinkler Binding
- OSGi Configuration Admin Binding
- Philips Hue Binding
- Piface Binding
- Pioneer-AVR-Binding
- Plugwise Binding
- PLCBus Binding
- Pulseaudio Binding
- RFXCOM Binding
- Samsung TV Binding
- Serial Binding
- Snmp Binding
- Squeezebox Binding
- System Info Binding
- Somfy URTSI II Binding
- Sonos Binding
- TCP/UDP Binding
- TinkerForge Binding
- VDR Binding
- Wake-on-LAN Binding
- Z-Wave Binding
- Persistence
- db4o Persistence
- rrd4j Persistence
- Sql Persistence
- Sen.Se Persistence
- Cosm Persistence
- Logging Persistence
- Exec Persistence
- Automation
- Scripts
- Rules
- Actions
- Misc
- REST-API
- Security
- Google Calendar Support
- Twitter Action
- Service Discovery
- Dropbox Bundle
- CometVisu
Samples
- Item definitions
- Sitemap definitions
- Binding configurations
- Rules
- REST Examples
- Tips & Tricks
- FAQ
- XSLT Transforms
- Scripts
- Integration with other applications
- Syntax highlighting for external editors
- Update-Scripts
- Samples-Comfo-Air-Binding
Release Notes