RFLink on Robotdyn ATMEGA 2560 with embedded ESP8266 and ESPEasy

Hi

I just got a RobotDyn ATMega 2560 with embedded ESP8266.
Just installed ESPEasy on the ESP8266 part and RFLink sw on the ATMega.

I would like to use it via TCP, but don’t understand how to expose the USB/Serial interface to TCP as detailed in the manual https://www.home-assistant.io/components/rflink/
I don’t know how to send command “socat” if this is necessary or if there is another way.

Thanks

No one using RFLink in Wifi mode, without cable?

Thanks

This is how I did it - using jumper wires rather than an all in one board!

Thanks @phileep
So now it seems to work, I’ve loaded ESPEasy Build 20100 - Mega (core 2_3_0) on the ESP8266 side and latest version of RFLink firmware in the ATMega side of the board.
After initial configuration of ESPEasy (Wifi and other stuff), I’ve added into the Devices tab a “Communication - Serial Server” setting a TCP port and choosing RFLink as Event Processing".
Then in the configuration.yaml I just added:

rflink:
host: 192.168.1.167
port: xxxx

and all is working.

1 Like

After strugling a day with making my RFLink work with the ESP8266 I’ve finally got it working.

Hardware
Robotdyn WiFi R3 ATmega2560 + ESP8266 - https://goo.gl/GoNb6v

Downloads
ESPEasy Mega 4mb - Releases · letscontrolit/ESPEasy · GitHub
RFLink RFLink Gateway - HomeAutomation

ATmega2560 part

  1. Set the dipswitches of the Robotdyn to
    a. 1: off, 2:off, 3:on, 4:on, 5:off, 6:off, 7:off, 8:off
    b. This will enable sketch uploading for the ATmega2560
  2. Connect the Robotdyn to the computer with an usb cable
  3. Extract the RFLink zip, and open the ‘RFLinkLoader.exe’
  4. Open the ‘RFLink.cpp.hex’ from the select firmware to load box
  5. Select the right COM port on which the Robotdyn is connected or just press the ‘Scan Available Ports’ button
  6. Press the ‘Upload/Program Firmware to device’ button to upload the firmware, be cautious, do not disconnect the device now.
  7. When it is ready close the RFLinkLoader

ESP8266 part

  1. Set the dipswitches of the Robotdyn to
    a. 1: off, 2: off, 3: off, 4: off, 5: on, 6: on, 7: on, 8:off
    b. This will enable sketch uploading for the ESP8266
  2. Check if the Robotdyn is still connected to the computer with an usb cable
  3. Extract the ESPMega zip file, and open ‘FlashESP8266.exe’
  4. Select the right COM port (which should be the same as in the RFLink uploading part) and select the right Firmware (ESP_Easy_mega-20180809_normal_ESP8266_4096.bin)
  5. Press ‘Flash’ to upload the file to the Robotdyn, be cautious, do not disconnect the device now.
  6. When it is ready close the flashing tool
  7. The ESP8266 will now emit a wifi signal, connect with it with the following password: ‘configesp’ (more information at h-ttps://www.letscontrolit.com/wiki/index.php/ESPEasy#Introduction)
  8. After connection a screen opens in which you can let the ESP8266 connect to your WIFI, if succesfull its new IP address will be shown.
  9. Go to this IP address in your browser and click on devices
  10. Click on Edit of the first task and select ‘Communication - Serial Server’ from the dropdown list
  11. Fill in the form as following:
    a. Name: RFLINK
    b. Enabled: checked
    c. TCP Port: a number between 1000 and 9999
    d. Baud Rate: 57600
    e. Data bits: 8
    f. Parity: No Parity
    g. Stop bits: 1
    h. Reset target after boot: - none –
    i. RX receive timeout: 0
    j. Event processing: RFLINK
  12. Press Submit

Home Assistant
• Go to the configuration file and add:

rflink:
  host: ipaddress of the ESP8266 
  port: TCP port you added in the devices tab of the ESP8266

• Restart Home Assistant
• More information at h-ttps://www.home-assistant.io/components/rflink/

Wiring
• Disconnect the Robotdyn from power.
• Wire as following:
o Transmitter

VCC to D14
DATA to D15
GND to GND

o Reciever

VCC to D16
DATA to D19
GND to GND

Finishing

  1. Set the dipswitches of the Robotdyn to
    a. 1: on, 2: on, 3: on, 4: on, 5: off, 6: off, 7: off, 8:off
    b. This will enable communication between the ATmega2560 and the ESP8266
  2. Set the larger dipswitch to RXD0 and TXD0
  3. Supply the Robotdyn with power
5 Likes

Hi.

Is this still “the way to go”? I’ve spend all day, trying to get ESP Easy to work, as i wanted. However, after it’s connected to my wifi, i find it very unstable - so bad, what i can’t even connect to the web-interface, from time to time.

I tried the latest build, but also the one you mentioned - but with the same result.

I can reach the webinterface, if i’m lucky - but only for a few minutes or so. Hereafter, it’s becoming unavailable.

I ordered the original one from RobotDyn’s own shop on AliExpress :slight_smile:

Do you have any suggestions?

If i look in the logs, i can also see the Disconnecting-events:

151992: WD : Uptime 3 ConnectFailures 0 FreeMem 18176
181992: WD : Uptime 3 ConnectFailures 0 FreeMem 18176
211992: WD : Uptime 4 ConnectFailures 0 FreeMem 18176
241992: WD : Uptime 4 ConnectFailures 0 FreeMem 18176
271992: WD : Uptime 5 ConnectFailures 0 FreeMem 18176
301992: WD : Uptime 5 ConnectFailures 0 FreeMem 18176
312157: WIFI : Disconnected! Reason: '(4) Assoc expire' Connected for 5 m 7 s
312437: WIFI : Connecting {MYSSID} attempt #0
313613: WIFI : Disconnected! Reason: '(202) Auth fail' Connected for 1175 ms
314437: WIFI : Connecting {MYSSID} attempt #1
318210: WIFI : Connected! AP: {MYSSID} (0C:AA:BB:CC:EE:DD) Ch: 11 Duration: 3772 ms
318233: WIFI : DHCP IP: {DHCPINFO-REMOVED} 23 ms
331992: WD : Uptime 6 ConnectFailures 0 FreeMem 18176
361992: WD : Uptime 6 ConnectFailures 0 FreeMem 17776
391992: WD : Uptime 7 ConnectFailures 0 FreeMem 17696

SSID and MAC-address is removed.

Sorry for the delay,

Do you still facing this issue?, what is the distance between your router and board?

Hi,

Yes, i couldn’t get it stable, and ended up, just switching to another solution. The device is still flashed with RFLink and ESPEasy. I’m unsure if it should been anything related to how i flashed the device or so.

I know this is two years later, but for anyone running into this like I did, the unstable wifi all went away after I swapped to an external antenna. You do need to remove an SMD to activate the antenna - just plugging one in doesn’t work.