NodeMCU v2 - IBM MQTT Issue


Hey, everyone.

Just discovered Zerynth and I am quite enjoying it. I am attempting some examples for a project and something is failing with “Controlled Publish Period” for IBM Cloud/Bluemix. I am using an ESP8266. Note that I’ve added a wifi conected check, to make sure it wasn’t the issue.

connecting to wifi…
wifi connected
connecting to mqtt broker…
[Thread 1 exited with exception AttributeError @[0087:000A:00C6:0064:00C5:0025:00F2:0022]](javascript:window.except(’@[0087:000A:00C6:0064:00C5:0025:00F2:0022]’,'Thread 1 exited with exception AttributeError '))

By clicking on the error it leads me to:

[Thread 1 exited with exception AttributeError at line 35 of ibmcloud.iot.iot.connect](javascript:app.go_to_exception(‘c:\users\d0ug_\controlled_publish_period’,‘c:\users\d0ug_\zerynth2\dist\r2.3.0\libs\official\ibmcloud\iot\’,35))
[raised at line 394 of mqtt.mqtt.connect](javascript:app.go_to_exception(‘c:\users\d0ug_\controlled_publish_period’,‘c:\users\d0ug_\zerynth2\dist\r2.3.0\libs\official\zerynth\mqtt\’,394))
[raised at line 408 of mqtt.mqtt.connect](javascript:app.go_to_exception('c:\users\d0ug\controlled_publish_period’,‘c:\users\d0ug_\zerynth2\dist\r2.3.0\libs\official\zerynth\mqtt\’,408))
[raised at line 332 of ssl.init](javascript:app.go_to_exception(‘c:\users\d0ug_\controlled_publish_period’,‘c:\users\d0ug_\zerynth2\dist\r2.3.0\stdlib\’,332))

I have already looked (and still am) for already given answers on this forum and over other pages. If you know something that may help me, I’d appreciate.


Hi @dougmrqs
Are you sure that you provide the right configurations for the device in the configuration file ‘device.config.json’?


Hello. Thanks for your answer. I’ve just double-checked it and I’m pretty sure it is ok. Running the python script with the same parameters on my laptop connects it to IBM Cloud with no further issues.
I am still trying to solve this and unfortunately no advances yet.


Hello @dougmrqs,

TLS is not supported by ESP8266 boards in Zerynth, could you try with an ESP32 board?


Hello. I don’t have a ESP32 but I will try to obtain one. There is no way to deactivate TLS on ESP8266, as I configured at IBM IoT “TLS Optional”?


Hello @dougmrqs,

in our IoT Cloud libraries we support only TLS connectivity to enforce a secure usage of IoT Cloud services.
Anyway you could try to open your local IBMCloud library (zerynth2/dist/r2.3.0/libs/official/ibmcloud/iot/ and pass None as ssl_ctx and use a different port.
Let me know :slight_smile:


Hey @LorenzoR
I’ve bought a ESP32 and it is working perfectly fine. I’ll try the ESP8266 option you just told me and I’ll let you know.