diff options
Diffstat (limited to 'python-somecomfort-homie-4.spec')
| -rw-r--r-- | python-somecomfort-homie-4.spec | 259 |
1 files changed, 259 insertions, 0 deletions
diff --git a/python-somecomfort-homie-4.spec b/python-somecomfort-homie-4.spec new file mode 100644 index 0000000..ccb3776 --- /dev/null +++ b/python-somecomfort-homie-4.spec @@ -0,0 +1,259 @@ +%global _empty_manifest_terminate_build 0 +Name: python-Somecomfort-Homie-4 +Version: 0.3.6 +Release: 1 +Summary: Homie 4 for Honeywell Total Comfort North America +License: MIT License +URL: https://github.com/mjcumming/Somecomfort-Homie +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/6d/8f/c982190a44c6916c576289ab15143a08a8b179bc1a9922caee290c5e03fa/Somecomfort%20Homie%204-0.3.6.tar.gz +BuildArch: noarch + +Requires: python3-Homie4 +Requires: python3-somecomfort +Requires: python3-pyyaml +Requires: python3-timer3 + +%description +# Somecomfort Homie + +Homie 4 implementation of Honeywell Total Connect Comfort for North American models + +Uses the somecomfort library (https://github.com/kk7ds/somecomfort) + +Install on Raspberry Pi + +``` +pip3 install Somecomfort-Homie-4 +``` + +To start as a service on raspbian + +Create somecomfort_homie.yml in /etc + +''' +sudo nano /etc/somecomfort_homie.yml +''' + +Use the following settings: + +```yaml +somecomfort: + username: + password: + +mqtt: + MQTT_BROKER: Broker + MQTT_PORT: 1883 + MQTT_USERNAME: null + MQTT_PASSWORD: null +``` + +Create somecomfort-homie.service in /etc/systemd/system + +''' +sudo nano /etc/systemd/system/somecomfort-homie.service +''' + + +```service +[Unit] +Description=Somecomfort Homie +After=multi-user.target + +[Service] +User=pi +Type=simple +ExecStart=/usr/bin/python3 /usr/local/bin/somecomfort_homie_start.py +Restart=on-abort + +[Install] +WantedBy=multi-user.target +``` + +Copy somecomfort_homie_start.py to /usr/local/bin/ + + + + + + +%package -n python3-Somecomfort-Homie-4 +Summary: Homie 4 for Honeywell Total Comfort North America +Provides: python-Somecomfort-Homie-4 +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-Somecomfort-Homie-4 +# Somecomfort Homie + +Homie 4 implementation of Honeywell Total Connect Comfort for North American models + +Uses the somecomfort library (https://github.com/kk7ds/somecomfort) + +Install on Raspberry Pi + +``` +pip3 install Somecomfort-Homie-4 +``` + +To start as a service on raspbian + +Create somecomfort_homie.yml in /etc + +''' +sudo nano /etc/somecomfort_homie.yml +''' + +Use the following settings: + +```yaml +somecomfort: + username: + password: + +mqtt: + MQTT_BROKER: Broker + MQTT_PORT: 1883 + MQTT_USERNAME: null + MQTT_PASSWORD: null +``` + +Create somecomfort-homie.service in /etc/systemd/system + +''' +sudo nano /etc/systemd/system/somecomfort-homie.service +''' + + +```service +[Unit] +Description=Somecomfort Homie +After=multi-user.target + +[Service] +User=pi +Type=simple +ExecStart=/usr/bin/python3 /usr/local/bin/somecomfort_homie_start.py +Restart=on-abort + +[Install] +WantedBy=multi-user.target +``` + +Copy somecomfort_homie_start.py to /usr/local/bin/ + + + + + + +%package help +Summary: Development documents and examples for Somecomfort-Homie-4 +Provides: python3-Somecomfort-Homie-4-doc +%description help +# Somecomfort Homie + +Homie 4 implementation of Honeywell Total Connect Comfort for North American models + +Uses the somecomfort library (https://github.com/kk7ds/somecomfort) + +Install on Raspberry Pi + +``` +pip3 install Somecomfort-Homie-4 +``` + +To start as a service on raspbian + +Create somecomfort_homie.yml in /etc + +''' +sudo nano /etc/somecomfort_homie.yml +''' + +Use the following settings: + +```yaml +somecomfort: + username: + password: + +mqtt: + MQTT_BROKER: Broker + MQTT_PORT: 1883 + MQTT_USERNAME: null + MQTT_PASSWORD: null +``` + +Create somecomfort-homie.service in /etc/systemd/system + +''' +sudo nano /etc/systemd/system/somecomfort-homie.service +''' + + +```service +[Unit] +Description=Somecomfort Homie +After=multi-user.target + +[Service] +User=pi +Type=simple +ExecStart=/usr/bin/python3 /usr/local/bin/somecomfort_homie_start.py +Restart=on-abort + +[Install] +WantedBy=multi-user.target +``` + +Copy somecomfort_homie_start.py to /usr/local/bin/ + + + + + + +%prep +%autosetup -n Somecomfort-Homie-4-0.3.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-Somecomfort-Homie-4 -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 0.3.6-1 +- Package Spec generated |
