Show last authors
1 = Tutorials =
3 === How to write an OGEMA application ===
5 Make sure you have [[downloaded the SDK>>doc:Main.Download.WebHome]] before starting the tutorial. Then follow these steps to get acquainted with OGEMA, and learn how to program applications. It guides you through the creation of your first OGEMA applications, and introduces you to a couple of useful system apps and best practices along the way.
7 * [[Setup your development environment incl. Introduction to Resource Tree and SDK Search Functionality>>doc:Main.Getting started with the OGEMA SDK.WebHome]]
8 * [[Sample App 1: Hello OGEMA. >>doc:Tutorial Collection.Example projects.Hello OGEMA.WebHome]]Introduces the basic app structure and a timer.
9 * [[Sample App 2: Sensor App.>>doc:Tutorial Collection.Example projects.Sensor App.WebHome]] Introduces listeners (event-based database interaction) and Resource patterns (template-based database interactions).
10 * [[Sample App 3: Window heat control.>>doc:Tutorial Collection.Example projects.Event-based Database Interaction.WebHome]] An almost realistic app that listens to different device types (window sensors, thermostats, batteries), groups them according to the room they are located in, and implements some energy saving management functionality.
11 ** [[Extended Event-based Database Interaction>>doc:Tutorial Collection.Example projects.Event-based Database Interaction.WebHome]]
12 ** [[Using OGEMA Simulation>>doc:Tutorial Collection.Using OGEMA Simulation.WebHome]]
13 ** [[Adding a GUI to the Window-Heat-Battery application>>doc:Tutorial Collection.Example projects.Event-based Database Interaction.Adding a GUI to the Window-Heat-Battery application.WebHome]]
14 ** [[Adding a configuration resource to the Window-Heat-Battery application>>doc:Tutorial Collection.Example projects.Event-based Database Interaction.Adding a configuration resource.WebHome]]
15 ** [[Window Heat Control: How to go on>>doc:Tutorial Collection.Example projects.Event-based Database Interaction.Window Heat Control\: How to go on.WebHome]]
17 === How to write a hardware driver for OGEMA ===
19 OGEMA drivers connect the OGEMA database with outside data sources and sinks. A typical driver e.g. reads a value from a sensor and writes it into an OGEMA resource or reads from an OGEMA resource and sends a setpoint to an actor/device. But also external data from cloud servers, from the file system or from other local computers (PC, mobile device, ...) can be integrated into OGEMA via a driver.
21 Although the structure of a typical driver differs a bit from an app drivers are also OGEMA apps from a technical point of view. So we recommend to go through the initial tutorial first before starting into the drivers examples.
23 More details on the drivers available and the development of new drivers is provided on [[How to write a hardware driver for OGEMA>>doc:Tutorial Collection.How to write a hardware driver for OGEMA.WebHome]]
25 = HowTo pages =
27 * [[Create a new project: >>url:]]explains how to use the OGEMA plugin to create a new app, how to build and run it, and how to access its user interface
28 * [[Data logging and analysis>>url:]]
29 * [[Set permissions and test your application with security enabled>>url:]]
30 * [[Load the app onto your OGEMA gateway>>url:]]: Steps to install and run an application developed in a productive OGEMA system
31 * [[Optimize your Eclipse and OGEMA Development Experience>>doc:Tutorial Collection.Optimize your Eclipse and OGEMA Development Experience.WebHome]]: Tipps and Tricks for using Eclipse with OGEMA
32 * [[OGEMA Alliance Extensions>>doc:Tutorial Collection.OGEMA Alliance Extensions.WebHome]]: Learn how to use contributions from other that are not in the standard OGEMA API (yet) and how to contribute yourself
34 = Reference pages =
36 * The full API reference can be found here: [[https:~~/~~/>>url:]]
37 * You can also browse the OGEMA Data models in the [[source code on Github>>url:]]
38 * [[OGEMA Utilily Classes and Concepts Reference>>doc:Tutorial Collection.Optimize your OGEMA Development Experience.WebHome]]: Utility Classes, Messaging
39 * [[System and Support Apps: >>doc:Tutorial Collection.System and Support Apps.WebHome]]A set of tools for the developer which are shipped with the SDK.
40 * [[Full Widget Framework Documentation>>url:]] and [[Widget reference>>doc:Main.The OGEMA Widgets framework.Widgets reference.WebHome]]: the complete reference to the graphical elements available in the OGEMA widgets framework. They allow you to generate user pages easily, which can be displayed in the browser, but are written purely in Java.
41 * [[OGEMA Model Reference Cases>>doc:Main.OGEMA Model Reference Cases.WebHome]]
43 The OGEMA Wiki ([[https:~~/~~/>>url:]]) contains many more pages dedicated to specific concepts, such as:
45 * [[Introduction to the Resource database>>url:]]
46 * [[Introduction to Resource Patterns>>url:]]
47 * [[Introduction to Time Series>>url:]]
48 * [[Using the REST interface>>url:]]
49 * [[Security technical notes>>url:]]: more information on permissions and OGEMA security
50 * [[A list of available drivers and apps >>url:]](note: the SDK contains a few additional apps which are not yet part of the public OGEMA release; they are explained in the tutorials above)
51 * [[HardwareManager:>>url:]] a useful tool for hardware drivers, to identify connected communication devices
53 = Example Apps and Drivers =
55 A set of example apps is available via Github: [[https:~~/~~/ >>url:]]In decending order of complexity:
57 * [[hello-ogema>>doc:Tutorial Collection.Example projects.Hello OGEMA.WebHome]]: illustrates the basic setup of an OGEMA application, using a timer.
58 * [[sensor-app>>doc:Tutorial Collection.Example projects.Sensor App.WebHome]]: illustrates the use of listeners, and access to the OGEMA database by means of pattern declarations.
59 * [[window-heat-control>>doc:Tutorial Collection.Example projects.Event-based Database Interaction.WebHome]]: a sample app that interacts with different types of devices, including window sensors, thermostats and a battery. Whenever a window is opened in a room, it reduces the thermostat temperature setpoints for this room. Furthermore, it provides a simple user interface for configuring the target temperature, individually for the managed rooms. This example comes closer to a production-ready app, already.
61 Besides the apps, there are two examples of drivers available in the tutorial repository:
63 * [[schedule-csv-driver>>url:]]: reads timeseries from csv files and stores them in a schedule, the OGEMA format for persistent timeseries
64 * [[sample-androiddriver>>doc:Tutorial Collection.Exame.WebHome]]: illustrates the interaction between an Android app and the OGEMA gateway, via the OGEMA REST interface.
66 === Get tutorial apps from Github ===
68 In Eclipse go to Window->Show Perspective->Other->Git. Then click on the second icon above the left column names "Git" ("Clone a Git Repository..."). Then enter the following access data:
70 [[image:Github_cloneDialog.png||height="450"]]
72 [[image:||alt="Github_cloneDialog.png"]]
74 Now you can checkout tutorial projects:
76 In Eclipse go to "Window" -> Perspective -> Open Perspective -> Other, then choose "Git"
78 [[image:||alt="OpenPerspective.png"]]
80 Afterwards you can always get back directly to this perspective using the button at the top right. Open ogema-Github repository, open "Working Tree"->src. You can now import OGEMA Apps as Maven projects: Select the projects to import, right-click and select "Import Maven Projects...", then click Finish. You should then see the project in your Eclipse Package Explorer of the Java perspective.