IBM watson IoT integration difficulties

I’ve been trying to go through the Watson refrigerator demo project for my impExplorer Developer Kit to talk to IBM Watson IoT, but IBM’s cloud site has been updated to where you can’t follow the instructions.

Can anyone offer assistance in getting it to work on current IBM cloud? I’ve spent over 2 hrs on it and yes I’m in the industry so its even more frustrating to not be able to get it to work myself.

No problem getting impexplorer to talk to impcentral, its just can’t locate the watson API settings as they’ve either changed or now charge for watson’s tie in.

Hi,

Sorry about that … yes, IBM Watson keeps changing its setup and it’s challenging to keep our instructions updated. We’ll have a look shortly.

@terrencebarr thanks that would be greatly appreciated.
Additionally, I think updating this use case’s agent and and device code would be most helpful.

I think getting it updated would in fact be very helpful to developers as this was and is a fantastic development use case from which a lot of developers can launch from. All of the code is from 2017.

  • It’s using unsupported libraries (HTS221.device.lib.nut / LIS3DH.class.nut:1.3.0) and deprecated commands (imp.getmacaddress()). It does build though and sends packets but without mac address (deprecated) I wonder if IBM is properly tracking the device ID.

  • And yes - IBM appears to have either moved watson away from lite plan or has materially changed site you can no longer follow instructions.

  • I can confirm IBM is successfully sent the electricimp packets but its unable to dashboard it. (there is no watson dashboard for lite that I can see anymore at least - attempts to work with IBM or their support end in frustration)

Thanks!

Hi,

Here’s what I found:

  1. Yes, some libraries are unsupported, but should still work. imp.getmacaddress() also still works. The code registers a device with the correct deviceID and then uses that for every published event, as far as I can see.
  2. There still is a lite plan but the screen flow is slightly different now. To get to the dashboard you need to click on the user account in the upper right (not intuitive) and the API permission must now be “Standard” (which I think it wasn’t before).
  3. The publish command to Watson is sent successfully, and then it takes several minutes for data to show up in the device events dashboard. But Watson doesn’t appear to parse the event data correctly and therefore you cannot create a card to visualize it (e.g. there is no “RefrigeratorMonitor” Event and no “temperature” property).

My feeling is Watson changed the structure of the device events and our agent code needs to be adjusted accordingly. I can have someone else on my team who has worked more deeply with Watson in the past have a look at it, but this may take a couple of days. Or you could play with it yourself and try changing the structure of the JSON that is sent to Watson and see if that helps - I assume there is Watson documentation on that.

Best,
– Terrence

I’ve just had a look and yes the code and instructions are quite old. I think Terrence has pointed out the areas that are different. I have gotten a dashboard up and working using the code from this example (despite the outdated libraries). I did notice a couple oddities with IBM when trying to create the dashboard. I had to wait for data to start posting to IBM before I could create the dashboard blocks and if the device had not posted data it wasn’t available. I’ve done a quick update of the instructions on our development branch in the library here: https://github.com/electricimp/IBMWatson/tree/develop/Examples/SmartRefrigerator. The IBM instructions have some new screenshots so they should be easier to follow now.