jvconnected.device
¶
-
class
jvconnected.device.
Device
(*args, **kwargs)[source]¶ Bases:
pydispatch.dispatch.Dispatcher
A Connected Cam device
- Parameters
- Properties
-
-
parameter_groups
: dict → DictProperty(dict)¶ Container for
ParameterGroup
instances
-
- Events
-
property
devicepreview
→ JpegSource [read-only]¶ Instance of
jvconnected.devicepreview.JpegSource
to acquire real-time jpeg images
-
class
jvconnected.device.
ParameterGroup
(*args, **kwargs)[source]¶ Bases:
pydispatch.dispatch.Dispatcher
A logical group of device parameters
- Parameters
- Properties
- Attributes
_prop_attrs (list) – A list of tuples to map instance attributes to the values returned by the api data from
Device._request_cam_status()
_optional_api_keys (list) – A list of any api values that may not be available. If the parameter is missing during
parse_status_response()
, it will be allowed to fail if present in this list.
-
drill_down_api_dict
(api_key, data)[source]¶ Walk down nested dict values and return the final value
- Parameters
api_key – Either a sequence or a string. If the string is separated by periods (
.
) it will be split byiter_api_key()
data (dict) – The response data from
parse_status_response()
-
class
jvconnected.device.
MenuChoices
(value)[source]¶ Bases:
enum.Enum
Values used in
CameraParams.send_menu_button()
-
DISPLAY
= 1¶ DISPLAY
-
STATUS
= 2¶ STATUS
-
MENU
= 3¶ MENU
-
CANCEL
= 4¶ CANCEL
-
SET
= 5¶ SET
-
UP
= 6¶ UP
-
DOWN
= 7¶ DOWN
-
LEFT
= 8¶ LEFT
-
RIGHT
= 9¶ RIGHT
-
-
class
jvconnected.device.
CameraParams
(*args, **kwargs)[source]¶ Bases:
jvconnected.device.ParameterGroup
Basic camera parameters
- Properties
-
-
mode
: str → Property(str)¶ Camera record / media mode. One of
['Normal', 'Pre', 'Clip', 'Frame', 'Interval', 'Variable']
True
if the camera menu is open
-
Send a menu button event
- Parameters
value – The menu button type as a member of
MenuChoices
-
class
jvconnected.device.
BatteryState
(value)[source]¶ Bases:
enum.Enum
Values used for
BatteryParams.state
-
UNKNOWN
= 1¶ UNKNOWN
-
NO_BATTERY
= 2¶ NO_BATTERY
-
ON_BATTERY
= 3¶ ON_BATTERY
-
CHARGING
= 4¶ CHARGING
-
CHARGED
= 5¶ CHARGED
-
-
class
jvconnected.device.
BatteryParams
(*args, **kwargs)[source]¶ Bases:
jvconnected.device.ParameterGroup
Battery Info
- Properties
-
info_str
: str → Property(str)¶ Type of value given to
value_str
. One of['Time', 'Capacity', 'Voltage']
-
value_str
: str → Property(str)¶ One of remaining time (in minutes), capacity (percent) or voltage (x10) depending on the value of
info_str
-
state
: BatteryState → Property(BatteryState)¶ The current battery state as a member of
BatteryState
-
-
class
jvconnected.device.
ExposureParams
(*args, **kwargs)[source]¶ Bases:
jvconnected.device.ParameterGroup
Exposure parameters
- Properties
-
mode
: str → Property(str)¶ Exposure mode. One of
['Auto', 'Manual', 'IrisPriority', 'ShutterPriority']
-
gain_mode
: str → Property(str)¶ Gain mode. One of
['ManualL', 'ManualM', 'ManualH', 'AGC', 'AlcAELock', 'LoLux', 'Variable']
-
-
async
set_auto_iris
(state: bool)[source]¶ Set iris mode
- Parameters
state (bool) – If True, enable auto iris mode, otherwise set to manual
-
async
set_auto_gain
(state: bool)[source]¶ Set AGC mode
- Parameters
state (bool) – If True, enable auto gain mode, otherwise set to manual
-
async
set_iris_pos
(value: int)[source]¶ Set the iris position value
- Parameters
value (int) – The iris value from 0 (closed) to 255 (open)
-
async
adjust_iris
(direction: bool)[source]¶ Increment (open) or decrement (close) iris
- Parameters
direction (bool) – If True, increment, otherwise decrement
-
async
adjust_gain
(direction: bool)[source]¶ Increment or decrement gain
- Parameters
direction (bool) – If True, increment, otherwise decrement
-
class
jvconnected.device.
PaintParams
(*args, **kwargs)[source]¶ Bases:
jvconnected.device.ParameterGroup
Paint parameters
- Properties
-
async
set_white_balance_mode
(mode: str)[source]¶ Set white balance mode
- Parameters
mode (str) – The mode to set. Possible values are
['Faw', 'Preset', 'A', 'B', 'Adjust', 'WhPaintRP', 'WhPaintRM', 'WhPaintBP', 'WhPaintBM', 'Awb', '3200K', '5600K', 'Manual']
-
async
set_red_pos
(red: int)[source]¶ Set red value
- Parameters
red (int) – Red value in range -31 to +31
-
async
set_blue_pos
(blue: int)[source]¶ Set blue value
- Parameters
blue (int) – Blue value in range -31 to +31
-
class
jvconnected.device.
TallyParams
(*args, **kwargs)[source]¶ Bases:
jvconnected.device.ParameterGroup
Tally light parameters
- Properties
-
async
set_program
(state: bool = True)[source]¶ Enable or Disable Program tally
- Parameters
state (bool, optional) – If False, turns off the tally light
-
async
set_preview
(state: bool = True)[source]¶ Enable or Disable Preview tally
- Parameters
state (bool, optional) – If False, turns off the tally light