arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.02k stars 4.78k forks source link

Tasmota 12.1.0 brakes IRSend repeat for Panasonic TVs #17677

Closed Saur0o0n closed 1 year ago

Saur0o0n commented 1 year ago

PROBLEM DESCRIPTION

After upgrade to Tasmota v12.3.1 Percy, I've noticed I cannot turn on the TV with my IR sender/blaster. Getting back, one by one upgrade, last working version is 12.0.2. It looks like perhaps pull " Support for multiple IRsend GPIOs #16138 " brakes something in protocol.

The issued command (that is working on 12.0.2) is: irsend {"Protocol":"PANASONIC","Bits":48,"Data":"0x40040100BCBD","DataLSB":"0x22080003DBD","Repeat":5}

The TV is turning on with the same ircode as turning off (or channel number) but repeated quickly 4 times.

In all cases I've used pre-compiled, official binary tasmota-ir.bin.gz. All other irsend commands work's properly.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [x] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
21:57:10.702 CMD: Backlog Rule1; Rule2; Rule3
21:57:10.721 MQT: stat/tasmota_65B81C/RESULT = {"Rule1":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
21:57:10.951 MQT: stat/tasmota_65B81C/RESULT = {"Rule2":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
21:57:11.201 MQT: stat/tasmota_65B81C/RESULT = {"Rule3":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
- [ ] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:

TO REPRODUCE

Send "irsend {"Protocol":"PANASONIC","Bits":48,"Data":"0x40040100BCBD","DataLSB":"0x22080003DBD","Repeat":5}" on Tasmota 12.0 - this will turn on the Panasonic TH TV. Upgrade to anything newer (12.1+) - this won't work. Downgrade again, it will work again.

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen.

SCREENSHOTS

So I thought for a while, that the repeating time has changed (it's too slow) - because it was enough to send one additional remote button push, while Tasmota was sending proper irsend, and TV was turning on. To check this I've recorded video (slowmo) of the original remote, Tasmota ir sender and synced them on start - but there is no visible difference in the pause between sending repeats with 12.0 and 12.1 (but still this can be an issue). Although original remote has shorter gap window then Tasmota. https://youtu.be/nDQawmt1tDo On the left - original remote, on the right Tasmota 12.1 on bottom Tasmota 12.0 (working one).

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue was automatically closed because of being stale. Feel free to open a new one if you still experience this problem.

Saur0o0n commented 1 year ago

What a relief.. it's fixed by being closed.

barbudor commented 1 year ago

If you suspect the change "Support for multiple IRsend GPIOs" to be the cause, could you please test:

Saur0o0n commented 1 year ago

The binary from 3rd august is working properly (and reporting version as 12.0.2.4). How can I see the tree of the development binaries to find the first one that's not working?

barbudor commented 1 year ago

Hi @Saur0o0n

So the change for multiple GPIOs is not in cause

The development builds are archived in that repo : https://github.com/tasmota/install/tree/main/firmware/development

Other PR I see regarding IR are:

To find a version go there ("History" from the above link) : https://github.com/tasmota/install/commits/main/firmware/development ANd use the buttons at the bottom to navigate Yes, it's painfull Once you have a date, choose one of the line (to be sure you are before or after the PR, I suggest to pick the day before and the day after) and use the one before last button on the right (View at this point in History) There you click on your firmware and choose the Download button on the right

Let me know if you have any question

Saur0o0n commented 1 year ago

Hi So this are my testings (i was going back by month untill it was working) by date: 31.12.2022 - nok 30.11.2022 - nok 31.10.2022 - nok 30.09.2022 - nok 31.08.2022 - nok 15.08.2022 - nok 9.08.2022 - nok 8.08.2022 - nok 7.08.2022 - ok 6.08.2022 - ok 29.07.2022 - ok

From this it seams like this IR fix for esp32 (https://github.com/arendst/Tasmota/commit/5915ffdc48de3da82a879b5043a1261b64a1cab8) brakes it for my Panasonic TV (probably also others :) )

barbudor commented 1 year ago

Awesome analysis @Saur0o0n

@s-hadinger It looks like this PR of yours has broken some protocols on ESP8266

My understanding is that what you changed is impacting the behavior during transmission Initially the lib was disabling the interrupts but now they are no more disabled so the interrupt handler is always called and the recvstate is taken care there.

Could this disturb the real-time enough to break the protocols ?

Wouldn't it be safer to keep the detachInterrupt() ?

barbudor commented 1 year ago

I'm trying something

@Saur0o0n what binary would you need for testing ? tasmota-ir ?

barbudor commented 1 year ago

@Saur0o0n If you could try this, please let me know, thanks

tasmota-ir_test1.zip

(https://github.com/arendst/Tasmota/compare/development...barbudor:Tasmota:fox_ir_panasonic_esp8266)

Saur0o0n commented 1 year ago

Yep, the one from zip works fine :)

barbudor commented 1 year ago

Thanks I'll PR the change https://github.com/arendst/Tasmota/pull/18013