Author Topic: Sensors Stop Sending MQTT Messages and have to reboot mcGW to start sending again.  (Read 135 times)

kbrooking

  • Full Member
  • ***
  • Posts: 104
    • View Profile
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?

Social Buttons


mc-T2

  • Administrator
  • Full Member
  • *****
  • Posts: 240
  • mc-Things! The opportunities are endless!
  • Location: Canada
    • View Profile
Can you confirm what version of mcOS(firmware) your gateway is at and your devices please?
Need more mc-Modules, mc-Gateways or other mc-Things? Check out our product page: www.mcthings.com/products. mc-Development kits are available too!
Check out a live Dashboard using mcThings and Losant! Click here: https://goo.gl/ST43hB

NorGer

  • Newbie
  • *
  • Posts: 4
    • View Profile
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?

kbrooking

  • Full Member
  • ***
  • Posts: 104
    • View Profile
My configuration is:

- mcGateway110
                  * GwVersion: 0.6-367
                  * LpLanVersion: 08-420
- mosquitto: local server
- mcGateway connection to local network: wifi

kbrooking

  • Full Member
  • ***
  • Posts: 104
    • View Profile
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.

kbrooking

  • Full Member
  • ***
  • Posts: 104
    • View Profile
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?

strikeaxe

  • Newbie
  • *
  • Posts: 1
    • View Profile
I struggled with my mcGateway110 in mcStudio using wifi most of the day. I can use Ethernet to see/connect the gateway. I can see the mcGateway110 on my wireless router. Here are the steps that I used and so far has corrected not being able to connect to wifi.  It is as noted not reliable as wifi seems to drop out when using mcStudio.

1) Power off the mcGateway110
2) Move selector switch to wifi
3) Power on the mcGateway110
4) Run a ping test to the mcGateway110 (100% Success)
5) Launch mcStudio Tools > Devices and the mcGateway110.
6) Attempt to connect to the gateway after >20 seconds the gateway disappears from the list.
7) Run ping on the mcGateway110 (100% Success)
8) Close and launch mcStudio "wifi' gateway still does not show up.
9) Move the selector switch to "Ethernet". (Do not power cycle mcGateway110)
10)Close and restart mcStudio and I can connect "Ethernet" to the mcGateway110
11)Move the selector switch to "wifi". (Do not power cycle the mcGateway110)
12)Launch mcStudio Tools > Devices and the mcGateway110
13)Connection using mcStudio on "wifi" successful

Note you must close and re-open mcStudio between selector switch moves. Failing to do so produces and error "see attached log file" I am curious if the mcStudio program checks for the selector switch location before loading either wifi or ethernet settings.



mcStudio v0.9.534.0
mcGateway110
  GwVersion 0.9-958
  LpLanVersion 0.9-615
VM Firmware Version 0x0.9r615
Bootloader Version 1v1.0r0