Hi, I am a total newbie trying to get the historical temperature from a DS9490r 1-wire device. I've been fooling around with getAtTime('0:20:00') but no matter how I do it, I always arrive at errors with regard to nil values. I guess it's both a matter of syntax and variable scope. Some relevant sample code would be highly appreciated!

it will return nill. So vedpanna_20 is nill and when you try to do vedpanna_20.temperature Lua will tell you: "attempt to index global 'vedpanna_20' (a nil value)".
So, you will have to check if domoticz.data.vedpanna is empty (or .getAtTime() returns nil)) before you start doing something with it. In other words: fill it first before taking something out:

Note that I put the temperature in the history and not the entire device. That's way too much data to put in there. Just put in there what you need.
Also, note that getAtTime() only becomes relevant if there is enough data collected. So the first 20 minutes of logging will not give you the temperature at 20 minutes ago.

Thanks!
What I didn't grasp was that I would have to log the data myself, it makes no sense that you can't access the historical data in the Domoticz database.
However, your suggested script has been running for way over 20 minutes now and all I get is currentTemp and "attempt to concatenate local 'tempMinus20' (a nil value)".

Thanks!
What I didn't grasp was that I would have to log the data myself, it makes no sense that you can't access the historical data in the Domoticz database.
However, your suggested script has been running for way over 20 minutes now and all I get is currentTemp and "attempt to concatenate local 'tempMinus20' (a nil value)".