This page last changed on Feb 22, 2011 by nivis.

I've implemented a few sensors where I would like to extend the polling interval. Where can I do that? ( If possible. )

I'm adding a new support class that lets you do that through an API.

In the meanwhile you can do it yourself by simply skipping the read() requests on your protocol from the controller (by returning previous known value until some timeout, instead of polling the sensor).

  private String lastKnownState = null;

  @Override public String read(EnumSensorType sensorType, Map<String, String> sensorProperties)
  {
    if (!shouldPollDevice())
      return lastKnownState;

    doRead();
  }
Posted by juha at Feb 22, 2011 07:58
Document generated by Confluence on Jun 05, 2016 09:31