1182 Commits

Author SHA1 Message Date
David Conran
56d5352e1b Fujitsu: Update supported A/C models (#1702)
Add ASTG18K & ASTG09K models

Ref: #1701
2021-12-17 08:15:57 +10:00
Max Prokhorov
31432b4ef4 Remove extra const qualifier for char pointer (#1704)
Just like IRtext.cpp macro for flash strings, this does not make sense in the context

Fixing warnings similar to this
```
.pio/libdeps/d1_mini/IRremoteESP8266/src/IRac.cpp:3272:13: note: in expansion of macro 'STRCASECMP'
 3272 |            !STRCASECMP(str, kUpStr))
      |             ^~~~~~~~~~
.pio/libdeps/d1_mini/IRremoteESP8266/src/IRac.cpp: In static member function 'static stdAc::swingh_t IRac::strToSwingH(const char*, stdAc::swingh_t)':
.pio/libdeps/d1_mini/IRremoteESP8266/src/IRac.cpp:59:23: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
   59 |     strcasecmp_P(LHS, reinterpret_cast<const char* const>(RHS))
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
2021-12-16 13:15:48 +10:00
Henry Gabryjelski
082bf30b34 Reduce build warnings (#1700)
Fixes #1699
2021-12-14 16:00:53 +10:00
David Conran
81da75d85b Add basic support for COOLIX48 protocol. (#1697)
* As far as we can tell COOLIX48 is a subtle version of `COOLIX` but does not obey the "every second byte is inverted" verification pattern. Thus, COOLIX48 is twice the bit size of COOLIX (24 bits).
* This seems to be used by a Bosch A/C to transmite On & Off timer values.
* Update & Extend Coolix Unit tests to cover this.
* Other minor code style changes.

Fixes #1694
2021-12-07 20:33:57 +10:00
David Conran
fb6cd13450 TCL: Update supported devices. (#1698)
Ref: https://github.com/crankyoldgit/IRremoteESP8266/issues/1528#issuecomment-986285469
2021-12-06 16:11:10 +10:00
David Conran
3f871e4b79 ESP32-C3: Work around for some C3 specific compiler issues. (#1696)
Seems the experimental Arduino support for the ESP32-C3 is a bit more finicky than the other environments.
Work around those issues by forcing the compiler to chose the correct `std::min()` & `std::max()` routines by casting the arguments.

Fixes #1695
2021-12-06 15:50:25 +10:00
Nikolaj Nøhr-Rasmussen
0f2ff1455a MITSUBISHI_AC: Added support for i-SAVE mode. (#1666)
* Added support for reading i-SAVE mode from a remote for Mitsubishi MSZ-FHnnVE A/C
* Added mode modes which is supported by MZS-FH series. (unknown if existing in other series):
  - I-See mode
  - Absense Detect mode
  - Ecocool mode
  - Natural Flow mode
2021-11-30 17:56:16 +10:00
David Conran
187c533aad TOSHIBA_AC: Add Filter setting support. aka. Pure. (#1693)
* Add `setFilter()` & `getFilter()`.
* Add filter support for Toshiba in `IRAc` class.
* Minor code style/formating cleanup.
* Update & add unit tests for code coverage and verification.

Fixes #1692
2021-11-30 05:03:57 +10:00
David Conran
94080aa9ad Fujitsu: Update supported devices (#1690)
Add AR-REB4E remote (ARREB1E) to supported devices.

Fixes #1689
2021-11-26 16:29:49 +10:00
David Conran
c657b27f3b Airton: Add detailed A/C support. (#1688)
* Add checksum verification to `decodeAirton()`.
* Add detailed support for Airton AC's via `IRAirtonAc` class.
  - Power
  - Temp
  - Mode
  - Fan Speed
  - SwingV
  - LED/Light/Display
  - Health/Filter
  - Turbo
  - Econo/Eco
  - Sleep
* Add `AIRTON` to `IRac` common API.
* Add unit test coverage for new changes.

H/T to @PtilopsisLeucotis for working out the checksum alg. Kudos!

Fixes #1670
2021-11-23 00:06:57 +10:00
David Conran
7b13d24a89 v2.8.0 release (#1682)
## _v2.8.0 (20211119)_

**[Bug Fixes]**
- Fix compilation issue when using old 8266 Arduino Frameworks. (#1639 #1640)
- Fix potential security issue with `scrape_supported_devices.py` (#1616 #1619)

**[Features]**
- SAMSUNG_AC
  - Change `clean` setting to a toggle. (#1676 #1677)
  - Highest fan speed is available without Powerful setting. (#1675 #1678)
  - Change `beep` setting to a toggle. (#1669 #1671)
  - Fix Beep for AR12TXEAAWKNEU (#1668 #1669)
  - Add support for Horizontal Swing & Econo (#1277 #1667)
  - Add support for On, Off, & Sleep Timers (#1277 #1662)
  - Fix power control. Clean-up code & bitmaps from Checksum changes. (#1277 #1648 #1650)
- HAIER_AC176/HAIER_AC_YRW02
  - Add support A/B unit setting (#1672)
  - Add support degree Fahrenheit (#1659)
  - Add support `Lock` function (#1652)
  - Implement horizontal swing feature (#1641)
  - Implement Quiet setting. (#1634 #1635)
- Basic support for Airton Protocol (#1670 #1681)
- HAIER_AC176: Add Turbo and Quiet settings (#1634)
- Gree: Add `SwingH` & `Econo` control. (#1587 #1653)
- MIRAGE
  - Add experimental detailed support. (#1573 #1615)
  - Experimental detailed support for KKG29A-C1 remote. (#1573 #1660)
- ELECTRA_AC: Add support for "IFeel" & Sensor settings. (#1644 #1645)
- Add Russian translation (#1649)
- Add Swedish translation (#1627)
- Reduce flash space used. (#1633)
- Strings finally in Flash! (#1493 #1614 #1623)
- Add support for Rhoss Idrowall MPCV 20-30-35-40 A/C protocol (#1630)
- Make `IRAc::opmodeToString()` output nicer for humans. (#1613)
- TCL112AC/TEKNOPOINT: Add support for `GZ055BE1` model (#1486 #1602)
- Support for Arris protocol. (#1598)
- SharpAc: Allow position control of SwingV (#1590 #1594)

**[Misc]**
- HAIER_AC176/HAIER_AC_YRW02
  - Replace some magic numbers with constants (#1679)
  - Small fix `Quiet` and `Turbo` test (#1674)
  - Fix `IRHaierAC176::getTemp()` return value description (#1663)
- Security Policy creation and changes. (#1616 #1617 #1618 #1621 #1680)
- IRrecvDumpV2/3: Update PlatformIO envs for missing languages (#1661)
- IRMQTTServer
  - Use the correct string for Fan mode in Home Assistant. (#1610 #1657)
  - Move a lot of the strings/text to flash. (#1638)
- Minor code style improvements. (#1656)
- Update Supported Devices
  - HAIER_AC176 (#1673)
  - LG A/C (#1651 #1655)
  - Symphony (#1603 #1605)
  - Epson (#1574 #1601)
  - GREE (#1587 #1588)
  - SharpAc (#1590 #1591)
- Add extra tests for LG2 protocol (#1654)
- Fix parameter expansion in several macros.
- Move some strings to `IRtext.cpp` & `locale/default.h` (#1637)
- RHOSS: Move include and defines to their correct places (#1636)
- Make makefile only build required files when running `run-%` target (#1632)
- Update Portuguese translation (#1628)
- Add possibility to run specific test case (#1625)
- Change `googletest` library ignore (#1626)
- Re-work "Fan Only" strings & matching. (#1610)
- Address `C0209` pylint warnings. (#1608)
v2.8.0
2021-11-20 07:43:33 +10:00
David Conran
5f6e3daa12 [AIRTON] Update working status
Has been confirmed working by the user.
Fixes #1670
2021-11-19 10:31:19 +10:00
David Conran
0f4956619e SamsungAc: Change clean setting to a toggle. (#1677)
Fixes #1676
2021-11-19 05:57:23 +10:00
David Conran
38408c52c3 Basic support for Airton Protocol (#1681)
* `sendAirton()` & `decodeAirton()` added.
* Unit test coverage added.

For #1670
2021-11-18 07:14:04 +10:00
Ptilopsis Leucotis
d9deca1150 [HAIER_AC176] Replace some magic numbers with constants (#1679)
* Replace magic numbers `22` with `kHaierAC176StateLength` value
2021-11-15 19:05:43 +10:00
David Conran
931e2ddf8b Moved specifics of Security Policy to github.io page. (#1680)
Original `SECURITY.md` has been moved to the `gh-pages` branch so it shows up only on the web, not in the git branch itself.

Per #1618 & #1617 it was moved because only release packages may contain old details, and this way there is only one canonical location/copy etc.

Fixes #1617
Fixes #1618
2021-11-15 19:04:47 +10:00
Ptilopsis Leucotis
3f82ade941 [HAIER_AC176/HAIER_AC_YRW02] Add support A/B unit setting (#1672)
* [HAIER_AC176/HAIER_AC_YRW02] Add support A/B unit setting

* Add `model` parameter in `IRac::haier176()`
* Add `Model` parameter in `IRHaierAC176` state
* Add `getModel()` and `setModel()` methods
* Bump heap size for `toString()` method
* Update `toString()` and `modelToStr()` methods
* Rename `Button` from `kHaierAcYrw02ButtonCF` to `kHaierAcYrw02ButtonCFAB`
* Add new and update related tests
2021-11-14 14:18:23 +03:00
David Conran
42ebfd3e43 [SAMSUNG_AC] Highest fan speed is available without Powerful setting. (#1678)
Per user feedback, it seems the highest fan speed is just a normal fan speed, not locked behind `setPowerful(true)` as previous thought.

Fixes #1675
2021-11-13 16:23:35 +10:00
Ptilopsis Leucotis
a727486f7c [HAIER_AC176/HAIER_AC_YRW02] Small fix Quiet and Turbo test (#1674)
* Mark `Quiet` and `Turbo` as supported in `toCommon` test
2021-11-12 05:52:37 +03:00
David Conran
291f13badc SamsungAc: Change beep setting to a toggle. (#1671)
* Use the `beep` bit as a toggle setting.
* Update `IRSamsungAc` & `IRac` classes.
* Revise unit tests accordingly.

Fixes #1669
2021-11-12 07:37:55 +10:00
Ptilopsis Leucotis
6c5826616f [HAIER_AC176] Update supported remotes (#1673)
* Add Haier `V9014557 M47 8D` remote
* Add Daichi `D-H` remote

Daichi `D-H` remote is rebranded Haier `V9014557 M47 8D` remote
2021-11-12 07:36:18 +10:00
xorbital
d8960688ce Fix Beep for AR12TXEAAWKNEU (#1668)
The bit for Beep needs to be at this different location.

For #1669
2021-11-11 13:23:54 +10:00
David Conran
817517cc36 SamsungAc: Add support for Horizontal Swing & Econo (#1667)
* Update swing functions to work with both vertical & horizontal.
* Add Econo setting control.
* Add extra bit related to sleep timer mode.
* Extend & update unit tests.
* Remove old/redundant TODOs.
* Move some internal constants to the .cpp file.
* Bump string allocation in `toString()`.

For https://github.com/crankyoldgit/IRremoteESP8266/issues/1277#issuecomment-962655308
2021-11-11 00:45:36 +10:00
David Conran
1c50b6970f [Gree] Add SwingH & Econo control. (#1653)
* Add `(set|get)SwingHorizontal()` & `(set|get)Econo()` methods.
* Integrate into `IRac` class.
* Update unit tests etc.
* Fix typo in supported brand name.

For #1587
2021-11-10 15:11:16 +10:00
David Conran
4c96689b18 [MIRAGE] Experimental detailed support for KKG29A-C1 remote. (#1660)
* Add support for KKG29A-C1 model.
  - IFeel
  - Sensor Temp
  - Quiet
  - Filter (UVC)
  - Clean
  - On & Off Timers
  - SwingH
* Add model detection.
* Add support to `IRac` class.
* Add & Update existing unit tests.
* Update supported models.

For #1573
2021-11-10 15:03:55 +10:00
Ptilopsis Leucotis
44512c9be0 Fix IRHaierAC176::getTemp() return value description (#1663)
In fact, `IRHaierAC176::getTemp()` return temperature in unit, dependent on `UseFahrenheit` value.
2021-11-07 02:09:08 +03:00
David Conran
01c92ca6c8 [SamsungAc] Add support for On, Off, & Sleep Timers (#1662)
* Merge Powerful & Breeze bit settings.
* Add basics for setting and decoding On, Off, & Sleep timers in extended messages.
* Unit testing for timer functions.
* Remove optional checksum calcs from `send()` & `sendExtended()` since checksums now work fine.
* Improve logic for when an Extended Message needs to be sent.
* Add `sleep` support for SamsungAc to `IRac`.
* Change some parameters/variable names to better suiting names.
* Update supported devices.

Fixes #1277
2021-11-07 05:27:24 +10:00
Ptilopsis Leucotis
21f26e0483 [HAIER_AC176/HAIER_AC_YRW02] Add support degree Fahrenheit (#1659)
* Add support degree Fahrenheit
* Update IRac
* Add button `Celsius/Fahrenheit`
* Update related tests
2021-11-04 12:13:18 +03:00
David Conran
0f3fa4de0a [IRrecvDumpV2/3] Update PlatformIO envs for missing languages (#1661)
* Force Russian to be built in the Continuous Integration.
* Add missing languages to IRrecvDumpV3.
2021-11-02 12:15:41 +10:00
David Conran
49bfe4c404 Use the correct string for Fan mode in Home Assistant. (#1657)
Home assistant needs the text for "Fan" mode to be "fan_only". i.e. the Underscore is important.
Problem was introduced in #1610
2021-10-29 14:51:39 +10:00
David Conran
eac9597b02 Minor code style improvements. (#1656)
* Alphabetically sort `resultAcToString()` & `decodeToState()` switch/case items.
2021-10-29 14:51:00 +10:00
David Conran
9f46927446 Update supported LG A/C devices. (#1655)
Per https://github.com/crankyoldgit/IRremoteESP8266/issues/1651#issue-1034929110
2021-10-29 14:50:20 +10:00
David Conran
fae62c8461 Add extra tests for LG2 protocol (#1654)
Confirm non-issue with how `IRac` handles LG(2) swingv by reproducing what Tasmota _should_ be doing with user input.

For #1651
Ref #1513
2021-10-28 19:45:59 +10:00
David Conran
b2baf3ad1a SamsungAC: Fix power control. Clean-up code & bitmaps from Checksum changes. (#1650)
* Remove "signature" checks, as they were flat out wrong. We were trying to use the checksum as a fixed signature. This caused some messages to fail to decode on the ESP.
* Add second location for Power setting that was missing.
  - Fixes Power Off problems.
* Streamline some code.
* Clean up some code style formatting.
* Remove bad assumptions of bits that controlled settings that were actually located in the checksum bytes.
* Write a huge unit test to simulate and verify the code in Issue #1648 should do the correct thing.

Fixes #1648
Ref #1277
2021-10-26 17:04:38 +10:00
Ptilopsis Leucotis
045b3b4a47 [HAIER_AC176/HAIER_AC_YRW02] Add support Lock function (#1652)
`Lock` used to lock buttons on IR remote to prevent unintended operations.

* Add `getLock()` and `setLock()` methods
* Increase from 4 to 5 bits button's code in `HaierAc176Protocol`
* Add `Timer` and `Lock` button's codes
* Update tests
2021-10-26 09:54:12 +10:00
David Conran
86dee2d661 [ELECTRA_AC] Add support for "IFeel" & Sensor settings. (#1645)
* Add `(set|get)IFeel()`, `(set|get)SensorTemp()`, & `(set|get)SensorUpdate()` methods.
* Add and update Unit test coverage.

For #1644

Co-Authored-By: @Aculeasis
2021-10-25 14:11:53 +10:00
Ptilopsis Leucotis
d6fca6be6e Add Russian translation (#1649) 2021-10-25 14:07:49 +10:00
David Conran
203a61e7d0 Mirage: Add experimental detailed support. (#1615)
* Add detailed support for:
  - Power
  - Temp
  - Fan speed
  - Turbo
  - Clock
  - Sleep
  - Light
  - SwingV
* Unit test coverage for what we have so far.
* Update `IRac` class.
* Enforce checksum verification for the protocol.
* Update supported devices.

Fixes #1573
2021-10-24 22:16:25 +10:00
jimmys01
f5915bc28b Fix parameter expansion in several macros.
245f9c64c9

@TD-er for more info
2021-10-21 21:14:13 +10:00
Ptilopsis Leucotis
429c9fac17 [HAIER_AC176/HAIER_AC_YRW02] Implement horizontal swing feature (#1641)
* Rename Swing to SwingV for vertical swing
* Add horisontal swing feature
* Update and add unit tests
* Increase heap size for `IRHaierAC::toString()`
2021-10-20 18:57:45 +10:00
David Conran
9f79eddef1 Fix compilation issue when using old 8266 Arduino Frameworks. (#1640)
* Try to add backward compatibility to older 8266 Arduino frameworks
* Add code comments to document why this has been done.
* Doesn't seem to be required as of 3.0.0 of the ESP8266 Arduino Framework/platform code.
  - The fix doesn't seem to hurt either way. 🤷 

Fixes #1639

Co-authored-by: @jimmys01
2021-10-17 06:01:26 +10:00
David Conran
df27ef5acf [IRMQTTServer] Move a lot of the strings/text to flash. (#1638)
* Instead of using Global Ram, move a lot of the strings to Flash, thus freeing up the more valuable ram.
* Minor code style clean-ups.
* Disable use of the Power Command topic in the discovery message when MQTT_CLIENT_HA_MODE is enabled.
* Version bump to v1.6.0.

Saves about ~3.8k of Ram for the cost of about 0.2k of extra Flash & Binary size on the ESP8266 platform.

Tested on an ESP8266 NodeMCU and d1_mini.
2021-10-14 09:17:25 +10:00
David Conran
db426e4278 Move some strings to IRtext.cpp & locale/default.h (#1637)
* Move all string literals from `IRac.cpp` to `IRtext.cpp` & locale.
* Move some string literals out of `IRutils.cpp`
  - Move out some strings/reuse flash strings.
  - Add missing `ARREW4E` to `strToModel()`
  - Minor code style/formatting changes.
2021-10-13 15:34:02 +10:00
tomrosenback
738082a232 [RHOSS] Move include and defines to their correct places (#1636)
Minor code-style updates.

Co-authored-by: Tom Rosenback <tom@carputec.com>
2021-10-12 23:24:45 +10:00
David Conran
e31313976c [HAIER_AC176/HAIER_AC_YRW02] Implement Quiet setting. (#1635)
* Change `setTurbo()` & `getTurbo()` to operate on Booleans only.
* Add `setQuiet()` & `getQuiet()` methods.
* Limit Quiet & Turbo to `Cool` & `Heat` operating modes.
* Quiet & Turbo are mutually exclusive.

* Improve unit testing.
* General code style cleanups.

Ref #1634
FYI @PtilopsisLeucotis
2021-10-12 18:38:02 +10:00
Ptilopsis Leucotis
1cb83e086a [HAIER_AC176] Add Turbo and Quiet settings (#1634)
* Change Beep value to True
Haier AC have beep sounds always on.
* Add common representation turbo and quiet settings
2021-10-12 07:34:41 +10:00
David Conran
6997b2c57f Reduce flash space used. (#1633)
* Add `addToggleToString()` helper routine
Remove duplicate code & strings and replace with new routine.
* Add `__FlashStringHelper*` versions of some string handling methods (ESP8266 Only)
For what ever reason (probably saved `String` conversions) this reduces the Flash usage by ~5K.
e.g.
IRrecvDumpV2:
  - Before:
RAM:   [====      ]  35.5% (used 29072 bytes from 81920 bytes)
Flash: [====      ]  35.8% (used 373421 bytes from 1044464 bytes)
  - After:
RAM:   [====      ]  35.5% (used 29072 bytes from 81920 bytes)
Flash: [====      ]  35.3% (used 368397 bytes from 1044464 bytes)

H/T to @mcspr for the idea.

Confirmed working on a NodeMCU running IRrecvDumpV2.
2021-10-11 20:21:56 +10:00
tomrosenback
5bef3d3572 Make makefile only build required files when running run-% target (#1632)
Co-authored-by: Tom Rosenback <tom@carputec.com>
2021-10-11 19:45:02 +10:00
tomrosenback
2e16e385c6 Add support for Rhoss Idrowall MPCV 20-30-35-40 A/C protocol (#1630)
- Add send and decode routines
- Add support for:
  - Power
  - Temp (Celsius)
  - Swing
  - Mode
  - Fan Speed
  - Checksums
- Add Unit tests

Co-authored-by: Tom Rosenback <tom@carputec.com>
2021-10-09 08:09:32 +10:00
David Conran
1beea0c586 Strings finally in Flash! (#1623)
Finally convince the compiler to store the text strings into flash.

Saves approx 2k of Global ram, for a trade-off of between ~0-0.5k of extra flash space used.

e.g. _(updated)_
* IRMQTTServer example code:
  - Before:
RAM:   [=====     ]  54.1% (used 44344 bytes from 81920 bytes)
Flash: [=====     ]  54.2% (used 566209 bytes from 1044464 bytes)
Bin file size = 570368
  - After:
RAM:   [=====     ]  51.3% (used 41992 bytes from 81920 bytes)
Flash: [=====     ]  54.2% (used 566201 bytes from 1044464 bytes)
Bin file size = 570352

* IRrecvDumpV2 example code:
  - Before:
RAM:   [====      ]  37.9% (used 31044 bytes from 81920 bytes)
Flash: [====      ]  35.6% (used 372025 bytes from 1044464 bytes)
Bin file size = 376176
  - After:
RAM:   [====      ]  35.5% (used 29072 bytes from 81920 bytes)
Flash: [====      ]  35.7% (used 372525 bytes from 1044464 bytes)
Bin file size = 376672

Fixes #1614
Fixes #1493

Co-authored with @mcspr
2021-10-09 08:04:55 +10:00