读取和更改 Panasonic Comfort Cloud 设备的状态
项目描述
蟒蛇松下舒适云
用于通过 Panasonic Comfort Cloud 应用程序 api 读取和更改松下气候设备状态的 python 模块
命令行使用
usage: pcomfortcloud.py [-h] [-t TOKEN] username password {list,get,set} ...
Read or change status of Panasonic Climate devices
positional arguments:
username Username for Panasonic Comfort Cloud
password Password for Panasonic Comfort Cloud
{list,get,set,dump} commands
list Get a list of all devices
get Get status of a device
set Set status of a device
dump Dump raw data of a device
history Dump history of a device
optional arguments:
-h, --help show this help message and exit
-t TOKEN, --token TOKEN
File to store token in
-s [BOOL], --skipVerify [BOOL]
Skip Ssl verification
-r [BOOL], --raw [BOOL]
Raw dump of response
usage: pcomfortcloud.py username password get [-h] device
positional arguments:
device device number
optional arguments:
-h, --help show this help message and exit
usage: pcomfortcloud.py username password set [-h]
[-p, --power {On,Off}]
[-t, --temperature TEMPERATURE]
[-f, --fanspeed {Auto,Low,LowMid,Mid,HighMid,High}]
[-m, --mode {Auto,Cool,Dry,Heat,Fan}]
[-e, --eco {Auto,Quiet,Powerful}]
[-y, --airswingvertical {Auto,Down,DownMid,Mid,UpMid,Up}]
[-x, --airswinghorizontal {Auto,Left,LeftMid,Mid,RightMid,Right}]
device
positional arguments:
device Device number
optional arguments:
-h, --help
show this help message and exit
-p, --power {On,Off}
Power mode
-t, --temperature TEMPERATURE
Temperature in decimal format
-f, --fanspeed {Auto,Low,LowMid,Mid,HighMid,High}
Fan speed
-m, --mode {Auto,Cool,Dry,Heat,Fan}
Operation mode
-e, --eco {Auto,Quiet,Powerful}
Eco mode
-y, --airswingvertical {Auto,Down,DownMid,Mid,UpMid,Up}
Vertical position of the air swing
-x, --airswinghorizontal {Auto,Left,LeftMid,Mid,RightMid,Right}
Horizontal position of the air swing
usage: pcomfortcloud username password dump [-h] device
positional arguments:
device Device number 1-x
optional arguments:
-h, --help show this help message and exit
usage: pcomfortcloud username password history [-h] device mode date
positional arguments:
device Device number 1-x
mode mode (Day, Week, Month, Year)
date date of day like 20190807
optional arguments:
-h, --help show this help message and exit
模块使用
import pcomfortcloud
session = pcomfortcloud.Session('user@example.com', 'mypassword')
session.login()
devices = session.get_devices()
print(devices)
print(session.get_device(devices[0]['id']))
session.set_device(devices[0]['id'],
power = pcomfortcloud.constants.Power.On,
temperature = 22.0)
派皮包
可以在https://pypi.org/project/pcomfortcloud/找到
如何发布包;
python .\setup.py sdist bdist_wheelpython -m twine upload dist/*
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分布
pcomfortcloud-0.0.23.tar.gz
(11.6 kB
查看哈希)
内置分布
pcomfortcloud-0.0.23-py3-none-any.whl
(12.1 kB
查看哈希)
关
pcomfortcloud -0.0.23.tar.gz 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 159970329d1b18044330247d090ed892ba296a97b2280dd99e83fa33e1770254 |
|
| MD5 | 1b8dc0696f4ec55c2f1397b96caae009 |
|
| 布莱克2-256 | 7de67b9250b41f7854b1ad42e1a64d73464854be37a8fcd1cb07975e2424e40c |
关
pcomfortcloud -0.0.23-py3-none-any.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 9273977eadef0f4a660fb0d82f6f340f64af2ce963e591dbcdf4a41996938cae |
|
| MD5 | 16a09010a1b7359615db205ebbadc111 |
|
| 布莱克2-256 | a0ec7a4e6fe35fc7792fee86b33a5eb975b96a45363372d9dfcbd16d66bbf7c3 |