<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to MQTT Client (partly implemented)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc4a7d9152/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc4a7d9152/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/dc4a7d9152/</id><updated>2020-02-27T16:29:51.592000Z</updated><subtitle>Recent posts to MQTT Client (partly implemented)</subtitle><entry><title>MQTT Client (partly implemented)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc4a7d9152/?limit=25#d189" rel="alternate"/><published>2020-02-27T16:29:51.592000Z</published><updated>2020-02-27T16:29:51.592000Z</updated><author><name>Sancho</name><uri>https://forge.codesys.com/u/sancho/</uri></author><id>https://forge.codesys.com82306821ca9789efb551545a52d1e5dbfc2a3dfb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;l &lt;a class="" href="http://forum.codesys.com/viewtopic.php?f=20&amp;amp;t=6913&amp;amp;x=17177&amp;amp;p=17177&amp;amp;lan=en" rel="nofollow"&gt;viewtopic.php?f=20&amp;amp;t=6913&amp;amp;p=17177#p17177&lt;/a&gt; l &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MQTT Client (partly implemented)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc4a7d9152/?limit=25#d179" rel="alternate"/><published>2020-02-27T16:29:50.565000Z</published><updated>2020-02-27T16:29:50.565000Z</updated><author><name>syoma</name><uri>https://forge.codesys.com/u/syoma/</uri></author><id>https://forge.codesys.comf2cca4acd1efe3ac4986c814f4d81f4aee536f52</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;strong&gt;&lt;a class="user-mention" href="/u/kmpm/"&gt;&lt;/a&gt;&lt;a class="user-mention" href="/u/kmpm/"&gt;@kmpm&lt;/a&gt;&lt;/strong&gt;, are you still working on MQTT project?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MQTT Client (partly implemented)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc4a7d9152/?limit=25#c7fe" rel="alternate"/><published>2020-02-27T16:29:49.709000Z</published><updated>2020-02-27T16:29:49.709000Z</updated><author><name>syoma</name><uri>https://forge.codesys.com/u/syoma/</uri></author><id>https://forge.codesys.com51ddc4c062d07cc22ff239f26cd88a6e32fd89fd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;a class="user-mention" href="/u/mstjohn/"&gt;@mstjohn&lt;/a&gt;,&lt;br/&gt;
I have checked this lib on Raspberry - as far as I understood, you need to instantiate call MQTTClient function in your task and call it periodically. This function sends publish messages from buffer if there any. It also sends keepalive requests. &lt;br/&gt;
To write the new paket to send buffer you call MQTTPub with pointer to your MQTTClient instance, topic and payload. &lt;/p&gt;
&lt;p&gt;So at least it connects to broker and publishes topics for me, but it looks like it calculates wrongly the length of publish message, so that part of topic (2 characters) goes to payload. &lt;br/&gt;
Personally I don't like the way the publish message is generated in lib - sorry for crtitics. In my opinion it can be done in easier way. I have some simple implementation of MQTT client for another platform, so can port it here, including subscribing. The only problem I'm the same newbie in Codesys as you, so I need to find out how to modify libraries first.  I also didn't work with Github, so it would be complex to update the branch there - I'm more common to SVN. &lt;/p&gt;
&lt;p&gt;What I also would like to learn - is how to send publish messages only when some variable is changed. I think there should be build in mechanism for that - like some event callback or whatever. Offcourse it's always possible to monitor change in program, but I guess there should be easier way. Maybe alarms, or something like this. Any hints?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MQTT Client (partly implemented)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc4a7d9152/?limit=25#3692" rel="alternate"/><published>2020-02-27T16:29:47.275000Z</published><updated>2020-02-27T16:29:47.275000Z</updated><author><name>kmpm</name><uri>https://forge.codesys.com/u/kmpm/</uri></author><id>https://forge.codesys.comd0809e4ca65b1ea7349fb5986e8530989e6a2fa8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;a class="user-mention" href="/u/mstjohn/"&gt;@mstjohn&lt;/a&gt; I will try to make an example project as well. Keep looking at the github page.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MQTT Client (partly implemented)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc4a7d9152/?limit=25#7fa9" rel="alternate"/><published>2020-02-27T16:29:46.395000Z</published><updated>2020-02-27T16:29:46.395000Z</updated><author><name>mstjohn</name><uri>https://forge.codesys.com/u/mstjohn/</uri></author><id>https://forge.codesys.com266a66c9d91ab74014b5fd3f5cc27f34bed05f8c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi kmpm,&lt;br/&gt;
Thanks for sharing your MQTT code. I'm a MQTT and CODESYS newbie so please forgive any silly questions. &lt;br/&gt;
I was able to write a little of my own code w/yours for the CODESYS Control Win V3 SoftPLC (rather than a raspberry pi). I could compile and download it, but I'm missing something. I don't see where my call to your "Publish" function actually does a TCP/IP send. I set a breakpoint in the _Send and never hit it, Wireshark shows no packets going out.  Where/how does the send get called? Thinking I might need a "connect" in here to before I do the Publish? Suggestions for this newbie?&lt;br/&gt;
Thank you!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MQTT Client (partly implemented)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc4a7d9152/?limit=25#134a" rel="alternate"/><published>2020-02-27T16:29:43.952000Z</published><updated>2020-02-27T16:29:43.952000Z</updated><author><name>kmpm</name><uri>https://forge.codesys.com/u/kmpm/</uri></author><id>https://forge.codesys.com8d8fcaba1f6ec19477c3e4da49b841939fba0246</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It's not dead but somewhat dormant.&lt;/p&gt;
&lt;p&gt;Sending strings is working but I would like to be able to configure mqtt subscriptions as well but I haven't found a good way of doing it yet.&lt;br/&gt;
I would love to figure out how to do callbacks in codesys but haven't succeeded so far.&lt;/p&gt;
&lt;p&gt;If you are willing to help out I would be more than happy.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MQTT Client (partly implemented)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc4a7d9152/?limit=25#f303" rel="alternate"/><published>2020-02-27T16:29:43.108000Z</published><updated>2020-02-27T16:29:43.108000Z</updated><author><name>davevleugel</name><uri>https://forge.codesys.com/u/davevleugel/</uri></author><id>https://forge.codesys.com6bd1450ca993078b3c00fc809f31eb67830b0ebd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Maby i revive this topic. But do you gonna make a update? Or is it working perfectly? &lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MQTT Client (partly implemented)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dc4a7d9152/?limit=25#e214" rel="alternate"/><published>2020-02-27T16:29:42.269000Z</published><updated>2020-02-27T16:29:42.269000Z</updated><author><name>kmpm</name><uri>https://forge.codesys.com/u/kmpm/</uri></author><id>https://forge.codesys.com7bb22a4a5deac8f1241bbe50f6ec218d8fb6b95e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I don't know if anyone is interested but I decided to release my MQTT code on GitHub.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://github.com/kmpm/OSC-MQTT" rel="nofollow"&gt;https://github.com/kmpm/OSC-MQTT&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It's probably usable for more than on Raspberry Pi. As far as I know it's CODESYS V3 compatible but I haven't tested it that much.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>