tuya-convert icon indicating copy to clipboard operation
tuya-convert copied to clipboard

Moes ufo-r2-rf with WR3E

Open iMatux opened this issue 4 years ago • 16 comments

Hello! Yesterday I received this IR/RF blaster from Aliexpress, I though it had an ESP chip like ufo-r1 version, but after teardown I saw that it has a WR3E chip, which seems not compatible with Tasmota, as it has a RTL chip inside, like Tuya Developer site says. This is a really great product has it has IR and 315/433 mhz for RF and it's really cheap. If anyone needs pics here they are, including wiring prototype from a doc on Tuya site linked before: IMG_3561 IMG_3565 IMG_3568 Schermata 2021-01-19 alle 10 36 28

iMatux avatar Jan 19 '21 09:01 iMatux

A year after I tried again, bought a Esp8266 12S, soldered without pulling any pin, flashed Tasmota and it work, now I have to figure it out how to set GPIO and template in Tasmota and it should work, hopefully. image

iMatux avatar Jan 16 '22 18:01 iMatux

Hi, very interesting - LED wise the interior looks very much like my YTF IR bridge (https://tasmota.github.io/docs/devices/YTF-IR-Bridge/) which still came with ESP8266 and that I´m using as IR blaster. Due to the several LED it has a great reach - even gets "around corners", obviously reflecting at walls ...

Looking at the HW this one seems to have 3 antennas for sending - so I would guess it should have a good reach for RF too ...

I found yours on AliExpress for about 20€, which is not too bad in pricing.

I´d be interested if you find the GPIO layout (guess it should not be too hard finding it by guess and try ...

Please share your experience - thanks - MacSass

MacSass avatar Jan 16 '22 21:01 MacSass

Hello,

Could you elaborate a bit how you open the case of this device? Been pulling it from the side but it feels like it would damage the plastic... Thanks !

Yves

yvesdm3000 avatar Feb 09 '22 08:02 yvesdm3000

@yvesdm3000 I've just opened one and confirm there are no external screws.

You just need to use one of the tipical smartphone repair tools to pen it thorugh the middle. You have two tabs on each side close to the corner.

gonzzovela avatar Feb 23 '22 14:02 gonzzovela

has anyone figured out the pins used by the board? I'd like to use it by replacing the WR3E by an ESP.

Thanks,

gonzzovela avatar May 09 '22 11:05 gonzzovela

How did you open it ?

Agnes56fr avatar Sep 30 '22 14:09 Agnes56fr

I pried it open with a plastic tool used to open a smartphone / tablet.

  Yves

  -----Original message----- From: Agnes56fr Sent: Friday, 30th September 2022, 16:00 To: ct-Open-Source/tuya-convert Cc: Yves De Muyter; Mention Subject: Re: [ct-Open-Source/tuya-convert] Moes ufo-r2-rf with WR3E (#901)     How did you open it ?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

yvesdm3000 avatar Sep 30 '22 19:09 yvesdm3000

LibreTuya-ESPHome is working fine on this RTL8710-based module, fwiw. But I would love to find a way to do the initial installation OTA if possible, rather than attaching wires to the module pins.

RoganDawes avatar Jan 04 '23 09:01 RoganDawes

LibreTuya-ESPHome is working fine on this RTL8710-based module, fwiw. But I would love to find a way to do the initial installation OTA if possible, rather than attaching wires to the module pins.

@RoganDawes I'd love a bit more info on how you did it. I ended up with some RTL circuit breakers on advise from my electrician and decided I'd figure out how to integrate them later. Dumb idea.

ChrisGroenewald avatar Sep 14 '23 09:09 ChrisGroenewald

I'm guessing you have the CBI Astute smart controllers. The only way that I know of to flash them is to open them up, and connect wires to the appropriate pins as per the libretiny project. If you have access to a 3D printer, there are some models that can put pogo pins in the right places to save soldering, although I have not had the best results that way!

Details can be found here: http://docs.libretiny.eu/docs/platform/realtek-ambz/

Use ltchiptool once you have created a suitable config file (basically, the bare minimum, including the ota: and wifi: details.) Even with nothing wired up, ltchiptool will try to connect to it, and when it times out, will print out the wiring required. You'll also want to find the WR3E pinout to get the corresponding pins on the board/module.

RoganDawes avatar Sep 14 '23 09:09 RoganDawes

You guessed correctly. I'm no stranger to the soldering iron, so it's not a problem. I'm considering picking up a spare one and playing with that first to get the process down pat. Awesome info, thank you! I'm looking forward to getting them out of the walled garden.

ChrisGroenewald avatar Sep 14 '23 09:09 ChrisGroenewald

Good luck. Shout if you need help with the yaml configuration.

RoganDawes avatar Sep 14 '23 10:09 RoganDawes

Good luck. Shout if you need help with the yaml configuration.

This is what I had prior to the change where libretiny needs to be updated to the cpu platform (rtl87xx:). I no longer have any of these devices, so have not bothered to update it. It is strongly recommended to include the web_server: and captive_portal: components in all firmware uploaded to these devices, in case you enter the wifi credentials incorrectly!). If you are having trouble getting current and power readings from the device, try adding the inverted: option to the CF and CF1 pins.

substitutions:
  devicename: asc
  upper_devicename: Smart Controller

esphome:
  name: ${devicename}

rtl87xx:
  board: wr3e
  framework:
    version: latest

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:

ota:

wifi:
#  ssid: !secret wifi_ssid
#  password: !secret wifi_password
  ap:
    ssid: $upper_devicename

web_server:
  port: 80

captive_portal:

sensor:
  - platform: hlw8012
    model: BL0937
    sel_pin: 
      number: PA19
      inverted: true
    cf_pin: PA15
    cf1_pin: PA14
    voltage_divider: 1742
    current:
      name: "${upper_devicename} Current"
    voltage:
      name: "${upper_devicename} Voltage"
    power:
      name: "${upper_devicename} Power"
    energy:
      name: "${upper_devicename} Energy"
    update_interval: 5s

binary_sensor:
  - platform: gpio
    id: button
    pin:
      number: PA22
      inverted: true
      mode:
        input: true
    name: "${upper_devicename} Button"
    filters:
      - delayed_on: 10ms
      - delayed_off: 10ms
    on_press:
      - switch.toggle: relay_template

switch:
  - platform: output
    id: relay
    output: relay_output

  - platform: template
    name: "${upper_devicename} Relay"
    id: relay_template
    lambda: |-
      if (id(relay).state) {
        return true;
      } else {
        return false;
      }
    turn_on_action:
      - light.turn_on: red_led
      - switch.turn_on: relay
    turn_off_action:
      - light.turn_off: red_led
      - switch.turn_off: relay
    # optimistic: true # this will change the toggle switch to individual on/off buttons

light:
  - platform: binary
    id: red_led
    output: red_led_output

output:
  - id: red_led_output
    platform: gpio
    pin: PA23
    inverted: true

  - id: relay_output
    platform: gpio
    pin: PA12
    inverted: false

# Blue LED
status_led:
    pin: 
      number: PA05
      inverted: true

RoganDawes avatar Oct 23 '23 06:10 RoganDawes

Thanks for your contribution Rogan, but i think you uploaded code for wrong device. The Moes ufo-r2-rf isn't power metering switch, it is an IR/RF remote.

MayorBug avatar Oct 23 '23 08:10 MayorBug

Thanks for your contribution Rogan, but i think you uploaded code for wrong device. The Moes ufo-r2-rf isn't power metering switch, it is an IR/RF remote.

Sorry, I thought you were responding to my post in e.g. https://github.com/ct-Open-Source/tuya-convert/issues/901#issuecomment-1719122345, where I was talking about the CBI Astute Smart devices, which are also based on the WR3E module.

Unfortunately, I do not have the Moes ufo-r2-rf, so have no idea what sort of configuration would be required.

RoganDawes avatar Oct 23 '23 09:10 RoganDawes