Configuring and Using Osmosis Platform
Index 1. Registration 2. Login 3. Device Creation 4. Node Creation 5. Sending Data from REST Client 6. Checking data received 7. Sending Data from Device 8. Define Rule 9. Define Alarm 10. Trigger Alarm 11. Creating and using Client Groups 12. Creating and using User Groups
1 Registration Go to http://www.axelta.com and click on registration button which is there on top right of Axelta website Then provide your basic information and submit it. Once you register with the Axelta, you will get activation link to provided email ID by clicking on it you can activate your account. For reference go through the below screen shots [screen 1-3]. Screen 1
Screen 2 Screen 3
2 Login Go to http://www.axelta.com and click on Login button on top right corner Provide your user name and password Screen 3
3 Create a new device Once you are logged in to the Axelta, click on Devices option which is there at left side of the page, then click on New button to create new device. For the reference check the below screen (screen -4). Screen 4 While creating the device provide information as mentioned below o Device Number can be anything as your choice o Select the client name (your organization name which has provided by you at the time of Registration) o Select device type o Select client group, by default client group is Generic Group. You can also create your own client groups and you can assign any device to it (we have separate chapter on Client Groups ) Here based on your device (sensor), DeviceType can be selected In this demo we have selected device type as Generic (refer screen 5) After providing above information click on Create button to create the device.
Screen 5 To check the created devices list click on the Devices option from the left side bar of the page. You will be use some of the information like device number, device key, device type and client name when you start sending the information to the Osmosis Platform. Screen 6
4 Add Node Each device can potentially have multiple "nodes" representing the edge devices where the sensor or actuators are placed. Click on device key to take you to device edit screen. (Refer screen 6). Click on Edit button which will show you Add New Node button in the lower half Screen 7 Click Add New Node button and provide node number, asset name, property1 and property2 (As we selected device type as generic in screen 5), click on Add button. (refer screen 8) Node number will also be required while passing data to the OSMOSIS PLATFORM. Here Alarm1 and Alarm2 are optional. Their configuration and usage details are provided in further sections.
Screen 8 Screen 9
5. Send Data from REST Client: In order to test your device set up and configuration, suggest you first use a browser based REST client You will need to add a plug-in to your browser - Example below is for Google chrome. In Google search engine search as rest client for chrome browser and select the top search link and Launch the app. Check below screens (screen 10-12) for reference Screen 10 Screen11
Screen 12 Plug-in is added to your browser, provide the necessary information to the REST client (given below) and send it. URL : http://aws.axelta.com/services/data/ HTTP Method : POST JSON Object : { "device_no":"demo123", "node_no":"001", "device_key":" 68U40UGMEYXPF9JMWMGV ", "client":"axetapvtltd", "device_type":"generic", // Optional fields based on your requirements. "Parmeter1":"123.23", "Parmeter2":"open", } Above JSON object is formed from the screen 6 and 9, as per your configuration details JSON will be changed. As device type is generic we have added Event : Open to the JSON object, as your requirement you can change it. Once you provide the above information to the REST Client then click on send button. For successful posting of data you will get the response code as 200. (refer screen 13)
Screen 13 6. Checking data received Click on Devices (from the left side panel). Select your device from the device list (refer screen 6) by clicking on the device key to see the list of nodes for the device. Then click on node data option (which is available beside the node number) to see the node data. (Refer screen 14) Screen 14
7 Send Data from Device - Using Java Client The client uses Jersey reference implementation. Therefore you would need to add jersey-bundle-1.14.jar (http://mvnrepository.com/artifact/com.sun.jersey/jersey-bundle/1.14 ) to your class path. Java code : import com.sun.jersey.api.client.client; import com.sun.jersey.api.client.clientresponse; import com.sun.jersey.api.client.webresource; public class JsonClient { public static void main(string[] args) { try { Client client = Client.create(); // configuring the URL WebResource webresource = client.resource("http://aws.axelta.com/services/data/"); // JSON Object String input = "{\"device_no\":\"demo123\",\"device_key\":\"68u40ugmeyxpf9jmwmgv\",\"node_no\":\"001\",\"client\":\"axetapvtltd\",\"device_type \":\"Generic\",\"Property1\":\"123.23\"}"; ClientResponse response = webresource.type("application/json").post(clientresponse.class, input); // reading response code if (response.getstatus() == 200) System.out.println("data posted successfully!"); else System.out.println("Problem occurred in data posting!"); } catch (Exception e) { e.printstacktrace(); } } } Similar approach can be used while sending data from an embedded device by creating an http connection 8 Define Business Rule Through rules, you can control any alarms or workflows in the system. Rules are created and assigned to alarms; Alarms are triggered based on certain action of the device. Select the Rule option from the left panel of the page and click New button to create new rule (refer screen 15).
Screen 15 Screen 16 Check the above screen and provide information as your requirement. Rule name can be as per your choice Select Device type based on the your device Description is optional Rule Definition :
In above screen we provided @Parameter1>120, it means this rule will be executed whenever the Parameter1 is above a certain level [120 in this case]. You can add combination of parameters to define the rule. Click on "validate" to check the syntax of the rule. Please get in touch with us in case your rules are more complex and you want to use the plugin facility provided in the platform. We have an API available that can be used for this purpose. Click on "create" button. Screen 17
9. Create Alarm Alarm is created and configured for a device and it will be triggered based on information being sent by the device Click on Alarm from the left side panel of the page and select new button to create new alarm (refer screen 18) Screen 18
Screen 19 Check the screen 19 and provide information to create Alarm Alarm Name can be as per your choice. Alarm type: Alarm type needs to be selected as your need (SMS or Call or Email or Android Notification) o SMS: A text message is sent to the configured user at a device level o Call: A notification will be posted with the message in the command centre screen [you can check them though traffic signal lights on top right hand side] o Email: An email will be sent to the selected user at the device level o Android Notification: A push notification [using GCM] will be sent. Please get in touch with us for building your client app to enable push notifications] Rule Name : Select the rule name that was created earlier (refer - 17) Message: Message that needs to be sent at the time of triggering Alarm Click on Create button.
Screen 20
10 Configure Alarm Till now we created a rule and assigned that rule to the Alarm This alarm now needs to be assigned to a device. Select Devices from the left panel of the page and click on device key to see the nodes information. Follow the below screens (screen 21-25) to assign above created alarm to the device. Screen 21 Screen 22 Alarm1: Select the alarm name After alarm name is selected the user name to trigger alarm to the selected user (Refer screen 23).
Screen 23 Screen 24 Test the alarm configuration by again sending data to the platform using REST client. Refer screen 12 to send the data, once we send the data to the OSMOSIS alarm will be triggered and message will be send to configured user. Here alarm will be triggered as we are created rule as @Parameter1>120 and also we are sending Parameter1: 120 from the device (check the below JSON Object)
{ "device_no":"demo123", "node_no":"001", "device_key":"68u40ugmeyxpf9jmwmgv", "client":"axetapvtltd", "device_type":"generic", "Parameter1":"123.23" }
11 Creating and using Client Groups Client group is used to assign set of devices to a particular client group which makes user to manage his devices in easy way. Typically applicable when there are different departments and branches and you want to control access to them Click on Client Group from the left side panel of the page and select NEW button to create new client group (Refer screen 25). Generic Group is the default group. Screen 25 Provide information and click on create button (Refer screen 27). Client Group Name can be as per your choice Description is optional Client name needs to be select
Screen 26 Screen 27
Screen 28 List client groups by clicking on Client Groups option from the left panel. Devices can now be assigned to client group Click on client name to see the client group information (Refer screen 29) Screen 29
Click on edit button Follow steps as per screen 30-31 Screen 30 Screen 31 Search for the device that you want assign to the group - refer screen 32 Once you get the required device information select check box and click on update button refer screen 33 In same way you can add or remove any number of devices to the client group
Screen 32 Screen 33
Screen 34
12 Creating and using User Groups User groups are used to provide granular level access control to users based on their roles. It defines what action can a user perform You can create user groups and assign permissions (create, view, update, delete) to it and later this user group can be assign to a particular user. Generic user groups are already provided and we recommend you use them. In case they are not sufficient, you can create your own user groups. User will have certain permissions based on assigned user group. Click on User Group from the left panel of the page and select NEW button to create new User Group Refer screen 35 Screen 35 Provide the following information and click on create button to create new user Refer screen 36-38. Group Name can be anything as your choice Description is optional Select the client Group Select the check boxes to assign permissions to the User Group. After creating User Group, ii can be assigned to a user while creating the User
Screen 36 Screen 37
Screen 38