# Communication Between Ignition and Python Program via Mosquitto

**URL:** <https://forum.inductiveautomation.com/t/communication-between-ignition-and-python-program-via-mosquitto/93557>\
**Category:** Maker\
**Tags:** ignition81\
**Created:** [July 22, 2024, 7:11pm UTC](https://forum.inductiveautomation.com/t/communication-between-ignition-and-python-program-via-mosquitto/93557 "2024-07-22T19:11:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Safiullah\_Azimi](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@Safiullah\_Azimi](https://forum.inductiveautomation.com/u/Safiullah_Azimi)\
**Post date:** [July 22, 2024, 7:11pm UTC](https://forum.inductiveautomation.com/t/communication-between-ignition-and-python-program-via-mosquitto/93557/1 "2024-07-22T19:11:01Z")

</div>

Hello everyone,

I am working on a project where I want to integrate Ignition Maker Edition with a Python program using Mosquitto for communication. However, I am encountering an issue with the data format that I receive in my Python program.

Here is the data format I send:

> {  
> "DoorClosed": false  
> }

But this is what I receive:

> ï¿½ÐÞ2  
> oorClosedï¿½ÈÞ2  
> 8Jp

I have also tried using the MQTT server module from Ignition itself, but I encountered the same problem.

Interestingly, when I use other MQTT publishers, the received data is correctly formatted

My goal is to perform some initial testing, so I would appreciate any guidance or suggestions on how to resolve this formatting issue.

Thank you in advance for your help!

Best regards,  
Safi

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 22, 2024, 7:16pm UTC](https://forum.inductiveautomation.com/t/communication-between-ignition-and-python-program-via-mosquitto/93557/2 "2024-07-22T19:16:52Z")

</div>

You need to configure the MQTT Engine module to use a Custom namespace, otherwise it assumes that incoming data is in Sparkplug format.

[https://docs.chariot.io/display/CLD80/MQTT+Engine+Custom+Namespace](https://docs.chariot.io/display/CLD80/MQTT+Engine+Custom+Namespace)

---

<div class="post-metadata">

**Author:** ![Safiullah\_Azimi](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@Safiullah\_Azimi](https://forum.inductiveautomation.com/u/Safiullah_Azimi)\
**Post date:** [July 22, 2024, 7:25pm UTC](https://forum.inductiveautomation.com/t/communication-between-ignition-and-python-program-via-mosquitto/93557/3 "2024-07-22T19:25:52Z")

</div>

> [@Kevin.Herron](#):
>
> You need to configure the MQTT Engine module to use a Custom namespace, otherwise it assumes that incoming data is in Sparkplug format.

Thank you for the quick response!

Specifically, I am interested in how to utilize this namespace within my Python program.

Any guidance on how to implement or handle this namespace configuration in Python would be very helpful.

Thank you!

---

<div class="post-metadata">

**Author:** ![uwe](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/uwe/32/6039_2.png) [@uwe](https://forum.inductiveautomation.com/u/uwe)\
**Post date:** [July 23, 2024, 3:31pm UTC](https://forum.inductiveautomation.com/t/communication-between-ignition-and-python-program-via-mosquitto/93557/4 "2024-07-23T15:31:00Z")

</div>

Check our open-source Sparkplug python clients at

> **[GitHub - gambitcomminc/sparkplug-demo: Demo of MQTT Sparkplug client to monitor sensors...](https://github.com/gambitcomminc/sparkplug-demo)**
>
> Demo of MQTT Sparkplug client to monitor sensors exceeding a threshold
