kuba2k2 wrote: Did you know that Tuya has official MCU protocol documentation? With everything explained in English in a .PDF file...
Haha I am not sure if you are referring to me or to the guy who wanted to copy Tasmota. Anyway, I am well aware about their documentation, there is even more - there is an Arduino Library for that purpose on Github. It's just as I said, I tend to write my stuff with the core assumption that
I have to understand the protocol first in order to use it the best I can and I am sorry if you think that's a wrong approach and would rather just copy & paste code.
Futhermore, I have strongly modified the TuyaMCU approach, because in my case, there is a concept called "channel" and it maps to TuyaMCU variables seamlessly and allows future scripting.
Did I mention that TuyaMCU Dimmers are already working?
Someone helped me support them with a
pull request
Here is how you setup such device in OpenBeken (those are script commands, you type them without recompiling software):
startDriver TuyaMCU
setChannelType 1 toggle
setChannelType 2 dimmer
tuyaMcu_setDimmerRange 0 1000
linkTuyaMCUOutputToChannel 1 1 1
linkTuyaMCUOutputToChannel 2 2 2
Function names and the general inner workings are designed to be flexible and intuitive and I am doing my best to
avoid hardcoding per-device hacks in C code like people sometimes do.
Also, did you know that I already support scripted events (in Tasmota, they have Rules, they are both similiar):
setPinRole 10 Btn
setPinChannel 10 0
setPinRole 11 Btn
setPinChannel 11 0
setPinRole 26 PWM
setPinChannel 26 1
setEventHandler OnClick 10 setChannel 1 100
setEventHandler OnHold 10 addChannel 1 10
setEventHandler OnClick 11 setChannel 1 0
setEventHandler OnHold 11 addChannel 1 -10
With the script above, I can seamlessly control TuyaMCU dimmer with two extra buttons with multiple functions for click and holds. Everything without recompiling.
kuba2k2 wrote:
Sure, I think I can do this. Yes, GitHub workflows would need to be recreated, but I bet there are many PIO workflows readily available. Also, we would need only one workflow for all platforms.
As I said, I will be happy to accept that if you make sure that's working with github build system. I have nothing against PlatformIO and I think it's a good idea, it's just as I said, at the current point of development I think I won't gain much from doing it myself. A have a queue of devices to support.
opfer15 wrote:
Still have the WBR3 Modules. As they're most likley not useable to any of us without a HA compatible FW i have to swap them at a given time and probably loose some of the feature set. There is also the possibility to swap it with an esp32-C3, which i just ordered 2 modules of. But as you statet (on github i think) it's a waste of a good mcu and i don't like the idea to waste them too
If you wanna work on it, i'll send you a parcel with one or two WB3 modules. GER to PL is just 5€. Or if you want to support the strip in total, i'll send you 10 bucks so it ain't that expensive anymore.
It would be better to get modules, as you don't have a use of them anyway. I also don't trust aliexpress much because in last year it started having more common tax issues. I am not sure if "over 20$ has no customs" rule still applies, I am not up to speed with the import tax duties. I buy my stuff on Bg with shipping from Czech.
Btw - take a look what I got today:
So if you want to donate modules, thanks, send me a private message here.
They are ESP12F form, right? So maybe I can solder them on ESP12F breakout board...