andyboeh / esphome-elero

An ESPHOME custom component to control Elero blinds using the bidirectional Elero protocol
24 stars 8 forks source link

Weird payload used in sent message #11

Open sidious38 opened 4 weeks ago

sidious38 commented 4 weeks ago

Thank you very much for implementing this project; I came across it after a long research regarding my Weinor blinds... As described in the instructions, I obtained and soldered a C1101 radio module for 868MHz and can receive all commands. Unfortunately, sending doesn’t work as expected:

In the payload, I noticed that it does not match the received payload. Is this intentional? Shouldn’t the message simply be "copied," or did I misunderstand the concept?

[22:50:44][VV][elero:474]: send_command called
[22:50:44][V][elero:504]: send: len=29, cnt=03, typ=0x6a, typ2=0x10, hop=0a, syst=01, chl=17, src=0x82a501, bwd=0x82a501, fwd=0x82a501, #dst=01, dst=0xa46d20, payload=[0x00 0x03 0xc3 0xd6 0x2f 0x3a 0x49 0x85 0xc3 0x31]
[22:50:44][VV][elero:206]: transmit called for 29 data bytes
[22:50:44][VV][elero:151]: wait_rx
[22:50:44][VV][elero:177]: wait_tx
[22:50:44][VV][elero:191]: wait_tx_done
[22:50:44][V][elero:231]: Transmission successful

How the received message looks like (STOP):

[23:03:24][VV][elero:015]: loop says "received"
[23:03:24][D][elero:451]: rcv'd: len=29, cnt=114, typ=0x6a, typ2=0x10, hop=0a, syst=01, chl=17, src=0x82a501, bwd=0x82a501, fwd=0x82a501, #dst=01, dst=a46d20, rssi=-58.0, lqi=42, crc= 1, payload=[0x00 0x03 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x40]

Could this be the problem why sending the commands is not working?

andyboeh commented 3 weeks ago

Please post the YAML configuration of this blind, it's hard to say without knowing what you configured.

sidious38 commented 3 weeks ago

Thank you for your fast response!

external_components:
  - source: github://andyboeh/esphome-elero

spi:
  clk_pin: GPIO18
  mosi_pin: GPIO23
  miso_pin: GPIO19

elero:
  cs_pin: GPIO5
  gdo0_pin: GPIO14

cover:
  - platform: elero
    blind_address: 0xa46d20
    channel: 17
    remote_address: 0x82a501
    name: Sommergarten
    open_duration: 25s
    close_duration: 22s
    poll_interval: 30min
    payload_1: 0x00
    payload_2: 0x03
    pck_inf1: 0x6a
    pck_inf2: 0x10
    hop: 0x0a
andyboeh commented 3 weeks ago

Your configuration seems right to me. Regarding your questions: The log file contains the decrypted received commands, but the encrypted sent commands - that's why they differ so heavily. I agree that this is somewhat confusing.

In the Home Assistant forum, a user reported a similar problem with the same payload_2 type (0x03) as yours (mine had all 0x04 and we have a mixture of RolTop, RolTop-J, RolMotion and Combio motors/receivers): https://community.home-assistant.io/t/elero-usb-transmitter-to-control-elero-and-weinor-products/52740/259. Maybe the protocol is slightly different on these blinds?

Do you know which motors you have exactly? And which remote control?

sidious38 commented 3 weeks ago

The remote is called BiEasy-5M, which should correspond to a VarioTel-2 remote (the contents of the manual are exactly the same). I don't know anything about the motor, but it seems like they just rebranded an Elero motor for Weinor.

I've read in reviews of the VarioTel-2 remote that some people use it to control Weinor blinds, so I think it must be possible to reuse your library. I will try to analyse the learning process as it might be possible to learn the virtual remote as a second remote for the blinds. At first glance, the learning process didn't seem too complex when I analysed the messages, but I will have to adapt the source code. Maybe I'll be successful.

Thank you for the effort you have already put into this program!