summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-pcomfortcloud.spec436
-rw-r--r--sources1
3 files changed, 438 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..7fd2679 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pcomfortcloud-0.0.23.tar.gz
diff --git a/python-pcomfortcloud.spec b/python-pcomfortcloud.spec
new file mode 100644
index 0000000..59ab7e0
--- /dev/null
+++ b/python-pcomfortcloud.spec
@@ -0,0 +1,436 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pcomfortcloud
+Version: 0.0.23
+Release: 1
+Summary: Read and change status of Panasonic Comfort Cloud devices
+License: MIT
+URL: http://github.com/lostfields/python-panasonic-comfort-cloud
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/7d/e6/7b9250b41f7854b1ad42e1a64d73464854be37a8fcd1cb07975e2424e40c/pcomfortcloud-0.0.23.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+
+%description
+# python-panasonic-comfort-cloud
+A python module for reading and changing status of panasonic climate devices through Panasonic Comfort Cloud app api
+
+## Command line usage
+
+```
+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
+```
+
+## Module usage
+
+
+```python
+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)
+```
+
+## PyPi package
+can be found at https://pypi.org/project/pcomfortcloud/
+
+### How to publish package;
+- `python .\setup.py sdist bdist_wheel`
+- `python -m twine upload dist/*`
+
+
+%package -n python3-pcomfortcloud
+Summary: Read and change status of Panasonic Comfort Cloud devices
+Provides: python-pcomfortcloud
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pcomfortcloud
+# python-panasonic-comfort-cloud
+A python module for reading and changing status of panasonic climate devices through Panasonic Comfort Cloud app api
+
+## Command line usage
+
+```
+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
+```
+
+## Module usage
+
+
+```python
+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)
+```
+
+## PyPi package
+can be found at https://pypi.org/project/pcomfortcloud/
+
+### How to publish package;
+- `python .\setup.py sdist bdist_wheel`
+- `python -m twine upload dist/*`
+
+
+%package help
+Summary: Development documents and examples for pcomfortcloud
+Provides: python3-pcomfortcloud-doc
+%description help
+# python-panasonic-comfort-cloud
+A python module for reading and changing status of panasonic climate devices through Panasonic Comfort Cloud app api
+
+## Command line usage
+
+```
+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
+```
+
+## Module usage
+
+
+```python
+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)
+```
+
+## PyPi package
+can be found at https://pypi.org/project/pcomfortcloud/
+
+### How to publish package;
+- `python .\setup.py sdist bdist_wheel`
+- `python -m twine upload dist/*`
+
+
+%prep
+%autosetup -n pcomfortcloud-0.0.23
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-pcomfortcloud -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.23-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..1803909
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+1b8dc0696f4ec55c2f1397b96caae009 pcomfortcloud-0.0.23.tar.gz