jvconnected.device
- class jvconnected.device.Device(*args, **kwargs)[source]
Bases:
Dispatcher
A Connected Cam device
- Parameters
- Property model_name: str | None = None
Model name of the device
model_name
is apydispatch.Property
object.
- Property serial_number: str | None = None
The device serial number
serial_number
is apydispatch.Property
object.
- Property resolution: str | None = None
Current output resolution in string format
resolution
is apydispatch.Property
object.
- Property api_version: str | None = None
Api version supported by the device
api_version
is apydispatch.Property
object.
- Property device_index: int = 0
The device index
device_index
is apydispatch.Property
object.
- Property connected: bool = False
True
communicating with the deviceconnected
is apydispatch.Property
object.
- Property connection_state: ConnectionState = ConnectionState.UNKNOWN
The device’s
ConnectionState
connection_state
is apydispatch.Property
object.
- Property error: bool = False
Becomes
True
when a communication error occurserror
is apydispatch.Property
object.
- DictProperty parameter_groups: tp.Dict[str, 'ParameterGroup']
Container for
ParameterGroup
instancesparameter_groups
is apydispatch.DictProperty
object.
- Event on_client_error(instance: Device, exc: Exception)[source]
Fired when an error is caught by the http client.
on_client_error
is apydispatch.Event
object.
- property devicepreview: JpegSource
Instance of
jvconnected.devicepreview.JpegSource
to acquire real-time jpeg images
- class jvconnected.device.ParameterGroup(*args, **kwargs)[source]
Bases:
Dispatcher
A logical group of device parameters
- _prop_attrs
A list of tuples to map instance attributes to the values returned by the api data from
Device._request_cam_status()
- Type
- _optional_api_keys
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.- Type
- Property name: str = ''
The group name
name
is apydispatch.Property
object.
- 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
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:
ParameterGroup
Basic camera parameters
- Property status: str | None = None
Camera status. One of
['NoCard', 'Stop', 'Standby', 'Rec', 'RecPause']
status
is apydispatch.Property
object.
True
if the camera menu is openmenu_status
is apydispatch.Property
object.
- Property mode: str | None = None
Camera record / media mode. One of
['Normal', 'Pre', 'Clip', 'Frame', 'Interval', 'Variable']
mode
is apydispatch.Property
object.
- Property timecode: str | None = None
The current timecode value
timecode
is apydispatch.Property
object.
Send a menu button event
- Parameters
value (MenuChoices) – The menu button type as a member of
MenuChoices
- class jvconnected.device.NTPParams(*args, **kwargs)[source]
Bases:
ParameterGroup
NTP parameters
- Property address: str = ''
The NTP server address (IP or URL)
address
is apydispatch.Property
object.
- Property tc_sync: bool = False
True if using NTP for timecode
tc_sync
is apydispatch.Property
object.
- Property syncronized: bool = False
Whether the device is syncronized to the
server
syncronized
is apydispatch.Property
object.
- Property sync_master: bool = False
True if the device is being used as a TC and sync (Genlock) master 1
sync_master
is apydispatch.Property
object.
- class jvconnected.device.BatteryState(value)[source]
Bases:
Enum
Values used for
BatteryParams.state
- UNKNOWN = 1
UNKNOWN
- ERROR = 2
ERROR
- NO_BATTERY = 3
NO_BATTERY
- ON_BATTERY = 4
ON_BATTERY
- CHARGING = 5
CHARGING
- CHARGED = 6
CHARGED
- class jvconnected.device.BatteryParams(*args, **kwargs)[source]
Bases:
ParameterGroup
Battery Info
- Property info_str: str | None = None
Type of value given to
value_str
. One of['Time', 'Capacity', 'Voltage']
info_str
is apydispatch.Property
object.
- Property level_str: str | None = None
Numeric value indicating various charging/discharging states
level_str
is apydispatch.Property
object.
- Property value_str: str = '0'
One of remaining time (in minutes), capacity (percent) or voltage (x10) depending on the value of
info_str
value_str
is apydispatch.Property
object.
- Property state: BatteryState = BatteryState.UNKNOWN
The current battery state
state
is apydispatch.Property
object.
- Property minutes: int = -1
Minutes remaining until full (while charging) or battery runtime (while on-battery). If unavailable, this will be
-1
minutes
is apydispatch.Property
object.
- Property percent: int = -1
Capacity remaining. If unavailable, this will be
-1
percent
is apydispatch.Property
object.
- Property voltage: float = -1
Battery voltage. If unavailable, this will be
-1
voltage
is apydispatch.Property
object.
- class jvconnected.device.MasterBlackDirection(value)[source]
Bases:
Enum
Values used for
ExposureParams.seesaw_master_black()
- Up = 1
Up
- Down = 2
Down
- Stop = 3
Stop
- class jvconnected.device.ExposureParams(*args, **kwargs)[source]
Bases:
ParameterGroup
Exposure parameters
- Property mode: str | None = None
Exposure mode. One of
['Auto', 'Manual', 'IrisPriority', 'ShutterPriority']
mode
is apydispatch.Property
object.
- Property iris_mode: str | None = None
Iris mode. One of
['Manual', 'Auto', 'AutoAELock']
iris_mode
is apydispatch.Property
object.
- Property iris_fstop: str | None = None
Character string for iris value
iris_fstop
is apydispatch.Property
object.
- Property iris_pos: int | None = None
Iris position (0-255)
iris_pos
is apydispatch.Property
object.
- Property gain_mode: str | None = None
Gain mode. One of
['ManualL', 'ManualM', 'ManualH', 'AGC', 'AlcAELock', 'LoLux', 'Variable']
gain_mode
is apydispatch.Property
object.
- Property gain_value: str | None = None
Gain value
gain_value
is apydispatch.Property
object.
- Property gain_pos: int = 0
The
gain_value
as an integer from -6 to 24gain_pos
is apydispatch.Property
object.
- Property shutter_mode: str | None = None
Shutter mode. One of
['Off', 'Manual', 'Step', 'Variable', 'Eei']
shutter_mode
is apydispatch.Property
object.
- Property shutter_value: str | None = None
Shutter value
shutter_value
is apydispatch.Property
object.
- Property master_black: str | None = None
MasterBlack value
master_black
is apydispatch.Property
object.
- Property master_black_pos: int = 0
MasterBlack value as an integer from -50 to 50
master_black_pos
is apydispatch.Property
object.
- Property master_black_moving: bool = False
True if MasterBlack is being adjusted with the
seesaw_master_black()
methodmaster_black_moving
is apydispatch.Property
object.
- Property master_black_speed: int = 0
Current MasterBlack movement speed from -8 (down) to +8 (up) where 0 indicates no movement.
master_black_speed
is apydispatch.Property
object.
- 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
- async adjust_master_black(direction: bool)[source]
Increment or decrement master black
- Parameters
direction (bool) – If True, increment, otherwise decrement
- async seesaw_master_black(direction: MasterBlackDirection | str | int, speed: int)[source]
Start or stop MasterBlack movement
- Parameters
direction (MasterBlackDirection | str | int) – Either a
MasterBlackDirection
member, the name as str, or the integer value of one of the membersspeed (int) – The movement speed from 0 to 8 (0 stops movement)
- class jvconnected.device.FocusMode(value)[source]
Bases:
Enum
Values used for
LensParams.focus_mode
- AF = 3
Auto focus
- MF = 5
Manual focus
- class jvconnected.device.ZoomDirection(value)[source]
Bases:
Enum
Values used for
LensParams.seesaw_zoom()
- Wide = 1
Wide
- Tele = 2
Telephoto
- Stop = 3
Stop
- class jvconnected.device.FocusDirection(value)[source]
Bases:
Enum
Values used for
LensParams.seesaw_focus()
- Near = 1
Near
- Far = 2
Far
- Stop = 3
Stop
- class jvconnected.device.LensParams(*args, **kwargs)[source]
Bases:
ParameterGroup
Lens Parameters
- Property focus_mode: FocusMode = FocusMode.Unknown
The current focus mode
focus_mode
is apydispatch.Property
object.
- Property focus_value: str | None = None
Character string for focus value
focus_value
is apydispatch.Property
object.
- Property zoom_pos: int = 0
Zoom position from 0 to 499
zoom_pos
is apydispatch.Property
object.
- Property zoom_value: str | None = None
Character string for zoom value
zoom_value
is apydispatch.Property
object.
- Property focus_speed: int = 0
Current focus speed from -8 (near) to +8 (far) where 0 indicates no movement
focus_speed
is apydispatch.Property
object.
- Property zoom_speed: int = 0
Current zoom speed from -8 (wide) to +8 (tele) where 0 indicates no movement
zoom_speed
is apydispatch.Property
object.
- Property focusing: bool = False
True while focus is moving
focusing
is apydispatch.Property
object.
- Property zooming: bool = False
True while zoom is moving
zooming
is apydispatch.Property
object.
- async set_focus_mode(mode)[source]
Set focus mode
- Parameters
mode – A
FocusMode
enum member, its string name or integer value
- async set_zoom_position(value)[source]
Set the zoom position
- Parameters
value (int) – The zoom position from 0 to 499
- async focus_near(speed)[source]
Begin focusing “near”
- Parameters
speed (int) – Focus speed from 0 to 8 (0 stops movement)
- async focus_far(speed)[source]
Begin focusing “far”
- Parameters
speed (int) – Focus speed from 0 to 8 (0 stops movement)
- async zoom_wide(speed)[source]
Begin zooming “wide” (or “out”)
- Parameters
speed (int) – Zoom speed from 0 to 8 (0 stops movement)
- async zoom_tele(speed)[source]
Begin zooming “tele” (or “in”)
- Parameters
speed (int) – Zoom speed from 0 to 8 (0 stops movement)
- async seesaw_focus(direction, speed)[source]
Start or stop focus movement
- Parameters
direction – Either a
FocusDirection
member, the name as str, or the integer value of one of the membersspeed (int) – The focus speed from 0 to 8 (0 stops movement)
- async seesaw_zoom(direction, speed)[source]
Start or stop zoom movement
- Parameters
direction – Either a
ZoomDirection
member, the name as str, or the integer value of one of the membersspeed (int) – The zoom speed from 0 to 8 (0 stops movement)
- class jvconnected.device.ZoomPreset(*args, **kwargs)[source]
Bases:
Dispatcher
Preset data for
PresetZoomParams
- Property is_active: bool = False
Flag indicating if the current
zoom_pos
matches the presetvalue
is_active
is apydispatch.Property
object.
- Property name: str = ''
The preset name (one of
["A", "B", "C"]
)name
is apydispatch.Property
object.
- Property value: int = -1
The
zoom_pos
stored in the preset. (-1
indicates no data is stored)value
is apydispatch.Property
object.
- class jvconnected.device.PresetZoomParams(*args, **kwargs)[source]
Bases:
ParameterGroup
Preset zoom
- DictProperty presets: Dict[str, ZoomPreset]
Mapping of
ZoomPreset
objects stored by theirname
presets
is apydispatch.DictProperty
object.
- class jvconnected.device.PaintParams(*args, **kwargs)[source]
Bases:
ParameterGroup
Paint parameters
- Property white_balance_mode: str = None
Current white balance mode. One of
['Preset', 'A', 'B', 'Faw', 'FawAELock', 'Faw', 'Awb', 'OnePush', '3200K', '5600K', 'Manual']
white_balance_mode
is apydispatch.Property
object.
- Property color_temp: str | None = None
White balance value
color_temp
is apydispatch.Property
object.
- Property red_scale: int = 64
Total range for WB red paint (0-64)
red_scale
is apydispatch.Property
object.
- Property red_pos: int | None = None
Current position of
red_value
(WB red paint) in the range of 0-64red_pos
is apydispatch.Property
object.
- Property red_value: str | None = None
Character string for WB red paint value
red_value
is apydispatch.Property
object.
- Property red_normalized: int = 0
red_pos
from -31 to +31red_normalized
is apydispatch.Property
object.
- Property blue_scale: int = 64
Total range for WB blue paint (0-64)
blue_scale
is apydispatch.Property
object.
- Property blue_pos: int | None = None
Current position of
blue_value
(WB blue paint) in the range of 0-64blue_pos
is apydispatch.Property
object.
- Property blue_value: str | None = None
Character string for WB blue paint value
blue_value
is apydispatch.Property
object.
- Property blue_normalized: int = 0
blue_pos
from -31 to +31blue_normalized
is apydispatch.Property
object.
- Property detail: str | None = None
Detail value as string
detail
is apydispatch.Property
object.
- Property detail_pos: int = 0
detail
as an integer from -10 to +10detail_pos
is apydispatch.Property
object.
- 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:
ParameterGroup
Tally light parameters
- Property program: bool = False
True if program tally is lit
program
is apydispatch.Property
object.
- Property preview: bool = False
True if preview tally is lit
preview
is apydispatch.Property
object.
- Property tally_priority: str | None = None
The tally priority. One of
['Camera', 'Web']
.tally_priority
is apydispatch.Property
object.
- Property tally_status: str | None = None
Tally light status. One of
['Off', 'Program', 'Preview']
tally_status
is apydispatch.Property
object.
- 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
- jvconnected.device.main(hostaddr, auth_user, auth_pass, id_=None)[source]
Build a device and open it
Footnotes
- 1
The documentation for this isn’t entirely clear, so the behavior is only assumed (as the author only has one type of camera to test with).