⚠️ This project is no longer under development. Please use cumulocity-compass-widget-plugin for Application Builder >=2.x.x and Cumulocity >=1016.x.x⚠️
This widget displays an animated compass direction based on the measurement data provided.
Realtime: Realtime direction updates from defined measurement
- This widget supports runtime deployment. Download the Runtime Binary and use application builder to install your runtime widget.
This guide will teach you how to add the widget in your existing or new dashboard.
NOTE: This guide assumes that you have followed the installation instructions
- Open the Application Builder application from the app switcher (Next to your username in the top right)
- Add a new dashboard or navigate to an existing dashboard
- Click
Add Widget
- Search for
Compass
- See below for the configuration options
- Select your device in the
Target Assets or Devices
field - Select the device measurement and fragment in the
Measurement
dropdown - Click
Save
The compass widget will refresh each time a new measurement value is sent from the device.
The compass widget will listen for the measurement and fragment which you have specified in the configuration options above
The compass arrow will move to the numeric measurement value which must be between 0 and 360 to represent the arrow rotation in degrees.
In the 'body' of your Cumulocity measurement, you will need to include the following:
{
measurementseries: The measurement series which has been selected in the compass widget e.g. "weather_station"
{
measureementfragment: The measurement fragment which has been selected in the compass widget e.g. "wind_direction"
{
value: numeric value from 0 to 360 to represent the rotation of the compass arrow e.g. 270
unit: the unit label e.g. "degrees"
}
.
.
}
e.g.
{
weather_station: {
wind_direction: {
value: 270,
unit: "degrees"
}
}
.
.
}
- Clone the repository on your local machine using
git clone https://github.com/SoftwareAG/cumulocity-compass-widget.git
. - Run
npm install
to download the module dependencies. - Run
c8ycli server -u https://your_tenant_url
to start the server. - Go to
http://localhost:9000/apps/cockpit/
in the browser to view and test your changes. - (Optional) push the changes back to this repository.
- Finish the development and testing on your local machine.
- Run
gulp
to start the build process. - Use the
compass-widget.zip
file in thedist
folder as your distribution file.
This widget is provided as-is and without warranty or support. They do not constitute part of the Software AG product suite. Users are free to use, fork and modify them, subject to the license agreement. While Software AG welcomes contributions, we cannot guarantee to include every contribution in the master project.
For more information you can Ask a Question in the TECHcommunity Forums.
You can find additional information in the Software AG TECHcommunity.