stefandreyer / CODESYS-MQTT

MQTT client library for CODESYS, supporting all QoS
MIT License
113 stars 26 forks source link

Publish works from Function Block but how do I subscribe? #35

Closed jshroyer031 closed 4 years ago

jshroyer031 commented 4 years ago

I was able to successfully publish to an MQTT broker using this function block in Codesys running on a raspberry pi but the function block did not have a subscribe option... can anyone help?

stefandreyer commented 4 years ago

Hi,

yes my docu is poor ;)

subscription are done with the subscription FB wich gets the subscription topic and a callback collector. If the client gets a packet for the subscription all receive methods collectet in the collector are called and the FBs can check if the topic fits to them.

Please look to https://github.com/stefandreyer/CODESYS-zigbee2mqtt too how this makes things easyer.

More questions? Feel free...

BR Stefan

jshroyer031 commented 4 years ago

Stefan,

Thank you for the response! Great job by the way figuring this all out. This is wonderful. I cannot open the link that you sent to me unfortunately. Not sure why.

Thanks,

Jordan

On Tue, Mar 10, 2020 at 4:08 PM stefandreyer notifications@github.com wrote:

Hi,

yes my docu is poor ;)

subscription are done with the subscription FB wich gets the subscription topic and a callback collector. If the client gets a packet for the subscription all receive methods collectet in the collector are called and the FBs can check if the topic fits to them.

Please look to https://github.com/stefandreyer/CODESYS-zigbee2mqtt http://url too how this makes things easyer.

More questions? Feel free...

BR Stefan

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stefandreyer/CODESYS-MQTT/issues/35?email_source=notifications&email_token=AOZITE5GUQMZZFLJCZKSJBDRG2M2PA5CNFSM4LFFPU52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOM6PNY#issuecomment-597288887, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOZITE5Q2S7RXWQPFCL3KOLRG2M2PANCNFSM4LFFPU5Q .

stefandreyer commented 4 years ago

hi

try this

https://github.com/stefandreyer/CODESYS-zigbee2mqtt