What is pollDevice()?

While I was tweaking a CT100 thermostat device handler, I noticed a few errors in the logs about pollDevice not being defined. What is pollDevice? What is it supposed to do, and how should it be defined in a device handler?

Thanks!

‘pollDevice()’ sounds like a custom function to me. A device that implements the Polling Capability would need to implement the poll() command by default. I have never heard of pollDevice(). If you share a link to the code, we might be able to help debug the issue.

I surely don't have (or call) a pollDevice function in my code; and, yes, I understand the role of poll().
I will reproduce it and share code and log details, so that you can see what I'm seeing.

The error is:
dev:494 2018-07-31 22:09:01.171:error groovy.lang.MissingMethodException: No signature of method: dev15330890546272068018423.pollDevice() is applicable for argument types: () values: [] Possible solutions: collect() (pollDevice)

The device handler code is here, and you'll notice there is no mention of a pollDevice function - neither called or declared...

A few minor things that I noticed...

You should add

Capability “Refresh”

Since the driver implements the Capability.

Also, you should remove

command "poll"
command "refresh"

Since both of these are intrinsically declared by including the respective Capability declarations.

I don’t think this will necessarily correct the issue, but it will help to standardize the code.

Thanks, both good points.

I'm not particularly bothered by that error that pops up now and then; but I was curious about why that's happening - and what I'm expected to do to avoid that.

If pollDevice() is a function used within the Hubitat API, @chuck.schwer would probably be able to help.

This is not a Hubitat method, some app using this device is attempting to execute this.

1 Like

How can that be if the error is logged on the device? If an app tries to invoke a random method on a device, wouldn't that error pop up on the app's log?

Two additional data points:

  • It happens regularly every three hours for all thermostat devices (not at exactly the same time)
  • I haven't seen it when using the built-in generic z-wave device handler