Recent

Author Topic: MQTT  (Read 12340 times)

picstart

  • Full Member
  • ***
  • Posts: 236
MQTT
« on: September 24, 2015, 11:19:03 pm »
MQTT is a communications protocol often used for IoT.
Has anyone got MQTT client modules for Lazarus?
 There is Delphi code available ..has anyone ported it to the lazarus IDE?

derek.john.evans

  • Guest
Re: MQTT
« Reply #1 on: September 25, 2015, 01:43:14 am »
I guess you are talking about this?
http://jamiei.com/blog/code/mqtt-client-library-for-delphi/

It uses Synapse (unit blcksock) which works with FreePascal. I looked at the code, and I cant see any issues.

I guess, try it and find out. You may need to place {$MODE DELPHI} at the top of the 2 files.


picstart

  • Full Member
  • ***
  • Posts: 236
Re: MQTT
« Reply #2 on: September 25, 2015, 05:32:52 pm »
Yes I brought the MQTT.pas and the MQTTReadThread.pas units and the needed synapse units. It compiles under  the Lazarus IDE with the addition of {$MODE DELPHI} to the two units. It mostly works but errors on a call to  MQTTClient.Free;
I was hoping with the increasing interest in IoT a perfected MQTT feature may have been available for Lazarus. Maybe I'm the first to consider Lazarus as useful for IoT
Thanks for the help.

Dimitrios Chr. Ioannidis

  • Jr. Member
  • **
  • Posts: 83
    • Nephelae
Re: MQTT
« Reply #3 on: January 15, 2016, 12:30:11 pm »
Yes I brought the MQTT.pas and the MQTTReadThread.pas units and the needed synapse units. It compiles under  the Lazarus IDE with the addition of {$MODE DELPHI} to the two units. It mostly works but errors on a call to  MQTTClient.Free;
I was hoping with the increasing interest in IoT a perfected MQTT feature may have been available for Lazarus. Maybe I'm the first to consider Lazarus as useful for IoT
Thanks for the help.

I succesfully used that code but for me the lack of QoS 1 and 2 is a showstopper.

Plz try this code from here https://github.com/pjde/delphi-mqtt.

Regards,
Dimitrios Chr. Ioannidis
http://www.nephelae.eu

jdp

  • Jr. Member
  • **
  • Posts: 90
Re: MQTT
« Reply #4 on: April 16, 2016, 07:58:02 pm »
Hi all. I need to have mqtt in Lazarus ob Raspberry Pi.
I managed to get a app working but it will crash at random when calling the ping or when receiving a payload. It works well on Windows but crashes on the Raspberry Pi.

Can sombody please help me as I need a GUI app on Raspberry Pi.
I can share the little app if it will help to try and fix the problem.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1171
Re: MQTT
« Reply #5 on: April 17, 2016, 08:19:26 am »
I could try ... I have a bunch of RPi, RPi2 and RPi3.

jdp

  • Jr. Member
  • **
  • Posts: 90
Re: MQTT
« Reply #6 on: April 17, 2016, 11:59:00 pm »
Hi. That would be great. I am willing to pay a consulting fee to get it working stable. Where do I send the code? I have a Mosquitto server running on one of the Pi's that you can connect to.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1171
Re: MQTT
« Reply #7 on: April 18, 2016, 07:18:35 am »
Just PM me through this forum.
And an eventual fee may be donated to FPC/Lazarus community !