Author Topic: Poll list full log line  (Read 359 times)

Offline Selkirk

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
Poll list full log line
« on: February 19, 2018, 03:25:03 am »
What does this log line represent?

Code: [Select]
Device_Basic::AddPoll 13 poll list full, deleting old one

Offline HSD99

  • Full Member
  • ***
  • Posts: 227
  • Karma: +6/-0
Re: Poll list full log line
« Reply #1 on: February 19, 2018, 06:00:16 pm »
Nothing bad. It means that it has filled up the current poll list, and will start a new one and delete the old one. Normal behavior.

Offline Selkirk

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: Poll list full log line
« Reply #2 on: February 21, 2018, 12:42:14 am »
What is a poll list?

Offline rigpapa

  • Sr. Member
  • ****
  • Posts: 462
  • Karma: +65/-0
Re: Poll list full log line
« Reply #3 on: February 21, 2018, 07:50:12 am »
Nothing bad. It means that it has filled up the current poll list, and will start a new one and delete the old one. Normal behavior.

I think this points to another flaw in Vera's Luup/MiOS implementation that they should address. I obviously can't see their code and what they are actually attempting to do with polling, but I can report on what I observe, and my conclusions are drawn (perhaps incorrectly) from that.

I have a largish network of about 110 Z-Wave nodes supported by a Plus. A fair number of my devices are sensors, battery-operated specifically (Aeotec Multis, etc.), and I have, unfortunately, a bunch of switches that aren't instant-status and I've been too cheap and lazy to replace them (except as they fail). I've turned polling off for any node that doesn't need it, but the number of polled devices is still large. Most are configured for polling not more than every 900 seconds (15 minutes), but will only be polled a couple of times each day (technically, meeting the objective, but really?). There does not seem to be a rhyme or reason to which nodes get polled, let alone when. My guest bathroom light switch is a favorite example, where I've observed four consecutive polls with gaps between of 4, nearly 2, and 7 hours between.

From this log message and Vera's behavior, I gather that Vera's poll list is fixed size, and when a device gets added to make the list grow beyond its limit, other devices are thrown off the list. The result, unfortunately, is a random distribution of polling among the devices, rather than an orderly, if delayed, result. I haven't yet taken the time to experiment to try to determine what this fixed size is.

The idea that the poll list can "fill up" is ridiculous to me as a software engineer. Why? Even if there were 500 devices, such a list would have a very small in-memory footprint. There is no reason I can think of for a fixed size data structure. IMO, the poll list should be a rotating queue of devices, sorted in order of delta to next poll scheduled--the further a node is past its expected poll time, the closer it comes to the head of the list (priority increases). When the network quietness parameters are met, pick the device off the head and poll it. Lather, rinse, repeat. This won't solve every polling problem in large, busy networks, but at least it will give a more deterministic result that careful configuration can reasonably affect, rather than simply throwing out the work any time it gets too busy.

Polling in current firmware simply doesn't work in a large network. The definition of "large" is, at the moment, unknown, but I know it's at least 100 nodes.
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline Selkirk

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: Poll list full log line
« Reply #4 on: February 21, 2018, 12:19:35 pm »
I presume the 13 on the log line is a device number?  Is the poll list global and 13 is the device that triggered it to fill?
Or is the poll list specific to device 13?  Does it represent past polling or future polling?  Does it have a fixed size?

@rigpapa It could be a ring buffer and the log line represents a "wrap around," in which case it would be no big deal.  Do you see these messages?

With such limited space to store logs, one would think there's a reason to write the message out.