self.config_parser.add_section('json')
self.config_parser.set('json','write_path',"/dev/shm/wget/r3sensors.json")
self.config_parser.set('json','moveto_path',"/dev/shm/www/r3sensors.json")
- self.config_parser.set('json','backup_path',"/home/guests/realraum.wirdorange.org/public_html/r3sensors.json.bak")
+ self.config_parser.set('json','backup_path',"/home/guests/realraum.wirdorange.org/r3sensors.json.bak")
self.config_parser.set('json','backup_every',"50")
self.config_parser.set('json','limit_list_len',"10000")
self.config_parser.set('json','updateinterval',"30")
sensor_store_[structname].insert(0,[time_column_name_] + list(map(lambda n: "Sensor %d"%n,range(0,sensor_cols_num_[structname]))))
# add values
+ try:
+ # if latest values are identical, just update timestamp
+ if sensor_store_[structname][-1][1:] == latest_values_[structname] and sensor_store_[structname][-1][1:] == sensor_store_[structname][-2][1:]:
+ sensor_store_[structname].pop()
+ except:
+ pass
sensor_store_[structname].append([ts] + latest_values_[structname])
#cap list lenght