I am experimenting with IoT services in IBM Bluemix, attending a running MOOC at Coursera. I have set up my trial account and successfully registered some devices. I am testing the connectivity between Bluemix and my Raspberry Pi with the following simple Node-RED flow in Bluemix:
where normal
and alert
are simple injection nodes of the respective strings, the format message
node is similarly simple (returns msg
, where msg.payload = {'a' : {'indicator' : msg.payload}};
, and the IBM IoT
node is as follows:
The senseHAT device is registered and successfully connected to Bluemix, as apparent from the Watson IoT Platform dashboard:
From the Raspberry side, I have set the following simple flow to catch the 'commands' (normal
and alert
) issued in Bluemix:
with the all commands
node being as follows:
Now, although the 'commands' normal
and alert
pass through from Bluemix to my Raspberry, I keep on getting the subject error message, as shown below (notice the time stamps):
and a similar error message is logged in the Node-RED console (once per minute):
Connection Error :: Error: Connection refused: Not authorized
9 Jun 19:41:19 - [error] IBMIoT: Error: Connection refused: Not authorized
Iotfclient is offline. Retrying connection
Connection was closed.
I wonder how it is possible, on the one hand to have the 'commands' passed through, while on the other hand to get at error message per minute claiming that I am not connected since my device is not authorized.
Any ideas?
On a side note (and as possibly useful additional info):
b827eb0a0ee8
and b827eb5f5bbd
) - I even tried deleting and re-registering them again in Bluemix...It looks like the cause of this could be the mix up of gateways and devices as per my previous comment. From the logs it looks like you have changed the types of the device IDs between gateway and device, and in some cases a device with id b827eb0a0ee8 has connected as a gateway (shown as just a device in your screen shot) and subsequently been disconnected because it attempts something unauthorised (probably attempting to connect an unregistered device; ie the client ID mix up issue).
Auto registration of devices is temporarily disabled and so if a device does not exist (because the client ID is wrong) then the gateway device will be disconnected.