Is it possible to set reporting interval for the Iris Contact Sensor? Or generically?

  • Implementation: Iris contact sensor as a mailbox sensor

  • Problem: Frequently reports temperature changes due to being outdoors

  • Known Issues:

    • Outdoor Implementation of an “indoor” sensor
    • Battery issues due to operating outside of optimal temperature range
    • Edge of network implementation, which may cause connectivity issues, impact performance and reduce battery life

Okay, so given all of the above, I would like to know if there is a way to set reporting intervals on generic “smart” sensors, and more specifically, the Iris v2 contact sensor. I would specifically like to reduce the temperature reporting rate, since it has been occurring up to once a minute during times of rapid temperature fluctuations.

Any ideas?

There’s no generic way to do this from the UI, it’s set by each individual device’s firmware. It’s modifiable on some devices, usually as a way of saving battery life when you don’t need reports as often. But you just have to check device by device to see what parameters are available in the device type handler to be configured.

Also, specifically with regard to temperature reporting, you want to see if the device has not just a frequency check, but a delta check.

That is, these devices typically wake up at a set interval and then look to see if there has been a change from their last value, and if so how big that change was. That’s the Delta.

On some devices you can configure not just the wake up interval but the Delta that it will check against. This, again, can preserve battery life because the transmission doesn’t have to be set if the new value is within the Delta.

But, again, you just have to look device by device to see what parameters can be configured.

edited to update I see @tgauchat has given you custom code to modify the settings. :sunglasses:

Thanks @JDRoberts. That’s what I figured. Thought I’d reach out to the community to make sure.


1 Like

I have limited experience in this and no time at the moment to dig into the existing DTH…

But the ZigBee HA clusters for sensor reporting interval are actually standardized and documented in the ZigBee specifications.

So… In theory, those options can be set through config clusters (and might be in the existing DTH?).

So, newb question: Is it possible for us to grab the ST approved/standardized/integrated DTHs? If so, point me to it.

In this case, yes! (Some DTHs are not open source).

I’ve even highlighted what I believe the relevant section is. For more assistance, you’ll need the ZigBee HA specifications doc (Google it!), … that’s an adventure.

Or PM me for consulting ;-).

EDIT: SmartThings is making ZigBee HA easier by providing custom methods (e.g., zigbee.temperatureConfig(). I don’t think these are documented (yet).


Thanks! Already digging into spec on Will ping you when I hit a wall. :wink:

1 Like

Thanks for the DTH! It did the trick. I customized it for my use case earlier tonight before heading out to a party. Only had 6 temperature reports over the course of 6 hours, versus an average of 6-8 per hour before the fix.


Hi, i am new to this forum, can anyone list the exact step how I can use the code mentioned above to set the reporting interval? I have the IDE ready.

Change the seconds in the following line to the minimum report time (minimum time between reports) and maximum report time (maximum time allowed between reports):

return refresh() + zigbee.batteryConfig() + zigbee.temperatureConfig(30, 300) //30 secs minimum…5 mins (300 secs) maximum

Also, you will want to make sure your settings don’t conflict with the check interval (forced report as far as I can tell) time on line 265:

sendEvent(name: “checkInterval”, value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: “zigbee”, hubHardwareId: device.hub.hardwareID])

I believe I also had to change the time on line 122, but I can’t remember right now.

1 Like

wow, thanks for such a quick reply. But I dont know how to apply the code. I played IDE a little bit, but still not sure where and how exactly run the above code? Is there a command shell that allows me to do it? i found only one place I can directly place the code which is the “smartapp” section, so i copied the whole code of smartsensesensor.groovy into it with some changes like the name and the interval. actually, i tried to add a preference for the interval, so that I can change it from smartthings app, but when i publish, it gave me all sorts of error like compilation error.

Ahhh. Sorry. So you need to go to the IDE and make sure you’ve selected your correct Location. Assuming you only have one ST Hub, you would then:

  • Click My Device Handlers
  • Click Create New Device Handler
  • Click From Code
  • Copy the Groovy code from the above github link and paste it into the From Code input box.
  • Click Create
  • Make any edits you need to make now. Then click Save.
  • Click PublishFor Me
  • You can now go to My Devices and find the appropriate device. Click the device and click Edit.
  • Click the Type dropdown and scroll to the bottom and select the custom Smartsense Open/Closed Sensor device type.
  • Click Update

And you’re done.

Oh, also, once that’s done, you may need to go back to My Device Handlers, select the handler and click Simulator, set your location and install the device into the simulator. Then click configure. This should change the check interval to the new settings that you changed in the code.

This can then be verified by going back to My Devices, choosing the device and looking for the checkInterval value in the Current States section. It should show the value you entered in the code in total seconds.

1 Like

Hi everyone, new user to SmartThings, so please forgive me for the basic question. I just picked up some contact sensors and wanted to configure it so it only reports open/close activities (or make it so temperature readings aren’t sent for a very long time). I read through the thread but didn’t understand what updates to make on the DTH to achieve this. I know it has to do with the line below but I am not sure what to put in place of the 30 or 300.

return refresh() + zigbee.batteryConfig() + zigbee.temperatureConfig(30, 300) //30 secs minimum…5 mins (300 secs) maximum

@MEarly Would it be possible for you to share your updated DTH so i can see the changes you made? Reporting temperature every hour instead of every 15 minutes would be great.

Thanks in advance!

I have not been able to make one totally stop but you could try replacing 30,300 with something like 3600, 7200 which would move you from 30sec/5min reporting to 60min, 120min reporting. I cannot find the spec to determine how far you can push these reporting periods. 3600,7200 works fine on a Smarthings Multi-Sensor. You may also try to change the minimum delta change before report. it is probably set at 0x01 which I believe is 0.1 deg so you could try 0x32 which should be 5 deg or 50. At the end of the day it will always report at your long setting though so you just want a big enough delta to not trigger between the reporting min/max. Huge pain in the rear. I hate that temp is in most things, makes the logs impossible to use, too much crap in them. Battery level too floods the logs.