cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

[Need help] Textual IDE communication with onboard Cedalo MQTT Broker

[Need help] Textual IDE communication with onboard Cedalo MQTT Broker

Akseer
Established Member

Hi,
I am trying to publish the some data in the MQTT Broker tree from the Textual IDE. This can be done via Node-RED as well, but I am trying to do from the Textual IDE.

Please see the example below. It's showing a "self-signed certificate error". 
Is there any example for this approach? Thanks

Akseer_0-1681829101576.png


Regards

Akseer Ali Mirani

2 REPLIES 2

Akseer
Established Member

Hi,

I have just updated the code and it's working. See the screenshot below.
If anyone want to test it, use the code attached to this chat. Copy & paste it in your Textual IDE and update the broker address, username, password, and client ID.

Akseer_0-1681836471718.png

I am now trying to use the self signed certificates which I have created using openssl. So far it's showing "certificate verify failed" error.
If anyone has worked around in a similar case, please let me know.


Regards

Akseer
Established Member

Hi,

Sorry the picture in the last message is showing the output generated from python IDE interpreter, not from script engine. Please let me know in case anyone know. Also, when I run this in script engine, it's showing below error.


Exception has occurred: ModuleNotFoundError
No module named 'dns'
File "/var/snap/rexroth-solutions/common/solutions/DefaultSolution/configurations/appdata/scripts/libraries/bosch/paho/mqtt/client.py", line 72, in <module> import dns.resolver File "/var/snap/rexroth-ide/common/solutions/activeConfiguration/script/delete.py", line 3, in <module> from paho.mqtt import client as mqtt_client File "<string>", line 12, in <module>
Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist