Device onboarding in IBM Bluemix platform - ibm-cloud

I have a few questions regarding onboarding a thing in IBM Bluemix IOT. My questions are as follows:
In scenario 1: Let's say I need to connect only one thing to the Bluemix platform, so I configure the device type, device, authentication token, etc., to connect the device to the platform. This is possible in the current situation.
In scenario 2: If I need to connect 50 things to my platform, will I be configuring each and every device to get the device ID, token, etc.?
Does Bluemix provide any discovery mechanism or other ways to configure things automatically?

You can programmatically register devices using bulk/devices operations. https://docs.internetofthings.ibmcloud.com/swagger/v0002.html#!/Bulk_Operations/post_bulk_devices_add
Also, this recipe describes how to register multiple IoT devices.
If you are using a gateway, devices can be auto registered:
look for "Gateway auto-registration"
Here are some other links that may be helpful.
This recipe talks in detail about how to register a device in Watson IoT Platform - https://developer.ibm.com/recipes/tutorials/how-to-register-devices-in-ibm-iot-foundation/
This Java sample shows how one can do bulk addition/deletion - https://github.com/ibm-messaging/iot-platform-apiv2-samples/blob/master/java/api-samples-v2/README.md

Related

Google Cloud IoT : How to connect to MQTT bridge from iOS applications written in Swift?

I couldn't find any documents on how to connect to Google Cloud IoT MQTT bridge from Swift-based applications. Is it possible to connect? Any references or links or samples would be appreciated.
Edited answer responding to comment: To connect using the MQTT bridge to IoT Core, check out the code here.
We don't have an IOS/Swift code example there, but you should be able to see the various pieces you need from the Node or Python examples. The URL/endpoint for IoT Core is mqtt.googleapis.com:8883. The MQTT client's user/pass is going to be blank for the user (unused) and the encoded JWT for the password. The same code has what it looks like, and should be enough to get you started hopefully.
To communicate with IoT Core, the MQTT topics are devices/<device_id>/events/ for telemetry from device to Cloud, and if you want to report state of the device to be stored by IoT Core, it's devices/<device_id>/state/ and if you want to send messages from IoT Core back down to the device, it's either devices/<device_id>/config/ for persistent messages that will be delivered on connect if the device isn't actively connected, or devices/<device_id>/command/ if it's more of a fire and forget, lower latency type message.
Original answer: We don't have any documentation around this particular use case yet, but I found this:
https://github.com/emqtt/CocoaMQTT
Which enables MQTT client connections from IOS and is written in Swift, so that should work. In addition to this, you'll need a library to encode a JWT (Json Web Token) for the auth side of things.
Having said that, you could ditch MQTT entirely and just use the HTTP bridge in IoT Core, as that might be easier? You can see the docs for doing that here: https://cloud.google.com/iot/docs/how-tos/http-bridge. You'll still need the JWT piece for the auth, but it would keep you from having to implement MQTT in the app.

How can I connect a golo4 obd2 device with IBM IoT platform without using a mobile application?

I'm using IBM Bluemix Services to develop a real time application. While developing the application I need to analyse the device data (Golo4 obd2 device) on the IoT platform. Please guide me to the step-by-step information regarding the connection of the device.
I don't have one of those devices but from a quick google it seems the only way to connect it to the web is via a mobile app they provide. Perhaps you can ask the manufacture or check the instruction manual? There is no way to analyze the data in bluemix if you can't get it from the car to bluemix. It is a common architecture for this to be via a phone (bluetooth to the phone and then wifi or mobile network to the WWW). Which is why it becomes important to consider the impact on the phone's battery life and the cost to the user of the amount of data transferred and minimize both.

IBM Watson IoT platform : historical data is empty

I try to do the POC on IBM Watson IoT platform. I have followed the document in this link for creating the device simulator.
https://console.ng.bluemix.net/docs/services/IoT/nodereddevice_sample.html#devices
It can connect and send the MQTT message event to IoT platform but when I try to get the historical data from REST API, it always returns empty.
https://os9c6l.internetofthings.ibmcloud.com/api/v0002/historian
Not sure what when wrong.
Go to the IoT Watson IoT Platform dashboard connected to your BlueMix app, go to settings and there is a setting for Time Series DB which defaults to Off. When you turn it on you also get to choose the storage duration.
if the Time Series DB was off and the device was added, you might not be able to see it even if you set the historian on on. Try and re-add the device.

Questions on Bluemix IOT Driver Behavior service

Came across the interesting service (Experimental) on Bluemix - Driver Behavior. Curious to know how it actually works, how does the data get to Bluemix from the car and is there a need to have an external app/device in the car to collect and post data to Bluemix something similar to Aviva's Rate my Drive app?
One simple example is to use IoT Platform and Node-RED to receive car probe data via MQTT and send the received data into Driver Behavior service in the Node-RED workflow. You can have MQTT client in each driver's smart phone.
I am not familiar with the Aviva's Rate my Drive app, but as far as I searched, you might be able to develop similar kind of application which can analyze driving behavior from car probe data with the Driver Behavior service.

End-to-End communication between two networks

I studied your article (CoAP) in https://www.rfc-editor.org/rfc/rfc7228.
we are developing Home automation Solution with IoT enabled devices.
I have following doubts to provide the seamlessly solution for Home Automation.
1. I have some appliance with Wi-Fi enabled controllers
2. These controllers are connected to One Standard Router (ex:- CISCO,TP-Link, D-Link). All appliance connected to one router through Wi-Fi.
3. These appliance controlled through local handheld devices by using our proprietary protocol with in the Home network.
Now, we want to give a one feature like operate these appliance by using Handheld device from Remotely.
Internet is enabled to this Router & also register one domain name.
But our problem is how to send commands or data from remote devices through Internet to home appliances.
Note:-
1.I don’t want to develop or place controller between IoT devices &
Remote handheld devices.
2. Request is initiated by remote handheld device only.
I hope, any body can guide to me for better solution.
Thanks in advance
Even if it's not a programming question I would like to make some references that can help you with decisions:
AllSeenAlliance AllJoyn Framework SmartHome Working Group. I think, it will guid you how to develop better solution.
HomeOS by Microsoft Research