What would be the best way to implement a delay for an SNMP Get operation, when the device needs some time to process a WRITE-only SNMP Set parameter?
Example :
- a 'Load Presets' BUTTON. (write only SNMP action)
- the device needs some time to prepare the presets
In this particular case we cannot immediately retrieve the Presets, because the device needs some time to prepare them.
What is the best practice for delaying the SNMP Get operation after having executed the SNMP set action?
Hi Filiep,
In this case, it also depends on a couple of things:
- how long do you need to wait?
- what happens if you don't wait long enough?
- how "heavy" of an operation is retrieving this data?
Assuming it's not a very heavy operation, and you will receive "old" data or a timeout will occur, you could also poll this information each minute and not require any additional (and "complex") logic.
1.5s is a very small time to wait. In that case, I would avoid any complex logic and work with a sleep to wait for this short amount of time. This would be easy to implement, and wouldn’t cause a lot of impact as it is only executed when a manual write is executed.
* From test results, in this particular case 1.5 seconds is enough.
* If we don’t wait long enough, we get old information back, but this information is important for the user.
Otherwise I could just leave it as is, because this information is polled at least once per minute.
* The information does not constitute a heavy burden for the device, I believe (1 group with 10 parameters)