Code Monkey home page Code Monkey logo

mqttclient's People

Contributors

ako avatar simo101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mqttclient's Issues

Error connecting to test.mosquitto.org

I'm attempting to use the Mendix Appstore version in Mendix app using version 7.21.0 of the modeler. My config is:
Broker host: test.mosquitto.org
Broker port: 1883
Broker org: empty
Timeout 120
Username: empty
Password: empty
Topic: One Climate Device/Climate w Light
Microflow: a microflow in the project
the rest of the parameters are empty.

When I try to connect I get this error in the console:

--------

org.eclipse.paho.client.mqttv3.MqttException: Connection lost
	at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:164)
	at java.lang.Thread.run(Thread.java:748)

Caused by: java.io.EOFException: null
	at java.io.DataInputStream.readByte(DataInputStream.java:267)
	at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:92)
	at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:116)
	at java.lang.Thread.run(Thread.java:748)

It seems a simple enough thing to configure but I must be missing something. Any help would be greatly appreciated.

Ross

Subscribing to two topics with different Microflows

Hi Andrej,

I have been using this module with one topic quite successfully. I included it into my after startup and successfully subscribed to my mosquitto topic.

However now i want to subscribe Mendix to the second topic with a different microflow. When i do this it seems that the first topic will execute my second microflow, which is meant for the second topic.

Is the idea that you have one microflow for every subscribed topic? Hence why you have an input parameter in the microflow called topic? Do i have to use the topic to decide what to do with the input?

Or is this a bug and i should be able to add different microflows to each microflow.

Regards
Simon

Update Appstore version

Currently the version on the appstore is out of date with the mainline of this project. I could update it if i had access to publish a new release here, but i don't have the rights.

If you give me access rights on the repo i can do it for you otherwise i'm happy if you want to update it.

Regards
Simon

Issue with connection lost

Hi Andrej,

I think there is currently an issue with the MQTT client. In my example if the connection is lost for a bit then the application fails to connect and doesn't continue to query the MQTT.

I believe the issue is here:

https://github.com/ako/MqttClient/blob/master/javasource/mqttclient/impl/MxMqttCallback.java#L27

I think this is because it is missing the connections options in the client.connect().

What it looks like you are trying to do is if the connection is lost it will try to connect again. But I think the connector then fails to connection. See error log:

Sep 3 17:49:59.023 127.0.0.1 tr10000: INFO - MqttHandler: connectionLost: Connection lost, MxClient_a3a331ac-b51e-4314-ba2a-c0d55b2c8ea1_appnode-leech_82.34.251.190_1883 Sep 3 17:49:59.026 127.0.0.1 tr10000: WARNING - MqttHandler: (1/9) org.eclipse.paho.client.mqttv3.MqttException: Connection lost Sep 3 17:49:59.026 127.0.0.1 tr10000: WARNING - MqttHandler: (2/9) at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:146) Sep 3 17:49:59.026 127.0.0.1 tr10000: WARNING - MqttHandler: (3/9) at java.lang.Thread.run(Thread.java:745) Sep 3 17:49:59.026 127.0.0.1 tr10000: WARNING - MqttHandler: (4/9) Sep 3 17:49:59.026 127.0.0.1 tr10000: WARNING - MqttHandler: (5/9) Caused by: java.io.EOFException: null Sep 3 17:49:59.026 127.0.0.1 tr10000: WARNING - MqttHandler: (6/9) at java.io.DataInputStream.readByte(DataInputStream.java:267) Sep 3 17:49:59.026 127.0.0.1 tr10000: WARNING - MqttHandler: (7/9) at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:65) Sep 3 17:49:59.026 127.0.0.1 tr10000: WARNING - MqttHandler: (8/9) at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:107) Sep 3 17:49:59.026 127.0.0.1 tr10000: WARNING - MqttHandler: (9/9) at java.lang.Thread.run(Thread.java:745) Sep 3 17:49:59.223 127.0.0.1 tr10000: ERROR - MqttHandler: (1/5) org.eclipse.paho.client.mqttv3.MqttSecurityException: Not authorized to connect Sep 3 17:49:59.223 127.0.0.1 tr10000: ERROR - MqttHandler: (2/5) at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:28) Sep 3 17:49:59.223 127.0.0.1 tr10000: ERROR - MqttHandler: (3/5) at org.eclipse.paho.client.mqttv3.internal.ClientState.notifyReceivedAck(ClientState.java:885) Sep 3 17:49:59.223 127.0.0.1 tr10000: ERROR - MqttHandler: (4/5) at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:118) Sep 3 17:49:59.223 127.0.0.1 tr10000: ERROR - MqttHandler: (5/5) at java.lang.Thread.run(Thread.java:745)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.