Merge pull request #400 from ayyoob/IoTS-1.0.0

few changes in sample device types to load cdmc specific units
revert-dabc3590
Ruwan 8 years ago committed by GitHub
commit 2802205d7e

@ -31,7 +31,7 @@
Operations
</div>
<div class="add-margin-top-4x">
{{unit "iot.unit.device.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
{{unit "cdmf.unit.device.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
</div>
{{/zone}}

@ -30,7 +30,7 @@ function onRequest(context) {
if (device && device.status != "error") {
return {
"device": device.content,
"backendApiUri": devicemgtProps["httpsURL"] + "/android_sense/",
"backendApiUri": "/android_sense/",
"autoCompleteParams": autoCompleteParams
};
} else {

@ -32,7 +32,7 @@
Operations
</div>
<div class="add-margin-top-4x">
{{unit "iot.unit.device.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
{{unit "cdmf.unit.device.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
</div>
{{/zone}}

@ -28,7 +28,7 @@ function onRequest(context) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") {
return {"device": device.content, "backendApiUri" : devicemgtProps["httpsURL"] + "/arduino/", "autoCompleteParams" : autoCompleteParams};
return {"device": device.content, "backendApiUri" : "/arduino/", "autoCompleteParams" : autoCompleteParams};
} else {
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
exit();

@ -32,7 +32,7 @@
Operations
</div>
<div class="add-margin-top-4x">
{{unit "iot.unit.device.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
{{unit "cdmf.unit.device.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
</div>
{{/zone}}

@ -28,7 +28,7 @@ function onRequest(context) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") {
return {"device": device.content, "backendApiUri" : devicemgtProps["httpsURL"] + "/raspberrypi/", "autoCompleteParams" : autoCompleteParams};
return {"device": device.content, "backendApiUri" : "/raspberrypi/", "autoCompleteParams" : autoCompleteParams};
} else {
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
exit();

@ -32,7 +32,7 @@
Operations
</div>
<div class="add-margin-top-4x">
{{unit "iot.unit.device.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
{{unit "cdmf.unit.device.operation-bar" device=device backendApiUri=backendApiUri autoCompleteParams=autoCompleteParams}}
</div>
{{/zone}}

@ -28,7 +28,7 @@ function onRequest(context) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var device = deviceModule.viewDevice(deviceType, deviceId);
if (device && device.status != "error") {
return {"device": device.content, "backendApiUri" : devicemgtProps["httpsURL"] + "/virtual_firealarm/", "autoCompleteParams" : autoCompleteParams};
return {"device": device.content, "backendApiUri" : "/virtual_firealarm/", "autoCompleteParams" : autoCompleteParams};
} else {
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
exit();

@ -15,4 +15,4 @@
specific language governing permissions and limitations
under the License.
}}
{{unit "iot.unit.policy.edit"}}
{{unit "cdmf.unit.policy.edit"}}

@ -15,4 +15,4 @@
specific language governing permissions and limitations
under the License.
}}
{{unit "iot.unit.policy.view"}}
{{unit "cdmf.unit.policy.view"}}

@ -15,4 +15,4 @@
specific language governing permissions and limitations
under the License.
}}
{{unit "iot.unit.policy.wizard"}}
{{unit "cdmf.unit.policy.wizard"}}

@ -17,37 +17,59 @@
~ specific language governing permissions and limitations
~ under the License.
-->
<DeviceManagementConfiguration>
<DeviceType>android_sense</DeviceType>
<DeviceTypeConfiguration name="android_sense">
<Features>
<Feature code="keywords">
<Name>Add Keywords</Name>
<Description>Send keywords to the device</Description>
<Operation context="device/{deviceId}/words" method="POST">
<QueryParameters>
<Parameter>keywords</Parameter>
</QueryParameters>
</Operation>
</Feature>
<Feature code="threshold">
<Name>Add Threshold</Name>
<Description>Send Threshold to the device</Description>
<Operation context="device/{deviceId}/words/threshold" method="POST">
<QueryParameters>
<Parameter>threshold</Parameter>
</QueryParameters>
</Operation>
</Feature>
<Feature code="remove_words">
<Name>Remove words</Name>
<Description>Remove Threshold from the device</Description>
<Operation context="device/{deviceId}/words" method="DELETE">
<QueryParameters>
<Parameter>words</Parameter>
</QueryParameters>
</Operation>
</Feature>
</Features>
<ManagementRepository>
<DeviceDefinition>
<License>
<Language>en_US</Language>
<Version>1.0.0</Version>
<Text>This is license text</Text>
</License>
<!--if generate is set to true then the feature information will be picked up from the annotation in the api-->
<Features generate="true"/>
</DeviceDefinition>
<ProvisioningConfig>
<SharedWithAllTenants>false</SharedWithAllTenants>
</ProvisioningConfig>
<ProvisioningConfig>
<SharedWithAllTenants>false</SharedWithAllTenants>
</ProvisioningConfig>
</ManagementRepository>
<PushNotificationConfiguration>
<!--MQTT Config-->
<PushNotificationProvider>MQTT</PushNotificationProvider>
<Properties>
<Property Name="mqtt.adapter.name">android_sense.mqtt.adapter</Property>
<PushNotificationProvider type="MQTT">
<FileBasedProperties>true</FileBasedProperties>
<!--if file based properties is set to false then the configuration will be picked from platform configuration-->
<ConfigProperties>
<Property Name="mqtt.adapter.name">androidsense.mqtt.adapter</Property>
<Property Name="url">tcp://localhost:1883</Property>
<Property Name="username">admin</Property>
<Property Name="dcrUrl">https://localhost:9443/dynamic-client-web/register</Property>
<Property Name="qos">0</Property>
<Property Name="scopes"/>
<Property Name="clearSession">true</Property>
</Properties>
</PushNotificationConfiguration>
</DeviceManagementConfiguration>
</ConfigProperties>
</PushNotificationProvider>
<License>
<Language>en_US</Language>
<Version>1.0.0</Version>
<Text>This is license text</Text>
</License>
</DeviceTypeConfiguration>

@ -17,22 +17,27 @@
~ specific language governing permissions and limitations
~ under the License.
-->
<DeviceManagementConfiguration>
<DeviceType>arduino</DeviceType>
<DeviceTypeConfiguration name="arduino">
<Features>
<Feature code="bulb">
<Name>Control Bulb</Name>
<Description>Control Bulb on Arduino Uno</Description>
<Operation context="device/{deviceId}/bulb" method="POST">
<QueryParameters>
<Parameter>state</Parameter>
</QueryParameters>
</Operation>
</Feature>
</Features>
<ManagementRepository>
<DeviceDefinition>
<License>
<Language>en_US</Language>
<Version>1.0.0</Version>
<Text>This is license text</Text>
</License>
<!--if generate is set to true then the feature information will be picked up from the annotation in the api-->
<Features generate="true"/>
</DeviceDefinition>
<ProvisioningConfig>
<SharedWithAllTenants>false</SharedWithAllTenants>
</ProvisioningConfig>
<ProvisioningConfig>
<SharedWithAllTenants>false</SharedWithAllTenants>
</ProvisioningConfig>
</ManagementRepository>
</DeviceManagementConfiguration>
<License>
<Language>en_US</Language>
<Version>1.0.0</Version>
<Text>This is license text</Text>
</License>
</DeviceTypeConfiguration>

@ -17,30 +17,27 @@
~ specific language governing permissions and limitations
~ under the License.
-->
<DeviceManagementConfiguration>
<DeviceType>raspberrypi</DeviceType>
<DeviceTypeConfiguration name="raspberrypi">
<Features>
<Feature code="bulb">
<Name>Control Bulb</Name>
<Description>Control Bulb on Raspberrypi</Description>
<Operation context="device/{deviceId}/bulb" method="POST">
<QueryParameters>
<Parameter>state</Parameter>
</QueryParameters>
</Operation>
</Feature>
</Features>
<ManagementRepository>
<DeviceDefinition>
<License>
<Language>en_US</Language>
<Version>1.0.0</Version>
<Text>This is license text</Text>
</License>
<!--if generate is set to true then the feature information will be picked up from the annotation in the api-->
<Features generate="true"/>
</DeviceDefinition>
<ProvisioningConfig>
<SharedWithAllTenants>false</SharedWithAllTenants>
</ProvisioningConfig>
<ProvisioningConfig>
<SharedWithAllTenants>false</SharedWithAllTenants>
</ProvisioningConfig>
</ManagementRepository>
<PushNotificationConfiguration>
<!--MQTT Config-->
<PushNotificationProvider>MQTT</PushNotificationProvider>
<Properties>
<PushNotificationProvider type="MQTT">
<FileBasedProperties>true</FileBasedProperties>
<!--if file based properties is set to false then the configuration will be picked from platform configuration-->
<ConfigProperties>
<Property Name="mqtt.adapter.name">raspberrypi.mqtt.adapter</Property>
<Property Name="url">tcp://localhost:1883</Property>
<Property Name="username">admin</Property>
@ -48,6 +45,13 @@
<Property Name="qos">0</Property>
<Property Name="scopes"/>
<Property Name="clearSession">true</Property>
</Properties>
</PushNotificationConfiguration>
</DeviceManagementConfiguration>
</ConfigProperties>
</PushNotificationProvider>
<License>
<Language>en_US</Language>
<Version>1.0.0</Version>
<Text>This is license text</Text>
</License>
</DeviceTypeConfiguration>

@ -17,30 +17,27 @@
~ specific language governing permissions and limitations
~ under the License.
-->
<DeviceManagementConfiguration>
<DeviceType>virtual_firealarm</DeviceType>
<DeviceTypeConfiguration name="virtual_firealarm">
<Features>
<Feature code="buzz">
<Name>Control buzzer</Name>
<Description>Control buzzer on Virtual Firealarm</Description>
<Operation context="device/{deviceId}/buzz" method="POST">
<FormParameters>
<Parameter>state</Parameter>
</FormParameters>
</Operation>
</Feature>
</Features>
<ManagementRepository>
<DeviceDefinition>
<License>
<Language>en_US</Language>
<Version>1.0.0</Version>
<Text>This is license text</Text>
</License>
<!--if generate is set to true then the feature information will be picked up from the annotation in the api-->
<Features generate="true"/>
</DeviceDefinition>
<ProvisioningConfig>
<SharedWithAllTenants>false</SharedWithAllTenants>
</ProvisioningConfig>
<ProvisioningConfig>
<SharedWithAllTenants>false</SharedWithAllTenants>
</ProvisioningConfig>
</ManagementRepository>
<PushNotificationConfiguration>
<!--MQTT Config-->
<PushNotificationProvider>MQTT</PushNotificationProvider>
<Properties>
<PushNotificationProvider type="MQTT">
<FileBasedProperties>true</FileBasedProperties>
<!--if file based properties is set to false then the configuration will be picked from platform configuration-->
<ConfigProperties>
<Property Name="mqtt.adapter.name">virtualfirealarm.mqtt.adapter</Property>
<Property Name="url">tcp://localhost:1883</Property>
<Property Name="username">admin</Property>
@ -48,17 +45,27 @@
<Property Name="qos">0</Property>
<Property Name="scopes"/>
<Property Name="clearSession">true</Property>
</Properties>
<!--XMPP Config-->
<!--PushNotificationProvider>XMPP</PushNotificationProvider>
<Properties>
<Property Name="xmpp.adapter.name">virtualfirealarm.xmpp.adapter</Property>
<Property Name="host">localhost</Property>
<Property Name="port">5222</Property>
<Property Name="username">admin</Property>
<Property Name="password">admin</Property>
<Property Name="jid">admin@localhost</Property>
<Property Name="server.name">localhost</Property>
</Properties-->
</PushNotificationConfiguration>
</DeviceManagementConfiguration>
</ConfigProperties>
</PushNotificationProvider>
<!--<PushNotificationProvider type="XMPP">-->
<!--<FileBasedProperties>true</FileBasedProperties>-->
<!--&lt;!&ndash;if file based properties is set to false then the configuration will be picked from platform configuration&ndash;&gt;-->
<!--<ConfigProperties>-->
<!--<Property Name="xmpp.adapter.name">virtualfirealarm.xmpp.adapter</Property>-->
<!--<Property Name="host">localhost</Property>-->
<!--<Property Name="port">5222</Property>-->
<!--<Property Name="username">admin</Property>-->
<!--<Property Name="password">admin</Property>-->
<!--<Property Name="jid">admin@localhost</Property>-->
<!--<Property Name="server.name">localhost</Property>-->
<!--</ConfigProperties>-->
<!--</PushNotificationProvider>-->
<License>
<Language>en_US</Language>
<Version>1.0.0</Version>
<Text>This is license text</Text>
</License>
</DeviceTypeConfiguration>
Loading…
Cancel
Save