A remote control client for Ubiquiti's UVC NVR
Project description
The APIs in this library (and tool) should not be considered stable!
To install:
$ pip install mficlient
To get started, set your connection information like this:
$ export MFI="https://user:password@192.168.1.123:6443"
Then you can run the client, doing something like:
$ mfi dump_sensors Model | Label | Tag | Value | Extra ------------------------------------------------------------------------------- Output 12v | Relay Control | output | 0 | 0.0 Output 24v | Relay | output | 0 | 0.0 Ubiquiti mFi-THS | Temp | temperature | 14.3 | None Input Digital | Garage Door | input | 1 | None Outlet | Heater Control | active_pwr | 5.810242 | 1.0 Ubiquiti mFi-CS | Furnace | amps | 1.0539 | None Ubiquiti mFi-CS | Water Heater | amps | 0.0 | None $ mfi control_device --device 'Heater Control' --state on
Client API example:
>>> c = mficlient.MFiClient('192.168.1.123', 'admin', 'password') >>> p = c.get_port(label='Water Heater Control') >>> p.model 'Outlet' >>> p.value 5.746462 >>> p.tag 'active_pwr' >>> p.data {'rpt_time': 1456258144771, 'mac': 'redacted', 'locked': False, 'label': 'Water Heater Control', 'wattHours': 8001.875, 'y': 222.18320610687024, 'map_id': 'redacted', 'output': 1.0, 'fovrotation': 0, 'active_pwr': 5.746462, 'pf': 0.678653, 'reported_val': 1.0, '_id': 'redacted', 'i_rms': 0.069931, 'fovradius': 10, 'v_rms': 121.082737, 'val_time': 1456258144000, 'port': '1', 'energy_sum': 8001.875, 'wattHoursBase': 0.0, 'tag': 'active_pwr', 'val': 5.746462, 'wh_rpt_time': 1456258144761, 'model': 'Outlet', 'x': 564.8839694656489, 'fovangle': 1.5707963267948966, 'output_val': 1.0} >>> p.control(False)
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
mficlient-0.4.1.tar.gz
(10.6 kB
view details)
Built Distribution
mficlient-0.4.1-py3-none-any.whl
(10.2 kB
view details)
File details
Details for the file mficlient-0.4.1.tar.gz
.
File metadata
- Download URL: mficlient-0.4.1.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7aae9fb89d3f21f105be23975d4f880b9ff1bac1a3dbd70009f75c5dacbec4b |
|
MD5 | f8b865173811d2d6a289b3d9dbc59cc4 |
|
BLAKE2b-256 | 5a02323c807589e8bfb3ab5fa620d356f453d219f67174ca91c40f8d3655d809 |
File details
Details for the file mficlient-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: mficlient-0.4.1-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cfab3598595b8c173d0cbd9dc81ee10bcd87d90ddcf71e2cc833ef8f3ca3632 |
|
MD5 | 4c1e1796cf838c6ae6d180977e38d80b |
|
BLAKE2b-256 | 07df6380a746c23eeee1813f665f4d8c91304db899d7207c03a14f5b5f57faf2 |