Hi Devs,
I would like to update rest of the changes I made in order to complete the
task.
in this period the name of the device type was changed from
'raspberrypicodebsed' to 'sampledevice' as per comments in the Code review.
The numbering is continued from the previous mail.
6.Change the secured websocket endpoint url pattern in component > ui >
realtime.analytics-view > analytics-view.js
from
var websocketEndpointForStream1 = websocketEndpoint +
"/secured-websocket/org.wso2.iot.devices.sensor_temp/1.0.0?deviceId="
+ device.deviceIdentifier + "&deviceType=" + device.type;
to
var websocketEndpointForStream1 = websocketEndpoint +
"/secured-websocket/org.wso2.iot.devices.sensor_temp/1.0.0?deviceId="
+ device.deviceIdentifier + "&deviceType=" + device.type +
*"&websocketToken="
+ token;*
7.Add a device Id for the mqtt client in mqttHandler.py
mqttClient = mqtt.Client(client_id='sampledevice-client')
These are the essential changes that i have encountered during the task.
Please find the final code here [1] ,
and the device deployer here [2].
All feedback is welcome.
[1]-
https://github.com/wso2/product-iots/tree/master/modules/distribution/src/core/samples/sampledevice
[2]-
https://github.com/wso2/product-iots/blob/master/modules/distribution/src/core/samples/sampledevice-deployer.xml
*Sameera Wickramasekara*
Software Engineer
WSO2
lean . enterprise . middleware
Mobile : +94(0) 714652035
<https://wso2.com/signature>
On Mon, Jul 31, 2017 at 9:30 AM, Sameera Wickramasekara <[email protected]>
wrote:
> Hi All,
>
> Sorry for the incomplete report above, it was sent mistakenly. As i have
> mentioned ,I have been working on a Raspberry Pi IoTS plugin based on the
> existing maven archetype[1]. In order to make the plugin compatible with
> the latest IoTS release, I have made following changes.
>
> 1.Updated the versions of following dependencies in pom.xml of the project
>
> <carbon.kernel.version>4.4.11</carbon.kernel.version>
>
> * <!-- Carbon Device Management -->*
> <carbon.device.mgt.version>3.0.37</carbon.device.mgt.version>
> <carbon.device.mgt.plugin.version>4.0.34</carbon.device.mgt.plugin.version>
> 2.Implemented the new methods from the interface
> DeviceTypeManagerService.java in
> /component/plugin/src/main/java/org.wso2/[DEVICETYPE]/plugin/impl/DeviceTypeManagerService.java
>
> 3.Updated the p2.inf file the updated p2.inf file is attatched here
> 4.added the following scope to the downloadSketch method definition in
> DeviceTypeService.java
>
> @Path("/device/download") @GET @Produces("application/zip")
> @ApiOperation( consumes = MediaType.*APPLICATION_JSON*,
> httpMethod = "GET", value = "Download client", notes =
> "", response = Response.class, tags = "raspberrypiled",
> extensions = { @Extension(properties = {
> @ExtensionProperty(name = *SCOPE*, value =
> "perm:raspberrypiled:enroll") }) } )Response
> downloadSketch(@QueryParam("deviceName") String deviceName,
> @QueryParam("sketchType") String sketchType);
> 5.Added *device_management* to @Tag scope in DeviceTypeService.java
>
> @SwaggerDefinition( info = @Info( version = "1.0.0",
> title = "", extensions = {
> @Extension(properties = {
> @ExtensionProperty(name = "name", value = "raspberrypiled"),
> @ExtensionProperty(name = "context", value =
> "/raspberrypiled"), }) } ),
> tags = { @Tag(name = "raspberrypiled,*device_management*",
> description = "") })
> I have been able to deploy the new device and download the agent up to now.
> The next step is to perform an operation to control an LED bulb.I will update
> the status when it has been done. Appreciate any feedback.
>
> [1] https://github.com/wso2/carbon-device-mgt-maven-plugin
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fwso2%2Fcarbon-device-mgt-maven-plugin&sa=D&sntz=1&usg=AFQjCNFFQ8yxwXxMGp3amxUgxXqgdgxs2g>
>
> Regards,
>
> *Sameera Wickramasekara*
> Software Engineer
> WSO2
> lean . enterprise . middleware
> Mobile : +94(0) 714652035 <+94%2071%20465%202035>
> <https://wso2.com/signature>
>
>
> On Mon, Jul 31, 2017 at 8:53 AM, Sameera Wickramasekara <[email protected]
> > wrote:
>
>> Hi Devs,
>>
>> I have been working on a Raspberry Pi IoTS plugin based on the existing
>> maven archetype[1]. In order to make the plugin compatible with the latest
>> IoTS release, I have made following
>> changes.
>>
>> Updated the versions of following dependencies in pom.xml
>>
>> carbon.device.mgt.version
>>
>> carbon.device.mgt.plugin.version
>>
>>
>>
>> *Sameera Wickramasekara*
>> Software Engineer
>> WSO2
>> lean . enterprise . middleware
>> Mobile : +94(0) 714652035 <+94%2071%20465%202035>
>> <https://wso2.com/signature>
>>
>>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev