diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-10 10:00:32 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-10 10:00:32 +0000 |
| commit | 1382451a3e4b4e2c468c526f73ba8c6a394b9801 (patch) | |
| tree | 1ef30409c3aec98d007b87a8840465736b379ef7 /python-somfy-mylink-synergy.spec | |
| parent | 84802206c4bd68bd1b4915966ec1c401272bd446 (diff) | |
automatic import of python-somfy-mylink-synergy
Diffstat (limited to 'python-somfy-mylink-synergy.spec')
| -rw-r--r-- | python-somfy-mylink-synergy.spec | 255 |
1 files changed, 255 insertions, 0 deletions
diff --git a/python-somfy-mylink-synergy.spec b/python-somfy-mylink-synergy.spec new file mode 100644 index 0000000..10a9fa4 --- /dev/null +++ b/python-somfy-mylink-synergy.spec @@ -0,0 +1,255 @@ +%global _empty_manifest_terminate_build 0 +Name: python-somfy-mylink-synergy +Version: 1.0.6 +Release: 1 +Summary: Python API to utilise the Somfy Synergy JsonRPC API +License: MIT +URL: http://github.com/bendews/somfy-mylink-synergy +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/5e/11/6d547c1e97f5117d8f6f9376d72c465a322932a5bc4a0727e69fea163511/somfy_mylink_synergy-1.0.6.tar.gz +BuildArch: noarch + + +%description +[](https://travis-ci.org/bendews/somfy-mylink-synergy) + +# Somfy MyLink Synergy API + +Python API to utilise the Somfy Synergy API utilising JsonRPC. + +## Requirements + +- Python >= 3.5.2 + +## Usage +```python + +import asyncio +from somfy_mylink_synergy import SomfyMyLinkSynergy + +loop = asyncio.get_event_loop() +mylink = SomfyMyLinkSynergy('YourSystemID', '10.1.1.50') + + +mylink_covers = loop.run_until_complete(mylink.status_info()) +for device in mylink_covers['result']: + print(device['targetID'], device['name']) + +# ('CC0000A.1', 'Bedroom Cover') +# ('CC0000A.2', 'Kitchen Cover') + +mylink_scenes = loop.run_until_complete(mylink.scene_list()) +for scene in mylink_scenes['result']: + print(scene['sceneID'], scene['name']) + +# ('123456789', 'Morning') +# ('987654321', 'Evening') + +mylink_ping = loop.run_until_complete(mylink.status_ping()) +for device in mylink_ping['result']: + print(device) + +# ('CC0000A.1') +# ('CC0000A.2') + +open_cover = loop.run_until_complete(mylink.move_up('CC0000A.1')) +close_cover = loop.run_until_complete(mylink.move_down('CC0000A.1')) +stop_cover = loop.run_until_complete(mylink.move_stop('CC0000A.1')) +activate_scene = loop.run_until_complete(mylink.scene_run('123456789')) + +``` + + +## TODO: + +- None + +## License + +MIT + +## Author Information + +Created in 2018 by [Ben Dews](https://bendews.com) + + + +%package -n python3-somfy-mylink-synergy +Summary: Python API to utilise the Somfy Synergy JsonRPC API +Provides: python-somfy-mylink-synergy +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-somfy-mylink-synergy +[](https://travis-ci.org/bendews/somfy-mylink-synergy) + +# Somfy MyLink Synergy API + +Python API to utilise the Somfy Synergy API utilising JsonRPC. + +## Requirements + +- Python >= 3.5.2 + +## Usage +```python + +import asyncio +from somfy_mylink_synergy import SomfyMyLinkSynergy + +loop = asyncio.get_event_loop() +mylink = SomfyMyLinkSynergy('YourSystemID', '10.1.1.50') + + +mylink_covers = loop.run_until_complete(mylink.status_info()) +for device in mylink_covers['result']: + print(device['targetID'], device['name']) + +# ('CC0000A.1', 'Bedroom Cover') +# ('CC0000A.2', 'Kitchen Cover') + +mylink_scenes = loop.run_until_complete(mylink.scene_list()) +for scene in mylink_scenes['result']: + print(scene['sceneID'], scene['name']) + +# ('123456789', 'Morning') +# ('987654321', 'Evening') + +mylink_ping = loop.run_until_complete(mylink.status_ping()) +for device in mylink_ping['result']: + print(device) + +# ('CC0000A.1') +# ('CC0000A.2') + +open_cover = loop.run_until_complete(mylink.move_up('CC0000A.1')) +close_cover = loop.run_until_complete(mylink.move_down('CC0000A.1')) +stop_cover = loop.run_until_complete(mylink.move_stop('CC0000A.1')) +activate_scene = loop.run_until_complete(mylink.scene_run('123456789')) + +``` + + +## TODO: + +- None + +## License + +MIT + +## Author Information + +Created in 2018 by [Ben Dews](https://bendews.com) + + + +%package help +Summary: Development documents and examples for somfy-mylink-synergy +Provides: python3-somfy-mylink-synergy-doc +%description help +[](https://travis-ci.org/bendews/somfy-mylink-synergy) + +# Somfy MyLink Synergy API + +Python API to utilise the Somfy Synergy API utilising JsonRPC. + +## Requirements + +- Python >= 3.5.2 + +## Usage +```python + +import asyncio +from somfy_mylink_synergy import SomfyMyLinkSynergy + +loop = asyncio.get_event_loop() +mylink = SomfyMyLinkSynergy('YourSystemID', '10.1.1.50') + + +mylink_covers = loop.run_until_complete(mylink.status_info()) +for device in mylink_covers['result']: + print(device['targetID'], device['name']) + +# ('CC0000A.1', 'Bedroom Cover') +# ('CC0000A.2', 'Kitchen Cover') + +mylink_scenes = loop.run_until_complete(mylink.scene_list()) +for scene in mylink_scenes['result']: + print(scene['sceneID'], scene['name']) + +# ('123456789', 'Morning') +# ('987654321', 'Evening') + +mylink_ping = loop.run_until_complete(mylink.status_ping()) +for device in mylink_ping['result']: + print(device) + +# ('CC0000A.1') +# ('CC0000A.2') + +open_cover = loop.run_until_complete(mylink.move_up('CC0000A.1')) +close_cover = loop.run_until_complete(mylink.move_down('CC0000A.1')) +stop_cover = loop.run_until_complete(mylink.move_stop('CC0000A.1')) +activate_scene = loop.run_until_complete(mylink.scene_run('123456789')) + +``` + + +## TODO: + +- None + +## License + +MIT + +## Author Information + +Created in 2018 by [Ben Dews](https://bendews.com) + + + +%prep +%autosetup -n somfy-mylink-synergy-1.0.6 + +%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-somfy-mylink-synergy -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.6-1 +- Package Spec generated |
