TheEebb / tasmota-tuyamcu-fix

Tasmota Tuya MCU Fix Fork For Testing Only
GNU General Public License v3.0
12 stars 3 forks source link

New tasmota, is this still needed? #3

Open beren12 opened 3 years ago

beren12 commented 3 years ago

There's been some tuya mcu work done this winter according to the changelog. Is this branch still needed? I flashed my new dimmers with it but there are some nice features in 9.x that I'd love to have. Do you think you have time to update this, or possibly even make a PR so they can merge it? Thanks for the great work btw!

beren12 commented 3 years ago

Looks like it is

TheEebb commented 3 years ago

I can certainly update this. However, the changes maybe too broad for a pull request. It really depends on whether they'll accept this as is. I don't have the time to strip it down to whatever their standards may be. The original idea was to make a robust module that could adapt to current and future Tuya MCU devices. However, it does not appear that things are going in that direction.

beren12 commented 3 years ago

They did make some changes to the Tuya code recently but it doesn't fix the issue. I know they would at least look at your patch if you made a PR (easiest way is to click the fork button on their repo, commit the changes and click the "Make Pull Request" button

beren12 commented 3 years ago

Add a writeup of what the changes do and I don't see them not merging it in some form at least.

beren12 commented 3 years ago

I can certainly update this. However, the changes maybe too broad for a pull request. It really depends on whether they'll accept this as is. I don't have the time to strip it down to whatever their standards may be. The original idea was to make a robust module that could adapt to current and future Tuya MCU devices. However, it does not appear that things are going in that direction.

From what I understand though it's trivial to replace the non-esp with an esp on most of the new devices so it's still useful to some people.

digiblur commented 3 years ago

I can certainly update this. However, the changes maybe too broad for a pull request. It really depends on whether they'll accept this as is. I don't have the time to strip it down to whatever their standards may be. The original idea was to make a robust module that could adapt to current and future Tuya MCU devices. However, it does not appear that things are going in that direction.

From what I understand though it's trivial to replace the non-esp with an esp on most of the new devices so it's still useful to some people.

Very much so, plus very addicting to do a transplant.

TheEebb commented 3 years ago

Add a writeup of what the changes do and I don't see them not merging it in some form at least.

That's typically not how it works. The person submitting does all the work. Submitting a PR means you send it. Listen to feedback. Make the changes they request. Resubmit. If they don't like something- rinse and repeat. With a module and wholesale changes this can be time consuming.

Anyway, I dug into the new 9.3 code and significant changes were made to how communication with the web interface happens. Additionally RGB support was added. I decided to put some time into stripping down the existing 8.5 code and rewriting it for 9.3. This should make the code changes in 9.3 minimal and less intrusive. It should also make it simpler to submit a PR.

This means there will be a delay updating my build. I'm only able to sporadically work on this rewrite.

beren12 commented 2 years ago

Any chance you'll have time to work on this soon? You seem to really understand the issues like nobody else.

oldgeezy commented 2 years ago

My FEIT Costco dimmers are only working with this branch. With ESPHome and the latest version of Tasmota, eventually the MCU locks up and it stops responding to commands from the ESP module. But then version 8.5.0.1 doesn't support MQTT auto-discovery (SetOption19 0) so they don't show up properly under the Tasmota integration. I have no idea what's involved in revising this to a newer base version. But you all would be doing me a huge favor if you could.

btsimonh commented 1 year ago

@oldgeezy - try: https://github.com/btsimonh/Tasmota/wiki/Current-Binaries It's 11 based, and resolves some Tuya issues related to the serial communications. Be sure you can reflash to 8.5 before you upgrade (you may want to ensure you have a bench device with serial programming access - 8.5->11 was a pig for me). And let me know? (source is this branch: https://github.com/btsimonh/Tasmota/tree/TuyaUpdate)

beren12 commented 1 year ago

While interesting, this code is 18months behind. I’ve been using v12 and it’s still broken I just deal with it atm. Any chance you are going to rebase it on the current code?

btsimonh commented 1 year ago

yeah, I've been a little lax on keeping my open source contributions up to date. It would be interesting to know if it resolves the specific issues described here.

brandondb1 commented 4 months ago

My FEIT Costco dimmers are only working with this branch. With ESPHome and the latest version of Tasmota, eventually the MCU locks up and it stops responding to commands from the ESP module. But then version 8.5.0.1 doesn't support MQTT auto-discovery (SetOption19 0) so they don't show up properly under the Tasmota integration. I have no idea what's involved in revising this to a newer base version. But you all would be doing me a huge favor if you could.

I edited the 8.5 version's MQTT a bit to conform to the new MQTT standards in HASS - it seems to work fine for me (not Feit dimmers but seemingly very similar) and autodiscovers using MQTT and the older Home Assistant discovery (SetOption19 1). You just need to change val_tpl to stat_val_tpl and compile it.

btsimonh commented 4 months ago

note recent updates to the tuyav2 driver https://github.com/arendst/Tasmota/pull/20950 plus a couple of prior PRs - they relate to further dimmer issues. (not my work - but building on what I did - but I've not tested with MY faulty tuya dimmers...).

beren12 commented 2 months ago

Haven't tried v14 yet, but v13 still doesn't always turn the dimmers on in the morning or when I get home, but never seems to have issues turning off.