Control your MotionMount Signature TVM7675 Pro using Python
Project description
Introduction
This Python module allows control of the TVM 7675 Pro (SIGNATURE) series of MotionMount's from Vogel's Products.
Getting Started
This module can be installed using the following command:
pip install python-MotionMount
In your Python code you can then use the module as follows:
import asyncio
import motionmount
ip = "MMF8A55F.local." # Can also be "169.254.13.16" or similar
port = 23 # The best way to get the port number is using zeroconf, but it's likely '23'
async def main():
mm = MotionMount(ip, port)
try:
await mm.connect()
await mm.go_to_preset(1)
print(f"Extension: {mm.extension}")
name = await mm.get_name()
print(f"The name is: \"{name}\"")
await mm.go_to_position(50, -50)
except Exception as e:
print(f"Something bad happened: {e}")
finally:
await asyncio.sleep(1)
await mm.disconnect()
if __name__ == '__main__':
asyncio.run(main())
To get the IP address of the MotionMount you can use pyzeroconf or you can use a manual tool like dns-sd
in the macOS Terminal or a GUI tool like Discovery (macOS) or Bonjour Browser (Windows)
A simple example using pyzeroconf
is included in the examples
folder.
If you want to run the examples from a clone of the repository you can use a command similar to:
PYTHONPATH=./src/motionmount python examples/simple.py
Changelog
1.0.1: - Fix bug in allowed preset indices
2.0.0: - Include position data in presets
2.1.0: - Add timeout (15 s) to connect()
2.2.0: - Add support for authentication to the MotionMount
MIT License
Copyright (c) 2023 Vogel's Products
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
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
Hashes for python_MotionMount-2.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f8f4173f453f06d77b57988a2120ca7dd73d31e18e2c778d0f763a0f124c905 |
|
MD5 | befb1d7630ee3a48ed7d0bda02517541 |
|
BLAKE2b-256 | c30bd04821b22984a6465ab6b394bcd2b7a2ec2476a7c55b0a6beb5b79ec8819 |