IoT Management Simplified
This is pre-alpha software under development, we are working on internal Milestone 2. Older code we are currently migrating can be found in the M1 repository.
- Live Demo: http://demo2.openremote.com (sign-in with
test/test
oradmin/admin
) - Docker Images: https://hub.docker.com/u/openremote/
- Documentation/Wiki: https://github.com/openremote/openremote/wiki
- Community: https://groups.google.com/forum/#!forum/openremotecommunity
- Issues: https://github.com/openremote/openremote/issues
You'll need a Docker host to run this software.
- Install Docker Toolbox
- Start Kitematic and open the Docker CLI
- Get the IP of your Docker host VM with:
docker-machine ip default
- Download docker-compose-quickstart.yml
- Edit this file and review the settings
- Deploy the whole stack with:
docker-compose -f docker-compose-quickstart.yml [up|down]
- Open http://DOCKER_HOST_IP:MAPPED_PUBLIC_PORT in your browser (default http://192.168.99.100:8080/)
All Docker and Gradle commands should be executed in the project root directory.
NOTE: For Docker volume mapping to work correctly on Windows and OS X ensure that your working directory is located somewhere under your home directory
NOTE: The Docker virtual machine's time will drift when you are using VirtualBox. You will see "token is not active" verification errors if the time skew is too large. Until this is fixed, periodically run docker-machine ssh default 'sudo ntpclient -s -h pool.ntp.org'
to update the virtual machine's clock.
We are using the Orion Context Broker with a MongoDB backend. For development, this is an instance with a non-persistent data store.
For authentication and authorization we are using Keycloak with a non-persistent data store.
Test and sample data will be installed fresh every time you start the server(s).
All services required for development can be deployed with Docker Compose, configured in docker-compose.yml
. Execute docker-compose up
in the project root to download required images (this might take a while and give no feedback) and run containers.
The default configuration of all *Service
classes is for host IP 192.168.99.100
. If this is not your Docker host IP, you must set various environment variables (see Quickstart).
The GWT compiler will listen for compilation requests and produce Javascript code from our Java code. Start and keep it running in the background with ./gradlew -p manager/client gwtSuperDev
.
- Create a "New Project From Existing Sources" and import as a Gradle project
- Run
./gradlew eclipse
- In Eclipse go to File > Import and import the project as "Existing Projects into Workspace"
Configure your IDE and set up a Run Configuration:
- Module:
manager/server
- Working directory: (Set to project root directory)
- Main class:
org.openremote.manager.server.Server
You can now open http://localhost:8080/ in your browser.
You can run the tests of the manager
project with ./gradlew test
or run the individual test classes in your IDE directly. The working directory must always be set to the project root diretory.
Note that some of these tests are end-to-end tests that require the whole environment to be running. This means your Keycloak and Orion containers will be used, and data will be inserted and deleted during a test run. You might want to start with clean containers before running tests and you might have to restart containers after (failed) tests.
We currently do not have our own pipeline for extracting/converting OSM data into vector tilesets but depend on the extracts offered on https://github.com/osm2vectortiles/osm2vectortiles.
You can extract smaller tilesets with the following procedure:
- Install tilelive converter:
npm install -g mapnik mbtiles tilelive tilelive-bridge
- Select and copy boundary box coordinates of desired region: http://tools.geofabrik.de/calc/#tab=1
- Extract the region with:
tilelive-copy --minzoom=0 --maxzoom=14 --bounds="BOUNDARY BOX COORDINATES" theworld.mbtiles myextract.mbtiles
Build Docker images with ./gradlew clean buildImage
. Remove old images before if you don't want to use the Docker build cache.
You can start and test these images with the docker-compose-quickstart.yml
configuration.
You can also directly build and push the image to our Docker Hub Account: /gradlew clean pushImage -PdockerHubUsername=username -PdockerHubPassword=secret