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


#1
  • 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?


#2

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:


#3

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

Cheers!


(Robin) #5

If you find your Iris sensor cannot be setup as required I would reccomend trying the Fibaro Motion Sensor instead.

It has a built in temp sensor and fully customisable parameters.

The Fibaro Contact sensor is designed to have the ability to add a tiny temp sensor inside the case, but I’ve never tried it and haven’t seen a device handler for the addition either.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #6

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?).


#7

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


[RELEASE] Enhanced Arrival Sensor - need to temporarily disable an arrival sensor? Now you can
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #8

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).


#9

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


#10

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.


#11

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.


#12

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.


#13

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.


#14

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 Publish --> For 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.


#15

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.


(Pc Poon) #16

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!