IBM Bluemix IotFoundation : Receiving messages from non-declared devices - ibm-cloud

I'm using the IBM Bluemix Iot Foundation (IoTF fot shortness).
On one hand, I use a NodeJs application, declared in the API keys of IoTF. This application posts messages as a device :
const IotfApp = require("ibmiotf").IotfApplication;
const appClient = new IotfApp(configApp);
/* ... Stuff */
appClient.publishDeviceEvent(deviceType, deviceId, "metrics", "json", msg);
So far, so good.
I have declared two (out of tens) devices for test purpose in the IoTF.
On the other end, I use a NodeRed IoTF boilerplate sample. Everything seems to work, BUT i receive messages from device that HAS NOT been declared in the IoTF.
Is this a normal behaviour ?
How can I list (nothing found using API) all the terminals sending messages but not 'officially' declared ?
Thanks.
--- Edit ---
Screenshots :
Iot Foundation : http://i.imgur.com/H4ut77b.png
NodeRed boilerplate : http://i.imgur.com/OAxQKuk.png

If the device that is showing up in Node Red debug (F86E5) was previously registered as a device in Watson IoT (IoTF) and then deleted, the data will still be streamed until you have restarted the connection on that device.
If a device connects and authenticates then begins to send data before it is deleted, the Watson IoT platform does not disconnect it. However, when it tries to reconnect the registration will be checked at that point and it will no longer be able to send data to that org.

Related

capacitor app log local ip address in offline request

I would like to log the ip address in some requests. For this i would like to get the info from the network-interface in my app. As it is a offline app that replicates to couchdb and not server requests this is proving to be difficult.
i was thinking of using #capacitor/network but this plugin only tells me if there is a network connection and no infos.
Then i tried cordova-plugin-networkinterface but i could not get this plugin to work properly because it does not show in cordova.plugins like cordova-plugin-badge.It does show up in the window object as window.networkinterface.getIPAddress() but it returns "undefined".
Can someone please tell me why cordova-plugin-networkinterface does not work in capacitor (not using ionic) or a different approach.

How does multi-device offline-first database sync work with iOS/Android from Flutter?

I've reinvented the wheel (because nobody has yet created this wheel) and created:
Offline-first which syncs with other users over server
Multi-user sync secured offline and online databases with hybrid encryption (this sends and recieves new writes only, except for new user which recieves entire database)
This included handling offline authentication
So it has dawned on me that I have yet another architectural issue here. I've got everything all synced up across multi-users but how do I have one user sync with a new device?
The reason this is an issue is because local users hash credentials are stored on local device for offline authentication. Private asymmetric key is also stored securely on local device. So, if an existing user logs into new device, the login succeeds as long as there is internet access. But immediately there are errors because there is no data locally. Since keys can't be sent over the wire, theres a conundrum.
I can imagine solving this like so:
If remote login succeeds but there is no local data then user would be newly setup locally on new device. Problem is, master remote database which should handle this has encrypted data. This would require a whole bunch of back and forth passing public keys and re-encryption of entire master db with new acls. Seems like a lot of work and requiring both devices in hand...
Apple does this for all their devices and content. How can we?
Is there a simple way to do this?

Watson IoT Platform stuck in "Binding" state connecting to Cloudant

I've been trying for a few days now to use Cloudant as my Watson IoT Platform´s Historian service, but still no success.
I've finally managed to connect them with help I got here: Can't connect Watson IoT Platform to Cloudant, so I was able to set the bucket interval, and so on.
But though I can see them as connected in each "Connections" tab, no databases were created, and I can´t see Cloudant when I'm setting up my board Card.
When I get to the Extensions page on WIoTP and click on the gear button it appears to be stuck in a "binding" state as displayed in this screenshot.
Can anyone put a light in this?
Thanks!

IBM Watson IoT Platform - How to create application interface?

I've created devices and managed them with Node-RED. And receiving real-time data in my IoT platform board. So i wanted to access those data by REST API which i found this: https://docs.internetofthings.ibmcloud.com/apis/swagger/v0002-beta/info-mgmt-beta.html
Specially wanted to use this
/device/types/{typeId}/devices/{deviceId}/state/{applicationInterfaceId}
And i created schema by following this: https://developer.ibm.com/courses/labs/create-device-schema-internet-things-platform-service-ibm-bluemix-dwc013/
Then i requested to /api/v0002/applicationinterfaces, /api/v0002/schemas.
But both result was:
{"results": [], "meta": {"total_rows": 0}}
How can i create schema and application interface?
The /api/v0002/applicationinterfaces, /api/v0002/schemas will return 0 results because you need to use the POST methods described in https://docs.internetofthings.ibmcloud.com/apis/swagger/v0002-beta/info-mgmt-beta.html to create the schema and application interface.
However, from your question I think you simply want to access the device data. In which case view the documentation for developing applications https://console.bluemix.net/docs/services/IoT/applications/api.html#api, in particular you can access the last event for a particular device using the last event cache e.g. /api/v0002/device/types/{deviceType}/devices/{deviceId}/events
Finally I found the correct REST here which returns event data i.e. sensor data.
On this link refer Last Event Cache. The REST will return the "payload" field with encrypted value. Just decrypt that value and you will see the sensor data.
Thanks,
Rahul

How to connect and pull data out of funambol dm server using j2se client ?I

I have installed the DM server and it is up and running.Also added couple of device details via koneki simulator.
Now i want to use one of the j2se client to connect and pull data from DM server.
I am struck on this part.Any code sample ?
Actually, there is an OMA-DM client underneath the Koneki simulator that you might want to reuse!
You can grab the source code from the GitHub mirrors of the OMA-DM simulator: here and here
org.eclipse.koneki.simulators.omadm is used to run a new OMA-DM session. Look for the run() method in the class org.eclipse.koneki.simulators.omadm.basic.DMBasicSimulation
org.eclipse.koneki.protocols.omadm defines the object model used during a simulation.
org.eclipse.koneki.protocols.omadm.client (the most interesting for you) manages all the messages that are exchanged between a client (e.g. the simulator) and a server. Look for the org.eclipse.koneki.protocols.omadm.client.basic.DMBasicSession class.
You should stop by the Koneki forum if you have any further questions (and I am sure you will!)