- if string.find(str,"Sensor T: Temp C:") then
- last_temp = tonumber(string.sub(str,18))
- os.execute(string.format("rrdtool update /home/sensordata.rrd -t temp N:%f", last_temp))
- print(string.format("t: %f Grad Celsius",last_temp))
- end
- if string.find(str,"Sensor P: Photo:") then
- last_light = tonumber(string.sub(str,17))
- os.execute(string.format("rrdtool update /home/sensordata.rrd -t light N:%d", last_light))
- print(string.format("p: %d",last_light))
+ if string.find(str,"temp0: Temp C:") then
+ last_temp = tonumber(string.sub(str,15))
+ os.execute(string.format("rrdtool update /home/sensortemp.rrd -t temp N:%f", last_temp))
+ --print(string.format("t: %f Grad Celsius",last_temp))