2024年11月22日星期五 下午4:42:48

Install poetry and the latest development version python-miio from GitHub

1 年 前
#20168 引用
python-miio

Alternatively, you can install the latest development version from GitHub:

Poetry
Poetry是一个依赖项管理和打包工具。安装所需python版本python3.6+

https://python-poetry.org/docs/
0
1 年 前
#20169 引用
Install poetry

virtualenv

https://python-poetry.org/docs/basic-usage/


root@raspberrypi:~/2/python-miio# curl -sSL https://install.python-poetry.org | python3 -


output

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

/root/.local/bin

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (1.4.0): Installing Poetry



0
1 年 前
#20171 引用
Installation


Alternatively, you can install the latest development version from GitHub:

git clone https://github.com/rytilahti/python-miio.git
cd python-miio
poetry install
poetry run miiocli  # or use `poetry shell` to enter the virtualenv


https://github.com/rytilahti/python-miio
0
1 年 前
#22555 引用


miiocli cloud
Username: [email protected]
Password:

== name of the device (Device offline ) ==
    Model: example.device.v1
    Token: b1946ac92492d2347c6235b4d2611184
    IP: 192.168.xx.xx (mac: ab:cd:ef:12:34:56)
    DID: 123456789
    Locale: cn
0
8 个月 前
#29731 引用
Debian 12

Installation

Install Poetry

# curl -sSL https://install.python-poetry.org | python3 -


output



# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

/root/.local/bin

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (1.8.2): Done

Poetry (1.8.2) is installed now. Great!

To get started you need Poetry's bin directory (/root/.local/bin) in your `PATH`
environment variable.

Add `export PATH="/root/.local/bin:$PATH"` to your shell configuration file.

Alternatively, you can call Poetry explicitly with `/root/.local/bin/poetry`.

You can test that everything is set up by executing:

`poetry --version`





~# /root/.local/bin/poetry --version
Poetry (version 1.8.2)
0
8 个月 前
#29732 引用
debian 12

git clone https://github.com/rytilahti/python-miio.git
cd python-miio
/root/.local/bin/poetry install


/root/.local/bin/poetry run miiocli 


# or use `poetry shell` to enter the virtualenv


/root/.local/bin/poetry shell



output

@debian:~/python-miio# miiocli




(python-miio-py3.11) root@debian:~/python-miio# miiocli


output

debian:~/python-miio# miiocli discover 

INFO:miio.miioprotocol:Sending discovery to <broadcast> with timeout of 5s..
INFO:miio.miioprotocol:  IP 192.168.2.100 (ID: 3dc69984) - token: b'ffffffffffffffffffffffffffffffff'
INFO:miio.miioprotocol:  IP 192.168.2.114 (ID: 21c66e62) - token: b'ffffffffffffffffffffffffffffffff'
INFO:miio.miioprotocol:  IP 192.168.2.108 (ID: 045b9280) - token: b'ffffffffffffffffffffffffffffffff'
INFO:miio.miioprotocol:  IP 192.168.2.103 (ID: 1c5c4959) - token: b'ffffffffffffffffffffffffffffffff'
INFO:miio.miioprotocol:  IP 192.168.2.105 (ID: 22e4be42) - token: b'ffffffffffffffffffffffffffffffff'
INFO:miio.miioprotocol:  IP 192.168.2.110 (ID: 1c69b97e) - token: b'ffffffffffffffffffffffffffffffff'
INFO:miio.miioprotocol:  IP 192.168.2.113 (ID: 21283c86) - token: b'ffffffffffffffffffffffffffffffff'
INFO:miio.miioprotocol:  IP 192.168.2.107 (ID: 18a6ce8d) - token: b'ffffffffffffffffffffffffffffffff'
INFO:miio.miioprotocol:  IP 192.168.2.109 (ID: 20254443) - token: b'ffffffffffffffffffffffffffffffff'
INFO:miio.miioprotocol:Discovery done
INFO:miio.discovery:Discovering devices with mDNS for 5 seconds...
INFO:miio.discovery:Found 'lumi.gateway.mihk01' at 192.168.2.108, performing handshake
INFO:miio.discovery:Handshake successful! devid: 73110144, ts: 2024-03-17 03:14:00+00:00



come from:https://python-miio.readthedocs.io/en/latest/discovery.html#installation
0
8 个月 前
#29735 引用
output



~/python-miio# /root/.local/bin/poetry install
Creating virtualenv python-miio-oZCv1vlr-py3.11 in /root/.cache/pypoetry/virtualenvs
Installing dependencies from lock file

Package operations: 60 installs, 1 update, 0 removals

  - Installing certifi (2024.2.2)
  - Installing charset-normalizer (3.3.2)
  - Installing idna (3.6)
  - Installing urllib3 (2.2.1)
  - Installing docutils (0.20.1)
  - Installing packaging (24.0)
  - Installing pygments (2.17.2)
  - Installing requests (2.31.0)
  - Installing distlib (0.3.8)
  - Installing filelock (3.13.1)
  - Installing iniconfig (2.0.0)
  - Installing pbr (6.0.0)
  - Installing platformdirs (4.2.0)
  - Installing pluggy (1.4.0)
  - Installing pycparser (2.21)
  - Updating setuptools (69.1.0 -> 69.2.0)
  - Installing six (1.16.0)
  - Installing typing-extensions (4.10.0)
  - Installing annotated-types (0.6.0)
  - Installing cachetools (5.3.3)
  - Installing cffi (1.16.0)
  - Installing cfgv (3.4.0)
  - Installing chardet (5.2.0)
  - Installing click (8.1.7)
  - Installing colorama (0.4.6)
  - Installing coverage (7.4.3)
  - Installing identify (2.5.35)
  - Installing ifaddr (0.2.0)
  - Installing mypy-extensions (1.0.0)
  - Installing nodeenv (1.8.0)
  - Installing pycryptodome (3.20.0)
  - Installing pydantic-core (2.16.3)
  - Installing pyproject-api (1.6.1)
  - Installing pytest (8.1.1)
  - Installing python-dateutil (2.9.0.post0)
  - Installing pytz (2024.1)
  - Installing pyyaml (6.0.1)
  - Installing restructuredtext-lint (1.4.0)
  - Installing stevedore (5.2.0)
  - Installing tzlocal (5.2)
  - Installing untokenize (0.1.1)
  - Installing virtualenv (20.25.1)
  - Installing appdirs (1.4.4)
  - Installing attrs (23.2.0)
  - Installing construct (2.10.70)
  - Installing croniter (2.0.2)
  - Installing cryptography (42.0.5)
  - Installing defusedxml (0.7.1)
  - Installing doc8 (1.1.1)
  - Installing docformatter (1.7.5)
  - Installing isort (5.13.2)
  - Installing micloud (0.6)
  - Installing mypy (1.9.0)
  - Installing pre-commit (3.5.0)
  - Installing pydantic (2.6.4)
  - Installing pytest-asyncio (0.23.5.post1)
  - Installing pytest-cov (4.1.0)
  - Installing pytest-mock (3.12.0)
  - Installing tox (4.14.1)
  - Installing tqdm (4.66.2)
  - Installing zeroconf (0.131.0)

Installing the current project: python-miio (0.6.0.dev0)



0