docs: def update(self):
          """Reads all devices from the database.  Creates new filterchains and removes old ones
          
          TODO: currently this is broken: if user changes any other field than the ip address, the cameras don't get updated
          """
          raise(AssertionError("out of date"))
          
          new_ids = []
          old_ids = []
          
          # collect old ip addresses
          for chain in self.chains:
              if (self.verbose): print(self.pre, "old :", chain, chain.get__id(), chain.get_address(), chain._id)
              old_ids.append(chain.get__id())
              
          # collect devices
          devices = []
          for dic in self.datamodel.camera_collection.get():
              if (self.verbose): print(self.pre, "update : dic", dic)
              if (dic["classname"] == DataModel.RTSPCameraRow.__name__):
                  devices.append(dic)
              
          devices_by_id={}
          for dic in devices: # DataModel.RTSPCameraRow instances
              _id = dic["_id"]
              new_ids.append(_id)
              devices_by_id[_id] = dic
          
          if (self.verbose):
              print(self.pre, "update : new_ids =", new_ids)
              print(self.pre, "update : old_ids =", old_ids)
          
          add_list = list(set(new_ids).difference(set(old_ids))) # cams to be added
          rem_list = list(set(old_ids).difference(set(new_ids))) # cams to be removed
          
          if (self.verbose):
              print(self.pre, "update : add_list =", add_list)
              print(self.pre, "update : rem_list =", rem_list)
          
          # purge removed chains
          for i, chain in enumerate(self.chains):
              if (chain.get__id() in rem_list):
                  chain_ = self.chains.pop(i)
                  if (self.verbose): print(self.pre, "closing chain", chain_)
                  chain_.close()
          
          # add new chains
          for new_address in add_list:
              dic = devices_by_id[new_address]
              chain = ManagedFilterchain( # decoding and branching the stream happens here
                  livethread  = self.livethread,
                  openglthreads
                              = self.gpu_handler.openglthreads,
                  address     = DataModel.RTSPCameraRow.getMainAddressFromDict(dic),
                  slot        = dic["slot"],
                  _id         = dic["_id"],
                  # affinity    = a,
                  msreconnect = 10000,
                  verbose = True
              )
              if (self.verbose): print(self.pre, "adding chain", chain)
              self.chains.append(chain)