retrieve info from Vaddio camera telnet
Project description
vaddiocameras
Connect to Vaddio cameras over Telnet and retreive information. Telnet must be enabled in the camera's web GUI -> Security.
CameraConnect():
init with no parameters
set_cameras(cameras):
List of dicts, with each dict being a separate camera. Requires 'ip_address':'nnn.nnn.nnn.nnn; in the dict. Any additional keys will be accepted but are not required. Including 'room':'room_name' is recommended. ['room'] will also be parsed from the camera's hostname if the naming convention is room-whatever, eg. ABC123-VADDIO
config(user_name, password, write_results, output_path):
user_name: name used when vaddio security was initially setup
password: password to use with user_name
timeout: default 10. telnet timeout in seconds.
output_path: dir to store telnet data is write_results is True.
write_results: default True. Write telnet data to 'output_path/Vaddio room telnet.txt'.
If you're going to be using ParseCameraResponse(), you must set write_results to True.
set_requests(requests):
Accepts a list of ASCII requests to send via telnet. Requests that are already going to be sent: 'network settings get', 'streaming settings get', 'version', 'camera tilt get', Any requests you provide will be appended to this list. Tilt is polled because a reply of '0' probably means the camera has rebooted at some point and is now sitting in the factory Home position.
run():
Called by gathering run() to an asyncio queue, or by using asyncio.run(instance_name.run()) Begins Telnetting into the cameras provided, sending requests, and writing the results to file if desired. If you're going to be using ParseCameraResponse(), you must set write_results to True.
ParseCameraResponse()
input_path: dir containing the 'Vaddio room telnet.txt' files created by CameraConnect(). Try using input_path=camera_connect_instance.output_path if you're Telnetting and parsing in the same program.
excel_path: default 'camera_rooms.xlsx'. Filename used when exporting camera information.
run():
Called by gathering run() to an asyncio queue, or by using asyncio.run(instance_name.run()) Begins parsing information from the files located in input_path, then creates an Excel table with all of the camera data. Also returns the camera data as a list of dicts.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vaddiocameras-1.0.2.tar.gz
.
File metadata
- Download URL: vaddiocameras-1.0.2.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca7354d49420118411db1f4cab5c933ff12b662032dd056e906bd91f9ecdce51 |
|
MD5 | 75b5f34c1b8cb8eb207c2da460d83b97 |
|
BLAKE2b-256 | a08007a02e6700bf010f1338eb7f5af32126d6af02755215a04c70143557bcad |
File details
Details for the file vaddiocameras-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: vaddiocameras-1.0.2-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | defea5348c857625111df49fb7f8dc89d9568d9c84beb7f0c24ea5b74d9040f5 |
|
MD5 | f80d46e70e9f08d8a5a5f87f0c026501 |
|
BLAKE2b-256 | 70fab15a89400a27f460d9309ffefc72fb92e45917826c271074f985247714b0 |