logo elektroda
logo elektroda
X
logo elektroda

Compatibility of Kruidvat Smart Remote with OpenBK Flashed Devices and MQTT Linking

mihaim1980 1362 16
ADVERTISEMENT
  • ADVERTISEMENT
  • #2 20823184
    p.kaczmarek2
    Moderator Smart Home
    Hello, can you provide more information on this remote? Is it based on IR, or RF, or something else?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20823527
    mihaim1980
    Level 4  

    It has WR3 chip Electronic circuit WR3 on a map background. [img-1] Interior of a plastic casing with electronic components. Disassembled remote control with batteries removed, showing interior and model label. Printed circuit board with WR3 module and electronic component markings. Printed circuit board with a WR3 module mounted on it.
  • #4 20823592
    p.kaczmarek2
    Moderator Smart Home
    WR3 support is planned in the near future, but it's not currently functional. Please wait and check Elektroda from time to time, I will post the update when something changes. Still, it's interesting to see a WiFi module being used in a remote.
    Helpful post? Buy me a coffee.
  • #5 20823786
    mihaim1980
    Level 4  

    I've actually tried to replace the module with an ESP8266MOD (ESP-12E I think) with Tasmota flashed on it. The thing is now that the WiFi is not connecting/showing on my network after assembling back. I think I need to do some wiring changes to keep the WiFi module on all the time to be discovered.

    P.S: Do you know any other remote controls that I can use with MQTT?
  • ADVERTISEMENT
  • Helpful post
    #6 20823799
    p.kaczmarek2
    Moderator Smart Home
    Ok ok, so now, the question is, do you know how this remote works? For me, it looks like a TuyaMCU device. It seems there is an MCU that is connected by UART to WiFi module:
    Compatibility of Kruidvat Smart Remote with OpenBK Flashed Devices and MQTT Linking
    In this particular case TuyaMCU may also control the power of WiFi module.

    If you wire the WiFi module to be always on, the batteries will drain in a day or two. This is not the solution.

    If you want to get it running, the correct way would be to check which protocol is TuyaMCU using with original Tuya firmware, do the capture with our tool:
    https://github.com/openshwprojects/TuyaMCUAnalyzer
    and then try to configure Tasmota to work with that.

    Can you try to do a TuyaMCU capture for that device? I don't know how much skilled you are with hot air and if it would be a problem...


    But in general, for a remote control, I'd strongly suggest an IR or RF solution... this topic is actually the first time I see a WiFi remote.

    Added after 6 [minutes]:

    PS: On your photo, I can clearly see TX1/RX1 traces of UART1 port to the MCU. I can also see the transistor on the power line (with capacitors) that is controlled by TuyaMCU (by the MCU) to turn on and off the power of WiFi module when it's needed.

    It'a a power saving method, the MCU is always on, but it's a lower power MCU, and WiFI module gets turned on only when there is a need to send data.

    It's kinda like this door sensor: https://www.elektroda.com/rtvforum/topic3914412.html
    See the topic above, there are protocol details of TuyaMCU v0 used in battery powered devices.
    Helpful post? Buy me a coffee.
  • #7 20825079
    mihaim1980
    Level 4  
    Screenshot of WiFi module messages with data sequences.
    here is capture
  • #8 20825082
    p.kaczmarek2
    Moderator Smart Home
    So it's TuyaMCU.... or is it? Can you try to somehow get separate capture for each button press? Do they differ between themselves?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #9 20825084
    mihaim1980
    Level 4  

    I guess it is. That's what I did. I pressed each button.
  • #10 20825193
    p.kaczmarek2
    Moderator Smart Home
    Really? It sends MCUConf? Hmm.. maybe it's somewhat a custom version of TuyaMCU.

    Okay, does it send anything beyond MCUConf? Or is it the whole protocol?
    Helpful post? Buy me a coffee.
  • #11 20825245
    mihaim1980
    Level 4  
    That's the only thing I see there....
  • #12 20825264
    p.kaczmarek2
    Moderator Smart Home
    Very well. This means that now you need to script Tasmota (I assume) to react to this UART packet and do publish then.

    Do you know how Tasmota rules work?

    https://tasmota.github.io/docs/Rules/

    Screenshot showing a trigger in Tasmota rules with TuyaMCU component.

    I'd say you need to script Tasmota to do things on TuyaReceived event, create separate rule for each button, just paste HEX and do something when it happens, like, idk, MQTT publish.

    I can try to help you with that step by step, but I don't have much experience with Tasmota rules.

    As per Blakadder site: Change device to a TuyaMCU module
    
    Module 54
    

    Quote:

    Disable multipress button options to prevent a device reset or Wi-Fi AP config mode, disable Power Cycle recovery, turn on TuyaReceived publish to MQTT and set switchmode to follow instead of toggle

    Not sure if all needed:
    
    Backlog SetOption1 1; SetOption65 1; SetOption66 1; SwitchMode 1
    


    Then:

    
    Rule1 ON TuyaReceived#Data=55AA00050005030400010213 DO publish2 stat/%topic%/button 1 ENDON
    

    You must change hex string 55AA in the above example to the string you saw in the capture.
    The following should make Tasmota publish data when this string is received.... in theory.

    I am not sure how reliable it will be, maybe for a start, you can temporary route 3.3V permantently to VDD of WiFI module to do the setup, and then try it in the battery-powered mode... I dont know currently how will Tasmota respond to "publish2" command when it's not yet connected to WiFI, and it may happen on this remote very often. We need to experiment
    Helpful post? Buy me a coffee.
  • #13 20825290
    mihaim1980
    Level 4  

    The problem is the ESP module is not starting up "permanently" even if I route VDD and/or ground directly when soldered on the remote.
  • #14 20825302
    p.kaczmarek2
    Moderator Smart Home
    Well, if that's the case, then you need to investigate each pin one by one and find out which is breaking ESP booting.
    Is VDD and GND correctly connected?
    Is RST correctly connected? Maybe it's somehow kept in RESET state?
    How is GPIO0 connected? Maybe this board keeps ESP in uart bootloader mode, because it had non-ESP module earlier?
    Do you have a photo showing the traces of the board before you swapped WiFI module to ESP one?

    Here is a random "ESP12 minimal circuit" schematic from Google:
    Minimal circuit schematic for ESP8266 with connections and switches.
    Keep in mind that I am showing it here just for reference, I haven't verified it with the datasheet.

    I remember that when I was doing XR809 to ESP8266 swap, I also had to solder some resistors, details here:
    https://www.elektroda.com/rtvforum/topic3816654.html
    Helpful post? Buy me a coffee.
  • #15 20825330
    mihaim1980
    Level 4  

    It seems the GPIO0 pin is different from CB3S (pin 11) compared to ESP (pin 12), and GPIO0 seems connected to one of the push buttons.
  • #16 20825349
    p.kaczmarek2
    Moderator Smart Home
    To which button? I was sure that all buttons are connected to MCU and not to the WiFI module.
    Helpful post? Buy me a coffee.
  • #17 21598539
    kobeenquete
    Level 1  
    Did you find the solution to get it working? I have exactly the same problem. (I want to get it working with Home Assistant) Can I maybe just flash ESPHome on the WR3 chip and configure the GPIO pins for each button?

    Thanks in advance

Topic summary

The discussion revolves around the compatibility of the Kruidvat Smart Remote with OpenBK flashed devices and the potential for MQTT linking. The remote utilizes a WR3 chip, and while support for this chip is planned, it is not yet functional. Users have explored replacing the module with an ESP8266MOD (ESP-12E) flashed with Tasmota, but encountered issues with WiFi connectivity. The remote appears to operate on a TuyaMCU protocol, which may require specific configurations in Tasmota to enable MQTT functionality. Suggestions include capturing the communication protocol and scripting Tasmota to respond to button presses. However, challenges remain regarding the proper wiring and booting of the ESP module.
Summary generated by the language model.
ADVERTISEMENT