< OM2M | one
Revision as of 06:17, 20 January 2016 by Aissaoui.laas.fr (First writing of the tutorial)
Start the sample plugin
- Go to the MN-CSE OSGi console and enter the following command to list all deployed plugins.
- Start the "org.eclipse.om2m.ipe.sample" plugin (id=30 in this example) by typing the following command:
osgi> start 30
- The interworking proxy creates all required resources to enable to monitor and control lamps remotely and in a standardized way.
- After starting, you will see a java graphical interface displaying two lamps and three switches. You can use this interface to switch ON/OFF the two lamps separately or simultaneously.
- Open the IN-CSE web interface, and move to the MN-CSE resource tree. You will find the following resources:
- "LAMP_0": an AE resource enables to handle lamp 0.
- "LAMP_1": an AE resource enables to handle lamp 1.
- "LAMP_ALL": is an AE resource enables to handle simultaneously lamp 0 and lamp 1.
- Click on the "LAMP_0" application resource. You will find two containers:
- "DESCRIPTOR" stores the lamp description.
- "DATA" stores the lamp data.
- Click on the "DESCRIPTOR" container. You will find one contentInstance containing "LAMP_0" description.
- Click on the contentInstance (CI974727193 in this example)
- Click on the "getState" button to read the latest lamp state value stored in the GSCL database.
- Click on the "getState(Direct)" button to read the lamp state directly from the lamp.
- Click on the "switchON" to switch on the lamp.
- Click on the "switchOFF" to switch off the lamp.
- Click on the "toggle" button to toggle the lamp.
Remote control lamps
- Try to switch ON "LAMP_0" via the IN-CSE web interface, and then check the lamp state value on the java graphical interface.
- Try to switch OFF "LAMP_0" via the java graphical interface, and the check the lamp state value using the IN-CSE web interface.