Author Topic: Module (110) stops publishing  (Read 241 times)

Nick_W

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Module (110) stops publishing
« on: October 20, 2016, 11:12:42 pm »
I keep running into a problem where a module that has been publishing fine suddenly stops publishing. Beacons continue, and my program is still running, but nothing is published anymore.

Power cycle, and off we go again. This happens usually after a few minutes, and seems to be related to how frequently I publish. The more often you publish, the faster this happens.

If you publish once per second, publishing quickly stops. Once every 10 seconds, and it can be minutes, or indeed work for ever (or until the module spontaneously reboots).

Is there a fix for this? It's really messing about with my programming.

Thanks.

Share on Facebook Share on Twitter


Nick_W

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: Module (110) stops publishing
« Reply #1 on: October 22, 2016, 07:48:37 pm »
I have some more information,

It seems that there is some sort of internal queue, either on the gateway, or in the module.

If you rapidly try to publish more than about 4 items, the module will stop publishing, until rebooted. This points to the queue being on the module.

I have the reedswitch interrupt set up to publish open or closed, when the reedswitch changes (part of a door sensor). If you rapidly open and close the reedswitch (with a magnet), the module stops publishing altogether after about 4 times. This is 100% repeatable. I am currently trying workarounds, as our front door opens and closes very rapidly, sometimes multiple times.

I have a debounce delay of 500000 (1/2 second) in the interrupt routine, but it doesnt help.

I'm now Implementing my own queuing mechanism (technically a derandomizer). Beacons still work when publishing doesn't.

Regarding beacons, I did find that the module does not like a beacon data change and send (don't even know if send works) in the boot event. If you do this, beacons stop sending. So I've been flipping between punishing and beacons not working, until I finally figured it out.

Are there any technical details as to how many messages can be queued at once, and how often you can publish? I'm just guessing at parameters here, and I'd like to publish as close to real time as possible, but without breaking the publish mechanism.

Most of my messages publish on a timed schedule, but the door sensor is real time, and that's the issue.

Thanks.