A Python3 client to use Miris Manager remote control
Project description
UbiCast Miris Manager client
A Python3 client to use UbiCast Miris Manager remote control API.
This client is intended to act as a system in Miris Manager so it allows you to integrate a device in order to control it using Miris Manager.
Requirements
- python >= 3.9 (download the latest stable release from https://www.python.org/downloads/)
- python3-requests >= 2.30
Important
For production use, it is recommended to use the branch named "stable". The "main" branch is used for development.
Client class instantiation
The client class (mm_client
.client
.MirisManagerClient
) takes two arguments:
local_conf
: This argument can be either a dict or a path (str
object). The default value isNone
, which means no configuration.setup_logging
: This argument must be a boolean. If set toTrue
, the logging to console will be configured. The default value isTrue
.
Configuration
You can see available parameters in the default configuration file : Default configuration
The local configuration should be a json file.
Notes about older client
If you are using the first version of this client (commit 33b554991303b573254d59fb757f601d1e84d132
and previous commits), here are the steps to update your client:
- Install the new client using the setup.py.
- Replace the import path of
MirisManagerClient
(see example). - Replace the class variable
MirisManagerClient
.LOCAL_CONF
with the class instance argumentMirisManagerClient
.local_conf
. - Check the value of
MirisManagerClient
.DEFAULT_CONF
because it is nowNone
by default. - Replace all occurences of
URL
bySERVER_URL
in all configuration. - Replace all occurences of
CHECK_SSL
byVERIFY_SSL
in all configuration.
Examples
Ping the server
from mm_client.client import MirisManagerClient
mmc = MirisManagerClient(local_conf='your-conf.json')
response = mmc.api_request('PING')
print(response)
Recorder system
This example is the use case of a recorder system that can be controlled through the long polling.
Wake on LAN requests
This example is the use case of a client that forwards wake on LAN requests received through the long polling to its network.
Other examples
There are more examples in the examples directory.
Actions
Here is the list of actions that can be sent to the client depending on its supported capabilities:
Basic actions
SHUTDOWN
: capability: shutdown, description: Shutdown systemREBOOT
: capability: reboot, description: Reboot systemUPGRADE
: capability: upgrade, description: Upgrade system software
Recording
START_RECORDING
: capability: record, description: Start recordingSTOP_RECORDING
: capability: record, description: Stop recordingLIST_PROFILES
: capability: record, description: Refresh profiles list
Publishing
START_PUBLISHING
: capability: publish, description: Start publishing non published mediaSTOP_PUBLISHING
: capability: publish, description: Stop publishing
Wake on lan
WAKE_ON_LAN_SEND
: capability: send_wake_on_lan, description: Send a wake on LAN network package from this system to wake another system
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 miris-manager-client-6.0.tar.gz
.
File metadata
- Download URL: miris-manager-client-6.0.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3a346f10d4a9897a9e5a0cc6b2e61253cc2429d601b4a55025eeba6b0463619 |
|
MD5 | 65a573ae85dac331a9cb764602006983 |
|
BLAKE2b-256 | 33730cf39520019ad68eef5df137aad20c3558d4e3d690ebba567a08ede7593c |
File details
Details for the file miris_manager_client-6.0-py2.py3-none-any.whl
.
File metadata
- Download URL: miris_manager_client-6.0-py2.py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e3e0907889170f819069c95b577ef5d0d40aab7e5b888efdc3fedb7172b3edb |
|
MD5 | 5c003d60b76d569fe7fd32b80e3fd783 |
|
BLAKE2b-256 | 5bec282204539eff00f3802e03d166d08e947d7c4b984ed09b8945aa4e61554d |