mc-Things

mc-Products => mc-Gateway => Topic started by: kbrooking on January 30, 2018, 09:56:33 pm

Title: Sensors Stop Sending MQTT Messages and have to reboot mcGW to start sending again.
Post by: kbrooking on January 30, 2018, 09:56:33 pm
I notice a couple times a day my sensors stop sending MQTT messages and I have to reboot the mcGW to get them to start reporting again. Has anyone else seen this issue?
Title: Re: Sensors Stop Sending MQTT Messages and have to reboot mcGW to start sending again.
Post by: mc-T2 on January 31, 2018, 10:04:09 am
Can you confirm what version of mcOS(firmware) your gateway is at and your devices please?
Title: Re: Sensors Stop Sending MQTT Messages and have to reboot mcGW to start sending again.
Post by: NorGer on February 02, 2018, 09:27:58 am
Hi,

I have the same issue.

Configuration:
- mcGateway110
                  * GwVersion: 0.9-958
                  * LpLanVersion: 09-615
- mcModule120 firmware: v0.9.615
- mosquitto: local server
- mcGateway connection to local network: wifi

Problem description:
Temperature application project (using MQTT class with method Lplan.Publish) from the GitHUB was running on the mcModule120. This program generates bacons in very short cycles for different topics (as .../Temerature, .../BatteryVoltage). I can receive a "lifecycle" bacon in the topic home/mcThings too and the greenLED blinks on the module if a bacon was sent to the MQTT server. I used a private MQTT sever with windows application-, mobile- and mcModule120 clients. After some hours the application- and mobile-client were still able to publish and receive messages, but I lost all bacons from the mcModule. The modul was alive, because the greenLED was still blinking and I could measure the required power voltage level (about 3V on the battery). So, I thought that the only problem could be at the mcGateway side. I restarted the gateway and after some secounds the bacons from the mcModule ware received in the topics again.

Any idea or solution to handle this issue?
Title: Re: Sensors Stop Sending MQTT Messages and have to reboot mcGW to start sending again.
Post by: kbrooking on February 04, 2018, 07:19:17 pm
My configuration is:

- mcGateway110
                  * GwVersion: 0.6-367
                  * LpLanVersion: 08-420
- mosquitto: local server
- mcGateway connection to local network: wifi
Title: Re: Sensors Stop Sending MQTT Messages and have to reboot mcGW to start sending again.
Post by: kbrooking on February 04, 2018, 09:23:36 pm
This platform is very frustrating.

I upgraded to GW Version 0.9-958 and LP Lan Version 0.0.615. Now mcStudio can only see the GW when the ethernet cable is connected. The GW does not show up when in wi-fi mode.

Wi-fi settings are the same in GW config as before the upgrade.
Title: Re: Sensors Stop Sending MQTT Messages and have to reboot mcGW to start sending again.
Post by: kbrooking on February 06, 2018, 09:50:34 am
Here are some recent updates…

As I mention above, after upgrading the mcGW to the new Host & application firmware I lost wi-fi connectivity on the mcGW and was forced to use the Ethernet cable. Since then all the sensors have been reporting at their expected intervals without any lockups.
Maybe NorGer can confirm this if he can disconnect the wi-fi connection and  use Ethernet connection instead and see if issue is resolved as well?

A few more details that maybe worth mentioning. In the past I would get up the morning after leaving the sensors on all night and 100% of the time there would be at least two sensors that stopped reporting over MQTT. However, the beacons seemed to keep reporting. Because only two of the four sensors would stop reporting, I suspected maybe a bug in my script code so I would open mcStudio, connect to the mcGW, connect to the module and run the debugger only to find the code working properly. I would then also begin to see the MQTT messages to start reporting again.

Maybe there is some issue with wi-fi connection and MQTT locking up and when I connect to the gateway via mcStudio; somehow that clears it up. Just thinking out loud. Any suggestions?