GotAPI plugin for Kadecot
GotAPI is an open-source, Android-hosted device API standardized by OMA. This hybrid plugin provides to Kadecot bridge access to GotAPI, while to GotAPI server bridge access to Kadecot.
- Install Kadecot and GotAPI server (such as Device Web API Manager by GClue.inc ) to your Android phone.
- Boot Kadecot as usual, then you will find GotAPI and related devices icon within devices list, as well as other smart appliances supported by Kadecot.
Then you are all set. You don't need to install this plugin by yourself, because this is now statically linked to the Kadecot's official release. GotAPI server should already recognize Kadecot and provide access to ECHONET Lite and other devices through "kadecot" profile. The arguments and reply structure is described in Kadecot API page.
Terms:
[kip] : IP address of Kadecot
[gid] : Device ID of "GotAPI" device in Kadecot
[did] : Device ID of specific GotAPI device in Kadecot
-
Obtain services suppoted by the system and plugins:
http://[kip]:31413/jsonp/v1/devices/[gid]?procedure=system.get¶ms={} -
Obtain services supported by each device:
http://[kip]:31413/jsonp/v1/devices/[did]?procedure=serviceinformation.get¶ms={} -
Examples for light profile
-
GET: http://[kip]:31413/jsonp/v1/devices/[did]?procedure=light.get¶ms={}
-
POST: http://[kip]:31413/jsonp/v1/devices/[did]?procedure=light.post¶ms={lightId:6,color:"0000FF"}
-
DELETE: http://[kip]:31413/jsonp/v1/devices/[did]?procedure=light.delete¶ms={lightId:6}
-
PUT: http://[kip]:31413/jsonp/v1/devices/[did]?procedure=light.put¶ms={lightId:6,name="some light name",color:"00FF00"}
-
Examples for Host-related profiles (Android terminal)
-
Vibration-Profile
http://[kip]:31413/jsonp/v1/devices/[did]?procedure=vibration.put¶ms={interface:"vibrate"} -
DeviceOrientation Profile
http://[kip]:31413/jsonp/v1/devices/[did]?procedure=deviceorientation.get¶ms={"attribute":"ondeviceorientation"} -
Phone call
http://[kip]:31413/jsonp/v1/devices/[did]?procedure=phone.post¶ms={interface:"call",phoneNumber:"08054137092" -
Get available cameras
http://[kip]:31413/jsonp/v1/devices/[did]?procedure=mediastream_recording.get¶ms={interface:"mediarecorder"} -
Take photo
http://[kip]:31413/jsonp/v1/devices/[did]?procedure=mediastream_recording.post¶ms={interface:"takephoto"}
Asynchronous API access is currently unsupported.
When dConnect SDK for Android is updated, you should make new dconnect-sdk-for-android.jar.
How to make dconnect-sdk-for-android.jar
- Extract dconnect-sdk-for-android/build/outputs/aar/dconnect-sdk-for-android-debug.aar.
- Rename classes.jar to dconnect-sdk-for-android.jar.
- Move dconnect-sdk-for-android.jar to libraries/libs in this project.