Python liberary/Utility to generate A/C IR signals
Project description
#pyhvac
THIS IS WORK IN PROGRESS
LG is not tested. "auto" mode for Sharp J-Tech is flaky
Although most of the devices associated with IRremoteESP8266 seems to produce reasonable output, this has, obviously, not been checked.
pyhvac is a Python 3 library/utility to generate IR code for A/C device.
This library uses code/work from:
- Scott Kyle https://gist.github.com/appden/42d5272bf128125b019c45bc2ed3311f
- mat_fr https://www.instructables.com/id/Reverse-engineering-of-an-Air-Conditioning-control/
- user two, mathieu, vincent https://www.analysir.com/blog/2014/12/27/reverse-engineering-panasonic-ac-infrared-protocol/
- all the people who contributed to https://github.com/crankyoldgit/IRremoteESP8266
Installation
We are on PyPi so
pip3 install pyhvac
or
python3 -m pip install pyhvac
After installation, the utility
gaccode, gcpanasonic, gcdaikin, gclg, gcsharp
can be used to generate codes. Use the -h option for help.
Note that the utilities cannot fully excercise all the capabilities of their respective plugin.
For instance, the code for a Sharp A/C can depend on the state of the device. gcsharp does not keep track of the
state of the device.
Library
pyhvac uses plugin to add support.
Each plugin file must have a
PluginObject
class that must have a "get_device" method to return HVAC objects, a 'brand' attribute and a 'models' attribute containing a dictionary matching models to objects. Note that brand and models MUST BE lowercased.
Each HVAC object describes a specific way of generating codes for IR transmission.
The codes should be returned as a list of bytes in either lsb or msb format. The HVAC object must have its "is_msb" attribute set to False or True accordingly.
All HVAC objects are required to have at the minimum 2 capabilities:
mode with at least "off" and another value ("auto", "cool", ....)
temperature with the accepted range
Other capabilities are expected.
To simplify things, it is requested that some sort of normalization of function names occur. In most cases an AC unit will have the following
mode: the operating mode. Values are expected to be amongst
"off" turned off (This is mandatory)
"auto" automatic mode sometines known as "feel", "ai", ...
"cool" Cooling
"heat" Heating
"dry" dehumidifying
"fan" fan mode only
temperature: The full range of temperatures. If there
are 2 distinct ranges for cooling or heating,
the union should be used here.
The attribute 'temperature_step' can be used to
specify fractioanl temperature e.g. 0.5, 0.1
fan: The air flow power. Values are expecterd to be amongst
"auto" Automatic mode
lowest The lowest air flow setting
low
medium
high
highest
When there are only 3 modes, highest, medium and lowest should be used if possible
swing: The use of the vertical orientation of the air flow..
It can be a switch on/off (values 'off' and 'on') or more complex
auto automatic (in many cases similar to the on/off switch function)
ceiling up up up
90° Horizontal orientation
60°
45°
30°
0° Vertical orientation
Many other functions are possible, but still some canonization is recommended.
For instance, many manufactures trademarked their air purifying technology: nanoe, nanoex (Panasonic), plasmacluster (Sharp), plasma (LG).... In this case it is recommended to use the name "purifier" for that functionm
The HVAC object offers to convenience methods: to_lirs, to transform the frames into lirc codes to_broadlink, to trnaform the frames into Broadlink compatible codes
TO BE CONTINUED
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pyhvac-0.0.4-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c10a85c5b97afbc4c824b063a21889a969e553964d8d7ec775585abed87438c |
|
MD5 | 874ad53c6d3c3cd872ebb03fc3cf62b4 |
|
BLAKE2b-256 | a1a14027320b2dd08c98760fda6be8e6c6ca4e4a7c585ceaa60b10dc8e39f5e4 |
Hashes for pyhvac-0.0.4-cp312-cp312-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a252370a6b0acb336151b6770cbd9a08f276349389e31ccf00f6b60adeb97d3c |
|
MD5 | 5f1e9bba4560b5636f0e256db9a4b8e8 |
|
BLAKE2b-256 | 0a3ffb0953c139276a1df2ae3b914887a8b31a29932dfc49f3ff2c81ab1e3337 |
Hashes for pyhvac-0.0.4-cp312-cp312-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3357ab6745879651b681eaa1d095134305b5a3d224673c5ceee30cb36db19711 |
|
MD5 | d078163664b193720edbfb0ff9e4d97c |
|
BLAKE2b-256 | e0a77ea894931ba3b89e34d05290d7956871af1840ac47d78f6c30ba54e5769b |
Hashes for pyhvac-0.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83e0ba2d27c3d668558aa1406d6de372ce05e9ba3f450d11bfc5b8024304aa40 |
|
MD5 | 25c4389d9bd307699d20c240f704c45c |
|
BLAKE2b-256 | 1046e490a33ea45c09186ea4b30adf55a2b49fe8f879502b0693fdeb6c2b5146 |
Hashes for pyhvac-0.0.4-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d74e8bb73a23efbc3f072b02b351508b450d65cea400bf28f629a518ea1f492e |
|
MD5 | d293fddbc6078e66c96b91d6ec65f404 |
|
BLAKE2b-256 | 07e5699273301cd6dab8098530eae78178ca51b34c8cb1d50f94a4bbd186e5a5 |
Hashes for pyhvac-0.0.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62cdd8c49591008176eade1fbe2c21a0f89f3f8a55e41eca7e4aaa9f2b3ea2d3 |
|
MD5 | b93d12709889ac7b71b25f4fb39d482c |
|
BLAKE2b-256 | 9f241036d01fe53cc85cdc5d3af1efc9d61377427c67809f6f760ab37ce6e089 |
Hashes for pyhvac-0.0.4-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5e45af9d6c081d72378cac7eed721e1767d0e02acc81d1f4332217efa5acdce |
|
MD5 | b6635d786b23784948acc555120fbfa7 |
|
BLAKE2b-256 | 5e8dad3b34da37ba0bdc6868e853dd11c4b895e4f31c4501c2653602b0127215 |
Hashes for pyhvac-0.0.4-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce5d81d5ce02e087a12468a66cc311e6e1c597bb28efb2d57eb52d1d95ef0b57 |
|
MD5 | 2b0deb3f2742c670e1bcc0752873d5e7 |
|
BLAKE2b-256 | 2bef2de0007290b8f5d85b68226fe1c59b49855bde089f13db4098d56ed6447a |
Hashes for pyhvac-0.0.4-cp311-cp311-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20d513b5193111944c5f9ae13421b21693d746d7e5fc708f6540590125f0f0d0 |
|
MD5 | 977f553730fc27938e843eae478a4abe |
|
BLAKE2b-256 | ed486d4d72ae3959227e1cd25017071978898d36a0a2eee0cd970ecadba6640b |
Hashes for pyhvac-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55e197ace9a48092c956611850b709b5f15bcd446be68e66ddb176cc97270269 |
|
MD5 | 34036f4d40e43679b3fa082303e3a871 |
|
BLAKE2b-256 | a033cf09324a3dbcf672998f542f9c6bdad3922251a127b7d5f43dce6e46a036 |
Hashes for pyhvac-0.0.4-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa7ecc6840aabcb368a3f7bd4e9a45bf7b558b1802846f6db42a0c6a77fac994 |
|
MD5 | 47cfa3260ccaadb6ce54e75bd3863768 |
|
BLAKE2b-256 | 398f3c9b77a07f31f0aff3c6b76936694191498af4e4b73c257389af1282ee84 |
Hashes for pyhvac-0.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 893891a49b59ad4bf88bee0e075950b1b81d7ca5bd72b59a6af4e754a82390c3 |
|
MD5 | b42b775e417d72d4d0081a98196f978a |
|
BLAKE2b-256 | 1aa3b6e16458e1bd8effa1faed1bb330b9cdc3494f77b806839e6dbeff75e831 |
Hashes for pyhvac-0.0.4-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e3e558f4282f8cca062be0d81d1ed83878d0fc313857133af98c2660793c5a7 |
|
MD5 | 1d6d1a58c564ca4dd7d22ef39b350063 |
|
BLAKE2b-256 | b473c93d7b9c7c59f95f86823f2159e323b0a3a2f08629e0e0a23c9554ae9439 |
Hashes for pyhvac-0.0.4-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a632118a7d6a3e4f61fe6876772d18c780edd0ecc8429dca43771dfcf49c733f |
|
MD5 | 759f6206415f98a9cc057456e91e90d1 |
|
BLAKE2b-256 | 10ef73aa1cf2d78e64bfc7116fe0c03fa4d16218f5f5fdb1b3622c41871cb98d |
Hashes for pyhvac-0.0.4-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1ffa7a0ac21e2c5d45cf2fdab599923ffc619b546385da1b9528fe8e1b470b0 |
|
MD5 | 5a7e1eeaf8a71f1543c871aa9817dd99 |
|
BLAKE2b-256 | 414e6086e6b4b826944349fc3c776e39915cdd69c7b42e4e591b43a9ce7538e1 |
Hashes for pyhvac-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b95e622b3d76ee8be8324cd012ec418702d415ed978e1358846fb3b52e46b71 |
|
MD5 | 0c10210f205d49e8fcde40a1e46f3aa5 |
|
BLAKE2b-256 | b0a412b979f8dd5162bab690177edd9f83d950200629c0c91b0eabba085bf034 |
Hashes for pyhvac-0.0.4-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42451ff02e9a3fafc35af1f5267f47d71f9c915a86b3bcadca5e50b44a985ca6 |
|
MD5 | e06aeb97e4a173dcbd745c40667d136d |
|
BLAKE2b-256 | 1d1f018cb6bb5ab4c2266c378bce4c1a4126cd942bf5e5574484fd8b2d760517 |
Hashes for pyhvac-0.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16b955b18f5e90210b95766fd70d99c7d946962b0c4439761d5e88fb004b7840 |
|
MD5 | e137c1eebac5ac3f94c9499537200b12 |
|
BLAKE2b-256 | 126bd198acec0eaad70e36050d7ac99700bd3225e518583a402f79f274fc2059 |