sensebox / mqtt-osem-integration

MQTT Client to connect devices on openSenseMap to a MQTT Broker
MIT License
1 stars 1 forks source link

Connection to HiveMQ or DIoTY works for only a few minutes #12

Open Wdestroier opened 2 years ago

Wdestroier commented 2 years ago

Hi! I have tried to connect from the testing environment ( https://testing.opensensemap.org/ ) to HiveMQ over MQTTS and after a minute or two published messages aren't saved anymore or the client disconnects. I ran the project locally and the connection isn't closed, all the messages sent to the broker are received, even after 15+ minutes running. The same behavior happens when trying to connect over MQTT to https://dioty.co/ from the prod environment ( https://opensensemap.org/ ). Changing the topic or connection options and saving the config makes the connection work for the next 1-2 minutes. The integration with MyQttHub works perfectly in the prod env, the client doesn't disconnect. Is this a testing environment specific issue?

mpfeil commented 2 years ago

Hi @Wdestroier,

thanks for your feedback. I am going to investigate it. The changes are not deployed to the prod environment. So I guess it is a testing specific issue.

mpfeil commented 2 years ago

Sorry for the late reply. I am back on this issue and tried a MQTTS connection to HiveMQ on the testing environment for several minutes without any connection issues.

dioty.co is not existing anymore right?

@Wdestroier maybe you can share your local project with me.

Wdestroier commented 2 years ago

Hi @mpfeil, I just tested and the messages aren't processed after 5 minutes... Steps to reproduce the problem:

  1. Access http://www.hivemq.com/demos/websocket-client/
  2. Fill the authentication form and login
  3. Access openSenseMap and configure the senseBox's MQTT integration Url: mqtts://user:pass@hostname.hivemq.cloud Topic: /devices/5 Message format: json Decoding options: empty/blank/none Connection options: { "clientId": "openSenseMap-1" }
  4. Set the HiveMQ client's topic and message Topic: /devices/5 QoS: 0 Message: { "sensorId": "value" }

I've already made the communication with AWS instead of HiveMQ, but this feature may be useful to others...