Premises

By default, the BrainFrame server connects to IP cameras directly. This necessitates that the the IP camera is either on the same network as the server, or is made accessible through other means, like port forwarding.

For situations where this is undesirable, a stream may optionally be configured to be part of a premises. BrainFrame will connect to these streams through the StreamGateway instead, which acts as a proxy to bypass firewalls. See the Premises section in the User Manual for details.

API Methods

BrainFrameAPI.get_premises(premises_id: int, timeout=30)brainframe.api.bf_codecs.premises_codecs.Premises

Gets the premises with the given ID.

Parameters
  • premises_id – The ID of the premises to get

  • timeout – The timeout to use for this request

Returns

The premises

BrainFrameAPI.get_all_premises(timeout=30) → List[brainframe.api.bf_codecs.premises_codecs.Premises]

Gets all premises.

BrainFrameAPI.set_premises(premises: brainframe.api.bf_codecs.premises_codecs.Premises, timeout=30)

Update or create a premises. If the Premises doesn’t exist, the premises.id must be None. An initialized Premises with an ID will be returned.

Premises are more often created using the StreamGateway client tool.

Parameters
  • premises – A Premises object

  • timeout – The timeout to use for this request

Returns

Premises, initialized with an ID

BrainFrameAPI.delete_premises(premises_id: int, timeout=30)

Delete a premises and the streams and data connected to it.

Parameters
  • premises_id – The ID of the premises to delete

  • timeout – The timeout to use for this request

Data Structures

class Premises(name: str, id: Optional[int] = None)

Information about a specific Premises

id: Optional[int] = None

The unique ID of the premises

name: str

The friendly name of the premises