From SmartThings smartsense motion sensor default DTH.
zigbee.temperatureConfig(30, 300)
This line in the configure method means a minimum of 30 seconds, maximum 300 seconds. So if the temperature changes a degree it will report it at least every 30 seconds. If it doesn’t change it will report it at 5 minutes.
So the device itself will send responses at those intervals but SmartThings then chooses to update its temperature event when isStateChange=true (that is the event SmartApps use). So this usually only happens when the temperature actually changes a degree.
If you are not getting responses in those timeframes in the live IDE logs, I’d look at readding the motion sensor and/or replacing the battery.
A DTH is a device handler. You are writing a SmartApp so zigbee.temperatureConfig(30, 300) will not work. You are subscribing to the correct event in your SmartApp so I’m not exactly sure what you are asking. The event will “fire” when isStateChange=true occurs in the device’s DTH (pretty much only when the temperature changes).
If you want to read the current temperature of the device you would do something like device.temperature. If you want to read it at specific times you would need to use scheduling.