pax_global_header00006660000000000000000000000064137004403600014507gustar00rootroot0000000000000052 comment=4c4cb5d139a700d161e542eca1c40a44d72590c0 bannhead-pyaehw4a1-e4c978d/000077500000000000000000000000001370044036000155015ustar00rootroot00000000000000bannhead-pyaehw4a1-e4c978d/.gitignore000066400000000000000000000032741370044036000174770ustar00rootroot00000000000000# Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ pip-wheel-metadata/ share/python-wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover *.py,cover .hypothesis/ .pytest_cache/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py db.sqlite3 db.sqlite3-journal # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder target/ # Jupyter Notebook .ipynb_checkpoints # IPython profile_default/ ipython_config.py # pyenv .python-version # pipenv # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. # However, in case of collaboration, if having platform-specific dependencies or dependencies # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. #Pipfile.lock # celery beat schedule file celerybeat-schedule # SageMath parsed files *.sage.py # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ .dmypy.json dmypy.json # Pyre type checker .pyre/ bannhead-pyaehw4a1-e4c978d/LICENSE000066400000000000000000000261351370044036000165150ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. bannhead-pyaehw4a1-e4c978d/README.md000066400000000000000000000026761370044036000167730ustar00rootroot00000000000000# pyaehw4a1 Python module and client for Hisense AEH-W4A1 wifi module ## Usage ### Intranet discovery python -m pyaehw4a1 discovery (--full) ### XM version python -m pyaehw4a1 version --host IP_ADDRESS ### Read status python -m pyaehw4a1 AC --host IP_ADDRESS ### Send update command python -m pyaehw4a1 AC --host IP_ADDRESS --command COMMAND ## Supported commands - on - off - mode_(cool, heat, fan, dry) - speed_(mute, low, med, max, auto) - temp_$1_C ($1 from 16 to 32) - temp_$1_F ($1 from 61 to 90) - turbo_on - turbo_off - energysave_on - energysave_off - display_on - display_off - sleep_(1, 2, 3, 4, off) - vert_dir - vert_swing - hor_dir - hor_swing - temp_to_F - temp_to_C - status_(3_0, 3_1, 7_1, 10_4, 102_0, 102_64) ## Note I am NOT a programmer and this is my first attempt to write in Python! So, it comes with ABSOLUTELY NO WARRANTY!!! I started this work to implement support for my Hisense multi splip AC in Home Assistant... This is the first part. The module Hisense AEH-W4A1 uses a serial protocol called XM, sending AT+XMV command my AC reports v4.4.6; on https://github.com/htqwe22/device I found some specifications on v3.2.6 and on https://github.com/cgdgithub/ControlJavaEdition I found the official protocol implementation but sadly without protocol specifications. If you have updated information, please send it to me! My template is https://github.com/JonasPed/pydanfoss-air code. Many thanks to the author! bannhead-pyaehw4a1-e4c978d/pyaehw4a1/000077500000000000000000000000001370044036000173045ustar00rootroot00000000000000bannhead-pyaehw4a1-e4c978d/pyaehw4a1/__init__.py000066400000000000000000000000461370044036000214150ustar00rootroot00000000000000from . import * __version__ = '0.3.9' bannhead-pyaehw4a1-e4c978d/pyaehw4a1/__main__.py000066400000000000000000000047051370044036000214040ustar00rootroot00000000000000import asyncio import argparse import json from . import aehw4a1 from .commands import UpdateCommand from .commands import ReadCommand from .exceptions import * def main(): parser = argparse.ArgumentParser("aehw4a1") subs = parser.add_subparsers() subs.required = True subs.dest = 'choise' disc_parser = subs.add_parser('discovery', help='search for ACs') disc_parser.add_argument('--full', '-f', action='store_const', const=True, required=False, help='force discovery on every interface') comm_parser = subs.add_parser('AC', help='run a command on the given AC') comm_parser.add_argument('--host', action='store', required=True, help='IP of AC') comm_parser.add_argument('--command', '-c', action='store', required=False, help='List on implemented commands on README.md') comm_parser = subs.add_parser('check', help='test for AC presence') comm_parser.add_argument('--host', action='store', required=True, help='IP of AC') comm_parser = subs.add_parser('version', help='XMVersion') comm_parser.add_argument('--host', action='store', required=True, help='IP of AC') args = parser.parse_args() if args.choise == "discovery": client = aehw4a1.AehW4a1() print(asyncio.run(client.discovery(args.full))) elif args.choise == "AC": client = aehw4a1.AehW4a1(args.host) if args.command is None: command = "status_102_0" else: command = args.command if command in ReadCommand.__dict__: parsed = asyncio.run(client.command(command)) print("AC",args.host,command,":\n",json.dumps(parsed, indent=4, sort_keys=False)) elif command in UpdateCommand.__dict__: if asyncio.run(client.command(command)): parsed = asyncio.run(client.command("status_102_0")) print("AC",args.host,command,":\n",json.dumps(parsed, indent=4, sort_keys=False)) else: raise UnkCmdError("Unknown command: {0}".format(command)) elif args.choise == "check": client = aehw4a1.AehW4a1(args.host) if asyncio.run(client.check()): print("Found!") elif args.choise == "version": client = aehw4a1.AehW4a1(args.host) print(asyncio.run(client.version())) if __name__ == "__main__": main() bannhead-pyaehw4a1-e4c978d/pyaehw4a1/aehw4a1.py000066400000000000000000000207661370044036000211230ustar00rootroot00000000000000import sys import asyncio import ipaddress import ifaddr from .commands import ReadCommand from .commands import UpdateCommand from .responses import ResponsePacket from .responses import DataPacket from .exceptions import * MAX_NUMBER_WORKERS = 200 class AehW4a1: def __init__(self, host=None): if host is None: self._host = None else: self._host = host async def check(self): if not self._host: raise ConnectionError("Host required") try: ipaddress.IPv4Network(self._host) except ValueError: raise ConnectionError(f"Invalid IP address: {self._host}") from None try: reader, writer = await asyncio.wait_for( asyncio.open_connection(self._host, 8888), timeout = 2) except: raise ConnectionError(f"AC unavailable at {self._host}") from None writer.write(bytes("AT+XMV", 'utf-8')) await writer.drain() data = await reader.readline() writer.close() await writer.wait_closed() if bytes("+XMV:", 'utf-8') in data: return True raise ConnectionError(f"Unknown device {self._host}") async def version(self): if not self._host: raise ConnectionError("Host required") try: ipaddress.IPv4Network(self._host) except ValueError: raise ConnectionError(f"Invalid IP address: {self._host}") from None try: reader, writer = await asyncio.wait_for( asyncio.open_connection(self._host, 8888), timeout = 2) except: raise ConnectionError(f"AC unavailable at {self._host}") from None writer.write(bytes("AT+XMV", 'utf-8')) await writer.drain() data = await reader.readline() writer.close() await writer.wait_closed() if bytes("+XMV:", 'utf-8') in data: return data raise ConnectionError(f"Unknown device {self._host}") async def command(self, command): if not self._host: raise ConnectionError("Host required") try: ipaddress.IPv4Network(self._host) except ValueError: raise ConnectionError(f"Invalid IP address: {self._host}") from None for name, member in ReadCommand.__members__.items(): if command == name: return await self._read_command(member) for name, member in UpdateCommand.__members__.items(): if command == name: if command == "temp_to_F": await self._update_command(member) return await self.command("temp_to_F_reset_temp") elif command == "temp_to_C": await self._update_command(member) return await self.command("temp_to_C_reset_temp") else: return await self._update_command(member) raise UnkCmdError(f"Not yet implemented: {command}") async def _update_command(self, command): pure_bytes = await self._send_recv_packet(command) packet_type = await self._packet_type(pure_bytes) if (await self._check_response(packet_type, pure_bytes)): return True raise UnkPacketError( f"Unknown packet type {packet_type}: {pure_bytes.hex()}" ) async def _read_command(self, command): pure_bytes = await self._send_recv_packet(command) packet_type = await self._packet_type(pure_bytes) data_start_pos = await self._check_response(packet_type, pure_bytes) if data_start_pos: result = await self._bits_value(packet_type, pure_bytes, data_start_pos) return result raise UnkPacketError( f"Unknown packet type {packet_type}: {pure_bytes.hex()}" ) async def _send_recv_packet(self, command): for i in range(5): try: reader, writer = await asyncio.wait_for( asyncio.open_connection(self._host, 8888), timeout = 2) except: pass else: break else: raise ConnectionError(f"AC unavailable") from None for i in range(5): writer.write(command.value) await writer.drain() try: data = await asyncio.wait_for(reader.read(100), timeout = 2) writer.close() await writer.wait_closed() except: pass else: break else: raise ConnectionError(f"AC does not respond") from None return data async def _bits_value(self, packet_type, pure_bytes, data_pos): result = {} binary_string = f"{int(pure_bytes.hex(),16):08b}" binary_data = binary_string[data_pos*8:-24] for data_packet in DataPacket: if packet_type in data_packet.name: for field in data_packet.value: result[field.name] = binary_data[(field.offset - 1): (field.offset + field.length - 1)] return result raise UnkDataError(f"Unknown data type {packet_type}: {binary_data}") async def _packet_type(self, string): type = int(string[13:14].hex(),16) sub_type = int(string[14:15].hex(),16) result = f"{type}_{sub_type}" return result async def _check_response(self, packet_type, pure_bytes): for response_packet in ResponsePacket: if packet_type in response_packet.name: if response_packet.value not in pure_bytes: raise WrongRespError( f"Wrong response for type {packet_type}: {pure_bytes.hex()}" ) return len(response_packet.value) return False async def discovery(self, full=None): if full is None: self._full = None elif full == True: self._full = True else: raise WrongArgError("Optional argument for discovery is: True") nets = [] adapters = ifaddr.get_adapters() for adapter in adapters: for ip in adapter.ips: if ip.is_IPv4 and ip.ip != "127.0.0.1": if self._full: nets.append( ipaddress.IPv4Network(f"{ip.ip}/{ip.network_prefix}", strict=False) ) else: nets.append( ipaddress.IPv4Network(f"{ip.ip}/24", strict=False) ) if not nets: raise NoNetworksError("No networks available") acs = [] out_queue = asyncio.Queue() for net in nets: task_queue = asyncio.Queue(maxsize=MAX_NUMBER_WORKERS) scan_completed = asyncio.Event() scan_completed.clear() tasks = [asyncio.create_task(self._task_master(net, task_queue, scan_completed))] for _ in range(MAX_NUMBER_WORKERS): tasks.append(asyncio.create_task(self._task_worker(task_queue, out_queue))) await scan_completed.wait() await task_queue.join() for task in tasks: task.cancel() await asyncio.gather(*tasks, return_exceptions=True) if out_queue.qsize() and not self._full: break while out_queue.qsize(): acs.append(out_queue.get_nowait()) return acs async def _task_master(self, net, task_queue: asyncio.Queue, scan_completed: asyncio.Event): for ip in net: await task_queue.put(str(ip)) scan_completed.set() async def _task_worker(self, task_queue, out_queue): while True: ip = (await task_queue.get()) try: reader, writer = await asyncio.wait_for( asyncio.open_connection(ip, 8888), timeout = 2) except: pass else: writer.write(bytes("AT+XMV", 'utf-8')) await writer.drain() data = await reader.readline() writer.close() await writer.wait_closed() if bytes("+XMV:", 'utf-8') in data: out_queue.put_nowait(ip) finally: task_queue.task_done()bannhead-pyaehw4a1-e4c978d/pyaehw4a1/commands.py000066400000000000000000000725761370044036000215000ustar00rootroot00000000000000from enum import Enum class ReadCommand(Enum): status_3_0 = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x0B, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x4F, 0xF4, 0xFB ]) status_3_1 = bytes([ 0XF4, 0XF5, 0X00, 0X40, 0X0B, 0X00, 0X00, 0X01, 0X01, 0XFE, 0X01, 0X00, 0X00, 0X03, 0X01, 0X00, 0X01, 0X50, 0XF4, 0XFB ]) status_7_1 = bytes([ 0XF4, 0XF5, 0X00, 0X40, 0X0B, 0X00, 0X00, 0X01, 0X01, 0XFE, 0X01, 0X00, 0X00, 0X07, 0X01, 0X00, 0X01, 0X54, 0XF4, 0XFB ]) status_10_4 = bytes([ 0XF4, 0XF5, 0X00, 0X40, 0X0B, 0X00, 0X00, 0X01, 0X01, 0XFE, 0X01, 0X00, 0X00, 0X0A, 0X04, 0X00, 0X01, 0X5A, 0XF4, 0XFB ]) status_102_0 = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x0C, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x01, 0xB3, 0xF4, 0xFB ]) status_102_64 = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x0B, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x66, 0x40, 0x00, 0x01, 0xF2, 0xF4, 0xFB ]) class UpdateCommand(Enum): on = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xDF, 0xF4, 0xFB ]) off = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x55, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x31, 0xF4, 0xFB ]) mode_cool = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x01, 0x01, 0x50, 0x35, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7F, 0xF4, 0xFB ]) mode_heat = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x01, 0x01, 0x30, 0x2F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x59, 0xF4, 0xFB ]) mode_fan = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x07, 0x01, 0x10, 0x33, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x43, 0xF4, 0xFB ]) mode_dry = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x01, 0x01, 0x70, 0x33, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9D, 0xF4, 0xFB ]) speed_mute = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0B, 0xF4, 0xFB ]) speed_low = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xED, 0xF4, 0xFB ]) speed_med = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xEF, 0xF4, 0xFB ]) speed_max = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF1, 0xF4, 0xFB ]) speed_auto = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xE9, 0xF4, 0xFB ]) temp_16_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF4, 0xF4, 0xF4, 0xFB ]) temp_17_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF6, 0xF4, 0xFB ]) temp_18_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF8, 0xF4, 0xFB ]) temp_19_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFA, 0xF4, 0xFB ]) temp_20_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFC, 0xF4, 0xFB ]) temp_21_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFE, 0xF4, 0xFB ]) temp_22_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xF4, 0xFB ]) temp_23_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0xF4, 0xFB ]) temp_24_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0xF4, 0xFB ]) temp_25_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0xF4, 0xFB ]) temp_26_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0xF4, 0xFB ]) temp_27_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0A, 0xF4, 0xFB ]) temp_28_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0C, 0xF4, 0xFB ]) temp_29_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0E, 0xF4, 0xFB ]) temp_30_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0xF4, 0xFB ]) temp_31_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x12, 0xF4, 0xFB ]) temp_32_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x14, 0xF4, 0xFB ]) temp_61_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4E, 0xF4, 0xFB ]) temp_62_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x50, 0xF4, 0xFB ]) temp_63_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x52, 0xF4, 0xFB ]) temp_64_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x54, 0xF4, 0xFB ]) temp_65_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x56, 0xF4, 0xFB ]) temp_66_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, 0xF4, 0xFB ]) temp_67_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5A, 0xF4, 0xFB ]) temp_68_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5C, 0xF4, 0xFB ]) temp_69_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x5E, 0xF4, 0xFB ]) temp_70_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x60, 0xF4, 0xFB ]) temp_71_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x62, 0xF4, 0xFB ]) temp_72_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x64, 0xF4, 0xFB ]) temp_73_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x66, 0xF4, 0xFB ]) temp_74_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x68, 0xF4, 0xFB ]) temp_75_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6A, 0xF4, 0xFB ]) temp_76_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6C, 0xF4, 0xFB ]) temp_77_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x6E, 0xF4, 0xFB ]) temp_78_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x70, 0xF4, 0xFB ]) temp_79_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9F, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x72, 0xF4, 0xFB ]) temp_80_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x74, 0xF4, 0xFB ]) temp_81_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA3, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x76, 0xF4, 0xFB ]) temp_82_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA5, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x78, 0xF4, 0xFB ]) temp_83_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA7, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7A, 0xF4, 0xFB ]) temp_84_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA9, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7C, 0xF4, 0xFB ]) temp_85_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAB, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7E, 0xF4, 0xFB ]) temp_86_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0xF4, 0xFB ]) temp_87_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x82, 0xF4, 0xFB ]) temp_88_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB1, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x84, 0xF4, 0xFB ]) temp_89_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB3, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x86, 0xF4, 0xFB ]) temp_90_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB5, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x88, 0xF4, 0xFB ]) turbo_on = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x41, 0xF4, 0xFB ]) turbo_off = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x39, 0xF4, 0xFB ]) energysave_on = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0xF4, 0xFB ]) energysave_off = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xE7, 0xF4, 0xFB ]) display_on = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x93, 0xF4, 0xFB ]) display_off = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xF4, 0xFB ]) sleep_1 = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x05, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xEF, 0xF4, 0xFB ]) sleep_2 = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF1, 0xF4, 0xFB ]) sleep_3 = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x05, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF3, 0xF4, 0xFB ]) sleep_4 = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x05, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF5, 0xF4, 0xFB ]) sleep_off = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xE9, 0xF4, 0xFB ]) vert_dir = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x14, 0xF4, 0xFB ]) vert_swing = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x94, 0xF4, 0xFB ]) hor_dir = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF7, 0xF4, 0xFB ]) hor_swing = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x17, 0xF4, 0xFB ]) temp_to_F = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xD6, 0xF4, 0xFB ]) temp_to_F_reset_temp = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4A, 0xF4, 0xFB ]) temp_to_C = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xD4, 0xF4, 0xFB ]) temp_to_C_reset_temp = bytes([ 0xF4, 0xF5, 0x00, 0x40, 0x29, 0x00, 0x00, 0x01, 0x01, 0xFE, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF0, 0xF4, 0xFB ])bannhead-pyaehw4a1-e4c978d/pyaehw4a1/exceptions.py000066400000000000000000000024221370044036000220370ustar00rootroot00000000000000class AehW4a1Error(Exception): """Base class for exceptions in this module.""" pass class ConnectionError(AehW4a1Error): """Exception raised for errors in connection.""" def __init__(self, message): self.message = message class HostError(AehW4a1Error): """Raised when host is invalid or missing.""" def __init__(self, message): self.message = message class UnkCmdError(AehW4a1Error): """Raised when command is not implemented.""" def __init__(self, message): self.message = message class UnkPacketError(AehW4a1Error): """Raised when packet is unknown.""" def __init__(self, message): self.message = message class UnkDataError(AehW4a1Error): """Raised when data is unknown.""" def __init__(self, message): self.message = message class WrongRespError(AehW4a1Error): """Raised when response is wrong.""" def __init__(self, message): self.message = message class WrongArgError(AehW4a1Error): """Raised when argument is wrong.""" def __init__(self, message): self.message = message class NoNetworksError(AehW4a1Error): """Raised when no network interfaces.""" def __init__(self, message): self.message = messagebannhead-pyaehw4a1-e4c978d/pyaehw4a1/responses.py000066400000000000000000000131301370044036000216750ustar00rootroot00000000000000from enum import Enum ''' Based on XM rev.3.2.6 from https://github.com/htqwe22/device/blob/96f355b12da33c1c187f9d31cace1b02abcf2446/src/protocol/protocol.h Testing AC (multi split unit) has XM rev 4.4.6 ''' class ResponsePacket(Enum): correct_3_0 = bytes([ 0xF4, 0xF5, 0x01, 0x40, 0x0B, 0x01, 0x00, 0xFE, 0x01, 0x01, 0x01, 0x01, 0x00, 0x03, 0x00, 0x01, ]) correct_3_1 = bytes([ 0xF4, 0xF5, 0x01, 0x40, 0x0B, 0x01, 0x00, 0xFE, 0x01, 0x01, 0x01, 0x01, 0x00, 0x03, 0x01, 0x01, ]) correct_7_1 = bytes([ 0xF4, 0xF5, 0x01, 0x40, 0x0F, 0x01, 0x00, 0xFE, 0x01, 0x01, 0x01, 0x01, 0x00, 0x07, 0x01, 0x01, ]) correct_10_4 = bytes([ 0xF4, 0xF5, 0x01, 0x40, 0x0D, 0x01, 0x00, 0xFE, 0x01, 0x01, 0x01, 0x01, 0x00, 0x0A, 0x04, 0x01, ]) correct_101_0 = bytes([ 0xF4, 0xF5, 0x01, 0x40, ]) correct_102_0 = bytes([ 0xF4, 0xF5, 0x01, 0x40, 0x49, 0x01, 0x00, 0xFE, 0x01, 0x01, 0x01, 0x01, 0x00, 0x66, 0x00, 0x01, ]) correct_102_64 = bytes([ 0xF4, 0xF5, 0x01, 0x40, 0x1C, 0x01, 0x00, 0xFE, 0x01, 0x01, 0x01, 0x01, 0x00, 0x66, 0x40, 0x01, ]) class _Data_102_0(Enum): wind_status = (1, 8) # air volume sleep_status = (9, 7) # sleep mode_status = (17, 4) # mode run_status = (21, 1) # Run direction_status = (23, 2) # wind direction indoor_temperature_setting = (25, 8) # indoor temperature indoor_temperature_status = (33, 8) # indoor temperature indoor_pipe_temperature = (41, 8) # indoor tube temperature value indoor_humidity_setting = (49, 8) # indoor humidity indoor_humidity_status = (57, 8) # indoor humidity somatosensory_temperature = (65, 8) # body temperature somatosensory_compensation = (73, 5) # Somatosensory compensation somatosensory_compensation_ctrl = (78, 3) # Somatosensory compensation control temperature_compensation = (81, 5) # temperature compensation temperature_Fahrenheit = (87, 1) # Fahrenheit display timer = (89, 8) hour = (97, 8) minute = (105, 8) poweron_hour = (113, 5) poweron_minute = (121, 6) poweron_status = (128, 1) poweroff_hour = (129, 5) poweroff_minute = (137, 6) poweroff_status = (144, 1) drying = (145, 4) wind_door = (149, 4) up_down = (153, 1) # Up and down left_right = (154, 1) # Left wind nature = (155, 1) # natural wind heat = (156, 1) # heating wind low_power = (157, 1) # energy saving low_electricity = (158, 1) # Power saving efficient = (159, 1) # efficient dual_frequency = (160, 1) # Double frequency dew = (161, 1) # fresh swap = (162, 1) # Change the wind indoor_clear = (163, 1) # indoor cleaning outdoor_clear = (164, 1) # Outdoor cleaning smart_eye = (165, 1) # wisdom eye mute = (166, 1) # mute voice = (167, 1) # voice smoke = (168, 1) # except smoke back_led = (169, 1) # background light display_led = (170, 1) # display indicate_led = (171, 1) # light indoor_led = (172, 1) # indoor and outdoor switching lights filter_reset = (173, 1) # Filter reset left_wind = (174, 1) # Left wind right_wind = (175, 1) # right wind indoor_electric = (176, 1) # indoor power board auto_check = (177, 1) # Self-test time_laps = (178, 1) # timelapse rev23 = (179, 4) sample = (183, 1) # sample indoor_eeprom = (184, 1) # eeprom indoor_temperature_sensor = (185, 1) indoor_temperature_pipe_sensor = (186, 1) indoor_humidity_sensor = (187, 1) indoor_water_pump = (188, 1) indoor_machine_run = (189, 1) indoor_bars = (190, 1) indoor_zero_voltage = (191, 1) indoor_outdoor_communication = (192, 1) display_communication = (193, 1) keypad_communication = (194, 1) wifi_communication = (195, 1) electric_communication = (196, 1) eeprom_communication = (197, 1) rev25 = (198, 3) compressor_frequency = (201, 8) compressor_frequency_setting = (209, 8) compressor_frequency_send = (217, 8) outdoor_temperature = (225, 8) outdoor_condenser_temperature = (233, 8) compressor_exhaust_temperature = (241, 8) target_exhaust_temperature = (249, 8) expand_threshold = (257, 8) UAB_HIGH = (265, 8) UAB_LOW = (273, 8) UBC_HIGH = (281, 8) UBC_LOW = (289, 8) UCA_HIGH = (297, 8) UCA_LOW = (305, 8) IAB = (313, 8) IBC = (321, 8) ICA = (329, 8) generatrix_voltage_high = (337, 8) generatrix_voltage_low = (345, 8) IUV = (353, 8) rev46 = (361, 3) four_way = (364, 1) outdoor_machine = (365, 1) wind_machine = (366, 3) rev47 = (369, 8) rev48 = (377, 8) rev49 = (385, 8) rev50 = (393, 8) rev51 = (401, 8) rev52 = (409, 8) rev53 = (417, 8) rev54 = (425, 8) rev55 = (433, 8) rev56 = (441, 8) def __init__(self, offset, length): self.offset = offset self.length = length class _Data_102_64(Enum): ONE_KWH_I = (1, 8) ONE_KWH_F = (9, 8) ONE_KWH_D = (17, 8) KWH_DAY = (25, 8) KWH_WEEK_H = (33, 8) KWH_WEEK_L = (41, 8) KWH_MONTH_H = (49, 8) KWH_MONTH_L = (57, 8) KWH_QUARTER_H = (65, 8) KWH_QUARTER_L = (73, 8) KWH_HALFYEAR_H = (81, 8) KWH_HALFYEAR_L = (89, 8) KWH_YEAR_H = (97, 8) KWH_YEAR_L = (105, 8) KWH_H = (113, 8) KWH_SH = (121, 8) KWH_SL = (129, 8) KWH_L = (137, 8) def __init__(self, offset, length): self.offset = offset self.length = length class DataPacket(Enum): data_102_0 = _Data_102_0 data_102_64 = _Data_102_64bannhead-pyaehw4a1-e4c978d/setup.py000066400000000000000000000015361370044036000172200ustar00rootroot00000000000000import pyaehw4a1 import setuptools from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setuptools.setup( name='pyaehw4a1', version=pyaehw4a1.__version__, description='Python interface for Hisense AEH-W4A1 module', long_description=long_description, long_description_content_type='text/markdown', url='https://github.com/bannhead/pyaehw4a1', author='Davide Varricchio', author_email='davide.varricchio@gmail.com', license='Apache 2.0', packages=setuptools.find_packages(), classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Topic :: Home Automation", ], )