1182 Commits

Author SHA1 Message Date
benjy3gg
c0117617b9 Add basic support for clima-butler (52bit) RCS-SD43UWI (#1815)
Add basic support for clima-butler RCS-SD43UWI
* Add `sendClimaButler()` & `decodeClimaButler()` for basic protocol support.
* Bit order has been confirmed via temperature analysis.
* Add unit tests to cover the new code.

For #1812

Co-authored-by: beko <benjy3gg@gmail.com>
Co-authored-by: crankyoldgit <david@xyzzy.com.au>
2022-06-04 17:46:34 +10:00
David Conran
335196459e Remove pylint disable=no-self-use (#1817)
This disable is no longer valid. These methods use `self` now.
2022-06-04 08:41:06 +10:00
David Conran
0f9485700f TOTO: An experimental _(s)wipe_ at support for Toto Toilets. (#1811)
* Add `sendToto()` and `decodeToto()` routines.
   - Supports two (2) bit sizes, 24 (short) & 48 (long) bit codes.
   - Includes/assumes a standard bit prefix to ensure it fits into a `uint64_t`.
   - `Xor` integrity check.
   - LSBF order based on user analysis. 

* Update supported devices.
* Add unit tests to cover new changes.

_Legs crossed_, this should do it for the _Number Two_ toilet protocol supported by this library.
_Roll_ on the next one.

Fixes #1806
2022-05-25 01:37:49 +10:00
Nicola Bontempelli
c41ce9da1f Fujitsu General: update supported devices (#1813)
Add the Fujitsu General "AR-JW17" remote as a supported device (tested with Tasmota IR and IRrecvDumpV3)
2022-05-24 09:02:32 +10:00
林柏臣
4adcc7bcde DAIKIN: Update supported devices (#1808)
Add A/C unit & remote model info to known supported devices.
Replaces #1807
2022-05-18 07:09:39 +10:00
David Conran
85189e2fc6 CARRIER_AC128: Experimental Basic support for Carrier AC 128bit protocol. (#1798)
* Add `sendCarrierAC128()` & `decodeCarrierAC128()` methods.
* Basic unit test coverage for new protocol.
* Update supported model info.

For #1797
2022-05-17 14:36:12 +10:00
David Conran
b185e321ae HAIER_AC160: Add basic support for Haier 160bit protocol. (#1805)
* Add `sendHaierAC160()` & `decodeHaierAC160()` routines
* Update supported models.
* Add & update unit tests to cover new code.
* Fix some missing precompiler logic.

For #1804
2022-05-17 12:46:15 +10:00
David Conran
3c6b057579 DAIKIN: Add basic support for 200-bit Daikin protocol. (#1803)
* Add `sendDaikin200()` & `decodeDaikin200()` routines
* Checksum verification added.
* Update related text & routines.
* Add unit tests coverage for the above.


Capture verified on real device per:
  https://github.com/crankyoldgit/IRremoteESP8266/issues/1802#issuecomment-1125100799

For #1802
2022-05-13 12:51:48 +10:00
David Conran
5275a96af5 Fujitsu: Update supported remote info. (#1801)
Document that OGeneral AR-RCL1E remote works with the library.

For #1794
2022-05-10 18:32:54 +10:00
crankyoldgit
922c44df98 DAIKIN128: Update supported devices
Updating per https://github.com/crankyoldgit/IRremoteESP8266/issues/1754#issuecomment-1121027594
2022-05-10 16:35:26 +10:00
David Conran
b073fa93f0 Voltas: Add link to manual for 122LZF A/C. (#1800)
Xref: #1238 
Fixes #1799
2022-05-09 07:19:55 +10:00
s-hadinger
21804f5bdf Fix #if for DECODE_COOLIX48 (#1796)
Fix a typo/bad cut & paste.
2022-05-06 18:44:05 +10:00
David Conran
9192b688a5 Daikin128: Additional unit test. (#1795)
Add a unit test to confirm we can correctly generate a known-good "Heat" mode message/state.

For #1754
2022-05-06 15:19:59 +10:00
David Conran
452a502bf0 FUJITSU: Improve handling of 10C Heat mode. (#1788)
* Better detect 10C heat mode.
* Report the temp as 10C when we detect it.
* Allow 10C heat mode to be activated via `IRac` interface.
  - Requires the following settings to activtate:
    - Suitable model (e.g. ARRAH2E or ARREW4E)
    - Mode: Fan
    - Fan Speed: Auto
    - Clean: True
    - SwingV: Off
    - SwingH: Off

* Update supported fujitsu models.
* Unit tests adjusted and added.

For #1780
2022-05-06 12:39:14 +10:00
David Conran
8b3539667d MIDEA: Update supported devices (#1791)
Add A/C unit & remote model info to known supported devices.

Replaces #1790
2022-04-27 16:45:28 +10:00
David Conran
a2f79550dd FUJITSU: Improve handling of short (command only) messages. (#1784)
* add previous state support to `toCommon()`
Try to better keep the settings if we can when using the `IRac` class interface, if supplied a previous state. This better handles the short commands that don't have most of the settings in them.
Add unit tests to ensure it works as expected.
* Change `toString()` behaviour.
If we only have info from a _real_ short (command only) message, don't report other settings.
This makes text for single messages more accurate.
If the Class's state has been modified synthetically, report all the settings.

For #1780
2022-04-14 19:18:19 +10:00
David Conran
1e2c1d845c Add missing prevs to decodeToState() (#1783)
Add passing the previous state for `DAIKIN128` & `KELON` when decoding to a state.

Found during code audit.
2022-04-03 06:59:01 +10:00
David Conran
434582a462 v2.8.2 release (#1777)
##_v2.8.2 (20220314)_

**[Bug Fixes]**
- ESP32-C3: Fix reboot/crashes on ESP32-C3s when receiving. (#1768 #1751)

**[Features]**
- HITACHI_AC296: Add `IRac` class support & tests. (#1776 #1758 #1757)
- Support for Hitachi RAS-70YHA3 (remote RAR-3U3) (#1758 #1757)
- LG: Add Swing Toggle support for Model `LG6711A20083V` (#1771 #1770)
- IRMQTTServer: add `MQTT_SERVER_AUTODETECT_ENABLE` via mqtt mDNS (#1769)
- Experimental basic support for Kelon 168 bit / 21 byte protocol. (#1747 #1745 #1744)
- MitsubishiAC: Tweak repeat gap timing. (#1760 #1759)
- Gree YAP0F8 (Detected as Kelvinator) vertical position set support (#1756)
- Make KELON (48 bit) protocol decoding stricter. (#1746 #1744)
- IRMQTTServer V1.6.1 (#1740 #1739 #1729)
- HITACHI_AC264: Add minimal detailed support. (#1735 #1729)
- LG2: Improve Light toggle msg handling. (#1738 #1737)
- MIDEA: Add support for Quiet, Clean & Freeze Protect controls. (#1734 #1733)
- Add basic support for HITACHI_AC264 264bit protocol. (#1730 #1729)
- ESP32-C3: Work around for some C3 specific compiler issues again. (#1732 #1695)

**[Misc]**
- MIDEA: Update supported devices (#1774 #1773 #1716)
- Update devices supported by ELECTRA_AC (#1766 #1765)
- Improve documentation for `encodePioneer()` (#1761 #1749)
- Update (un)supported DAIKIN128 devices. (#1752)
- Refactor `decodeCOOLIX()` code & add another test case. (#1750 #1748)
- Simplify code based on state_t being initialised by default. (#1736 #1699)
- Add comments to help Teknopoint users. (#1731 #1728)
- Fix library version string calculation. (#1727 #1725)
- Confirm we can reproduce `TurnOnFujitsuAC.ino` via IRac/IRMQTTServer. (#1726 #1701)
v2.8.2
2022-03-15 12:21:28 +10:00
David Conran
f63b9be67b HITACHI_AC296: Add IRac class support & tests. (#1776)
* Fix max temp issue.
* Set special temp for auto operation mode.
* Merge into the `IRac` class so it is supported fully.
* Add `.toString()` output.
* Add real & synthetic decoding examples.
* General code style cleanup(s).
* Add supporting Unit Tests.

Ref: #1758
Fixes #1757
2022-03-14 08:36:44 +10:00
Jeff Knaggs
434f65e996 Support for Hitachi RAS-70YHA3 (remote RAR-3U3) (#1758)
Add support for Hitachi RAS-70YHA3 (remote RAR-3U3). Fixes #1757

This PR provides some initial support for the RAR-3U3 remote. It works of initial research [found here](https://perhof.wordpress.com/2015/03/29/reverse-engineering-hitachi-air-conditioner-infrared-remote-commands/).
2022-03-13 21:20:14 +10:00
David Conran
8f7510986e MIDEA: Update supported devices (#1774)
Add a bunch of supported Lennox (MIDEA) A/Cs per PR #1773

For #1716
2022-03-11 20:41:28 +10:00
David Conran
3a43819894 LG: Add Swing Toggle support for Model LG6711A20083V (#1771)
* Detect swingv toggle messages and set appropriate model.
* Allow sending of swingv toggle messages.
* Update supported models info
* Various collateral updates.
* Minor code cleanup.
* Supporting unit tests.

* Confirmed working on real device by requester.

Fixes #1770
2022-03-09 19:24:11 +10:00
David Conran
d2fa206719 [BUG] ESP32-C3: Fix reboot/crashes on ESP32-C3s when receiving. (#1768)
- Seems an irrecv gpio of `14` was a poor default for the ESP-C3. Using it causes a reboot.
  - Using `10` for the input GPIO avoids the reboot.
- Ensure when we allocate/use a system timer, that it actually succeeds.
  - ESP32-C3 only has two system timers (0 & 1). Try to automatically cater for that scenario.
  - Add extra debug messages
  - Add a run-time assert to check it succeeded.

Fixes #1751
2022-03-09 09:00:14 +10:00
Helen Koike
c053aa58a8 IRMQTTServer: add MQTT_SERVER_AUTODETECT_ENABLE via mqtt mDNS (#1769)
The MQTT broker can change address if its IP is not static.

Add MQTT_SERVER_AUTODETECT_ENABLE option which detects the broker that
advertises the service _mqtt._tcp

If the broker changes address it won't be a problem. If the broker
doesn't advertise the service, then use the pre-configured IP as before.

Example testing on Debian:
```bash
$ apt install mosquitto avahi-daemon

$ cat <<EOT >> /etc/mosquitto/conf.d/my_broker.conf
listener 1883 0.0.0.0
allow_anonymous true
EOT

$ cat <<EOT >> /etc/avahi/services/mqtt.service
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
  <name replace-wildcards="yes">%h</name>
  <service protocol="ipv4">
    <type>_mqtt._tcp</type>
    <port>1883</port>
  </service>
</service-group>
EOT

$ systemctl start mosquitto
$ systemctl start avahi-daemon
```

Co-authored-by: Helen Koike <helen@koikeco.de>
Co-authored-by: David Conran <crankyoldgit@users.noreply.github.com>
2022-03-08 09:49:35 +10:00
David Conran
846daf518b Update devices supported by ELECTRA_AC (#1766)
Per user report.

Fixes #1765
2022-02-26 21:10:02 +10:00
David Conran
673d38eba1 Experimental basic support for Kelon 168 bit / 21 byte protocol. (#1747)
* Add `sendKelon168()` & `decodeKelon168()`
* Add & extend unit test coverage.
* Code style cleanup.

For #1745
Ref #1744
2022-02-20 23:09:22 +10:00
David Conran
a3e2c81fe2 Improve documentation for encodePioneer() (#1761)
Add notes about how to use it if the Address is `0`.

Fixes #1749
2022-02-15 16:24:57 +10:00
David Conran
789b926b67 MitsubishiAC: Tweak repeat gap timing. (#1760)
* Update supported devices
* Decrease gap between repeat messages by 1.6ms to improve capture of messages.
* Add/update unit tests accordingly.

Fixes #1759
2022-02-15 16:23:21 +10:00
invis-z
8b1bfc37ec Gree YAP0F8 (Detected as Kelvinator) vertical position set support (#1756)
This should not break the compatibility since the SwingV option is getting expanded and the bit indicating auto is still set correctly.
2022-02-12 17:28:51 +10:00
David Conran
6bc095af80 Update (un)supported DAIKIN128 devices. (#1752)
Ref: https://github.com/crankyoldgit/IRremoteESP8266/issues/827#issuecomment-1025008970
2022-01-30 14:55:48 +10:00
David Conran
c5b36c8d37 Refactor decodeCOOLIX() code & add another test case. (#1750)
* Remove the old auto scaling version of the code. It made it harder to diagnose problems.
* Use `decodeGeneric()` as much as we can, and decode in whole 8-bit chuncks at a time.
* Try to make the code more understandable and smaller.
* Standardise on the same extra tolerance for Coolix protocols.
* Add a unit test to confirm the library now matches the provided example that was previously slight out of tolerance.

Fixes #1748
2022-01-30 08:20:33 +10:00
David Conran
f8e5662776 Make KELON (48 bit) protocol decoding stricter. (#1746)
* Ensure checking of inter-message gap is being done.
  - Fixes a false positive detection.
* Code style cleanup.
* Ensure result address & commands are cleared.
* Add unit tests based on Discussion #1744
* Improve older unit tests by confirming capture code is correct.

Ref #1744
2022-01-28 17:24:13 +10:00
David Conran
ccb8542de1 IRMQTTServer V1.6.1 (#1740)
- Fix the case when `MQTT_CLIMATE_HA_MODE` is enabled & Home Assistant is NOT being used, and `power` is turned off via the http interface, that it also sets the `mode` to Off, and viceversa. Mode "Off" also sets Power "Off".
- Move some literal strings to constants for consistency.
  - Helps with potential internationalisation.
- Bump version patch number.

Ref #1729
Fixes #1739
2022-01-20 20:57:33 +10:00
David Conran
91a528ec1e HITACHI_AC264: Add minimal detailed support. (#1735)
* Supports Power, Temp, Mode, & Fan speed. That's it.
  - Effectively a parent class of `IRHitachiAc424`.
* Add `IRac` integration.
* Update & add unit tests.

Fixes #1729
2022-01-20 11:04:13 +10:00
David Conran
030b4033d2 LG2: Improve Light toggle msg handling. (#1738)
Don't override previous settings if the current message being processed is a Light Toggle message.

Confirmed working.

Fixes #1737
2022-01-19 04:53:42 +10:00
David Conran
9228143207 Simplify code based on state_t being initialised by default. (#1736)
* Ensure all `state_t` structs are initialised.
* Remove (now) redundant code.
* Add unit tests to confirm operation.

Ref #1699
2022-01-14 22:38:35 +10:00
David Conran
9da665c7e4 MIDEA: Add support for Quiet, Clean & Freeze Protect controls. (#1734)
* Add support for Quiet setting controls.
* Add support for Clean and Freeze Protect toggle controls/settings/logic.
* Add & update unit test coverage.
* Minor code and output cleanup.
* Update supported model info.

Fixes #1733
2022-01-13 13:30:38 +10:00
David Conran
93af543dcb Add basic support for HITACHI_AC264 264bit protocol. (#1730)
* Add send (`sendHitachiAc264()`) & decode support.
* Add unit tests coverage including real world data.
* Fix up some typos.
* Minor refactor of some code.

For #1729
2022-01-09 21:17:38 +10:00
André Klitzing
d3c8abc544 ESP32-C3: Work around for some C3 specific compiler issues again. (#1732)
This is a sibling of 3f871e4b79.

Fixes #1695
2022-01-09 13:14:38 +10:00
David Conran
3fc7a9830a Add comments to help Teknopoint users. (#1731)
Add comments to help direct Teknopoint users to the `IRTcl112Ac` class.

Ref: #1728
2022-01-08 07:21:58 +10:00
David Conran
97e62d0477 Fix library version string calculation. (#1727)
* Fix library version string calculation.
* Add unit tests to ensure calculation isn't broken in future.

Fixes #1725
2022-01-07 08:46:31 +10:00
David Conran
ac8bb30705 Confirm we can reproduce TurnOnFujitsuAC.ino via IRac/IRMQTTServer. (#1726)
Extra Unit test to prove nothing is broken.

For #1701
2022-01-06 04:03:32 +10:00
David Conran
c64fa1d25f v2.8.1 release (#1719)
## _v2.8.1 (20220101)_

**[Bug Fixes]**
- Arduino ESP32 Core v2.0.2+ crashes due to our timer hack. (#1715 #1713 )
- SONY: Fix old Sony CD-Player Remote (12 Bit) (#1714)

**[Features]**
- Add tool to convert protocol & code to raw timing info. (#1708 #1707 #1703)
- Add basic support for COOLIX48 protocol. (#1697 #1694)
- MITSUBISHI_AC: Added support for i-SAVE mode. (#1666)
- TOSHIBA_AC: Add Filter setting support. aka. Pure. (#1693 #1692)
- Airton: Add detailed A/C support. (#1688 #1670)

**[Misc]**
- Add a structured library version number. (#1717)
- Workflows Split UnitTests (#1712)
- Reduce time for workflow/Build (#1709)
- Fix some compiler & linter warnings (#1699 #1700)
- Fujitsu: Update supported A/C models (#1690 #1689 #1702 #1701)
- Remove extra `const` qualifier for char pointer (#1704)
- TCL: Update supported devices. (#1698)
- ESP32-C3: Work around for some C3 specific compiler issues. (#1696 #1695)
v2.8.1
2022-01-01 19:15:43 +10:00
David Conran
369a98d8bb [BUG] Arduino ESP32 Core v2.0.2+ crashes due to our timer hack. (#1715)
* arduinoespressif32 Version 2+ no longer needs the horrible timer hack.
Later versions of the arduino esp32 framework change how hardware timers work, so our hack breaks spectularly.

Check for when we are using V2.0.0+ and use the normal commands to do the hardware timers, otherwise, for older versions, keep the hack.

* Avoid using EDGE trigger on timer Interrupt as it is not supported apparently.

Fixes #1713
2022-01-01 07:42:22 +10:00
David Conran
92625c7438 Add a structured library version number. (#1717)
Allow a structured integer library version numbering system so that programs can make pre-compiler descissions if needed.

Reconstruct library version numbering consistency checks to use new scheme.

Make sure there is only one canonical location for the version number in C++ land. i.e. _IRREMOTEESP8266_VERSION_ & _IRREMOTEESP8266_VERSION_STR are synthetically constructed from MAJOR, MINOR, & PATCH numbers.

Use `_IRREMOTEESP8266_VERSION_STR` instead of `_IRREMOTEESP8266_VERSION_` in our examples.
2021-12-31 21:59:30 +10:00
Frank
d55e227ec0 Fix old Sony CD-Player Remote (12 Bit) (#1714)
Uses 12 bits, 12*2 + 1 - 1 + 1 = 26, so the first length check fails (returns false with exactly 26)
This PR changes this test from <=26 to < 26, and the Remote starts working.
2021-12-28 23:46:38 +10:00
Christian Nilsson
3e8b386718 Workflows Split UnitTests (#1712)
Run Tools on its own, separate steps to get more timing info
2021-12-27 21:43:40 +01:00
Christian Nilsson
709af240c4 Reduce time for workflow/Build (#1709)
* Add .pio build cache
* Use matrix in github Build workflow (parallel run)
* Workflow Build use better cache keys
2021-12-24 08:08:24 +01:00
David Conran
705c8c4ace Add tool to convert protocol & code to raw timing info. (#1708)
* Add tool to convert protocol & code to raw timing info.

Usage: tools/code_to_raw --protocol PROTOCOL_NAME --code <hexidecimal> [--bits 1-424] [--timinginfo]

e.g.
```
# Convert an A/C code to rawData[] & Timinginfo
tool/code_to_raw --protocol KELVINATOR --code 0x190B8050000000E0190B8070000010F0 --timinginfo

# Convert a Samsung TV code to rawData[].
tools/code_to_raw --protocol SAMSUNG --code 0xE0E09966
# Convert a Sony 12 bit message to rawData[].
tools/code_to_raw --protocol Sony --code 0xf50 --bits 12
```

* Add some tests for `code_to_raw`.
* Update tools Makefile to be more dynamic

For #1707
For #1703

Co-authored-by: Christian Nilsson <nikize@gmail.com>
2021-12-23 21:06:56 +10:00
Henry Gabryjelski
e53505d6af Fix some compiler & linter warnings
* Revert PR #1700 as intialisation/zero is better with `{}`.
* Address compiler warning via removing `typedef`
* Adjust indention to fix linter issues.

For #1699 

Co-authored-by: David Conran <crankyoldgit@users.noreply.github.com>
2021-12-18 21:51:07 +10:00