Make Eufy Smart Again Save

Make an web controlled esp8266 remote control for Eufy (v11 or v11+) vacuum cleaners

Project README

Make Eufy smart again!

Make a internet enabled IR controller for EUFY vacuum cleaners. Recent models of EUFY and Roomba vacuum cleaners include smartphone control, and my robot was feeling left out. So - lets make EUFY smart again!

Smart EUFY

What you need:

Working principle:

  1. This project relies on copying IR codes from the supplied remote, meant for programming EUFY. The idea is to mount a low profile, internet enabled remote on the robot to make it 'smart'. Decoded codes for Eufy v11 are included here. PLEASE PAY ATTENTION TO THE MODEL/ VERSION BEFORE POSTING ISSUES. To avoid issues with revisions/ model differences, please copy the IR codes from supplied remote as discussed shortly.

  2. This project uses the fantastic Blynk project to control board using web requests, and package everything in a nice GUI. Using Blynk servers, we can also enable Google home/ Alexa support using IFTTT. Highly recommend reading through Blynk docs for a basic overview of how it works.

  3. An IR blaster controlled by esp8266, will replay the codes as if they were coming from EUFY's original remote.

Here is a step-by-step guide for reading IR codes > designing circuit > programming esp8266 > making Blynk GUI > integrating with IFTTT (and optionally with Google Home)

Reading IR codes from EUFY's remote: (skip if using EUFY v11 - codes are already included in this project)

All the IR send/ recieve commands are interfaced using cyborg5's amazing IRLib2. Install it from library manager, or follow instructions on repo's github page. Based on library's example rawRecv, we will be reading IR codes with any arduino based board programmed with (IR_read_RAW_codes. To equip the IR reciever, simply connect pins to 3.3V, GND and digital pin 2. Flash the board with included code, and open serial monitor with appropriat baud rate. Take your EUFY remote, point it at the reciever, and voila! The code will print the RAW IR code for that particular button. The EUFY's IR reciever is indeed following the exact same procedure to read IR signals from its remote!

Circuit for copying IR codes

For the geeks and nerds out there, most consumer IR signals are carried on a 38kHz carrier frequency, which is also the case here. Some major brands like SONY, NEC and PANASONIC have HEX codes associated with this RAW data, and can be decoded using IRLib2. Since EUFY does not follow any of these standard codes - we will just read and send RAW IR codes - simply an array of numbers representing how long the LEd was ON, followed by how long it was OFF for.

For example, when HOME button is pressed, the raw IR code on serial port is:

Encoding  : UNKNOWN
Code      : E8BEB62D (32 bits)
Timing[83]:
     +2900, -3000     + 500, - 500     + 550, -1400     + 550, -1450
     + 500, - 450     + 550, -1450     + 500, - 450     + 550, - 450
     + 550, - 400     + 550, - 450     + 450, - 550     + 450, - 550
     + 450, - 500     + 550, -1450     + 500, -1450     + 550, -1400
     + 600, -1400     + 550, - 450     + 500, - 450     + 600, - 400
     + 550, - 450     + 500, - 450     + 550, - 450     + 500, - 500
     + 500, - 450     + 450, - 550     + 550, - 450     + 500, - 450
     + 550, - 450     + 550, - 450     + 550, - 450     + 500, - 450
     + 550, - 450     + 550, - 450     + 550, -1400     + 550, -1450
     + 550, -1400     + 450, - 500     + 550, -1450     + 450, -1500
     + 550, -1450     + 550
unsigned int  rawData[83] = {2900,3000, 500,500, 550,1400, 550,1450, 500,450, 550,1450, 500,450, 550,450, 550,400, 550,450, 450,550, 450,550, 450,500, 550,1450, 500,1450, 550,1400, 600,1400, 550,450, 500,450, 600,400, 550,450, 500,450, 550,450, 500,500, 500,450, 450,550, 550,450, 500,450, 550,450, 550,450, 550,450, 500,450, 550,450, 550,450, 550,1400, 550,1450, 550,1400, 450,500, 550,1450, 450,1500, 550,1450, 550};  // UNKNOWN E8BEB62D

This denotes a box wave with the led ON for 2900ms, OFF for 3000ms, ON for 500ms, OFF for 450ms and so on. Pressing the same button a couple of times should be used to check consistency of these numbers. Finally, the raw code should be "cleaned" by rounding numbers to obvious extremes: 2900 goes to 3000, 450 and 550 to 500, 1400 to 1500 etc. This is to account for limited resolution. In essence, this same code should have been:

Encoding  : UNKNOWN
Code      : E8BEB62D (32 bits)
Timing[83]:
     +3000, -3000     + 500, - 500     + 500, -1500     + 500, -1500
     + 500, - 500     + 500, -1500     + 500, - 500     + 500, - 500
     + 500, - 500     + 500, - 500     + 500, - 500     + 500, - 500
     + 500, - 500     + 500, -1500     + 500, -1500     + 500, -1500
     + 500, -1500     + 500, - 500     + 500, - 500     + 500, - 500
     + 500, - 500     + 500, - 500     + 500, - 500     + 500, - 500
     + 500, - 500     + 500, - 500     + 500, - 500     + 500, - 500
     + 500, - 500     + 500, - 500     + 500, - 500     + 500, - 500
     + 500, - 500     + 500, - 500     + 500, -1500     + 500, -1500
     + 500, -1500     + 500, - 500     + 500, -1500     + 500, -1500
     + 500, -1500     + 500
unsigned int  rawData[83] = {3000,3000, 500,500, 500,1500, 500,1500, 500,500, 500,1500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,1500, 500,1500, 500,1500, 500,1500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,500, 500,1500, 500,1500, 500,1500, 500,500, 500,1500, 500,1500, 500,1500, 500};  // UNKNOWN E8BEB62D

Included codes for EUFY 11 are cleaned and ready to go!

Circuit for transmitting IR codes using esp8266

The ESP is a wonderful device - packing wifi, digital/ analog IO in such a small footprint is no small feat of engineering. Chinese manufacturers do not get credit for their innovation - ESP is definately an hallmark from Espressif Systems! We will be using a nodeMCU developer board - you can certainly use a esp8266-12E directly if you do not have the board. This is how the circuit should be connected, and the final product:

Circuit and actual product

Mounting options will be discussed later - but make sure you do not block the IR blaster with box/ mounts.

Programming esp8266

Flash esp8266 with the supplied code using following settings:

Flash settings

The following snippets describe what this code does:

Lines 10 - 15 define connection settings: change according to your Wifi settings and Blynk authentication code

10-12 Define ssid and password according to wifi settings.

13 Add new device in Blynk mobile app, and define the authorization token as auth

14-15 We will be pushing over the air updates to your esp8266 to make any changes after first time, so define the OTAName and OTAPassword to identify and secure it.

Lines 18 and 19 define the pins on which devices are connected to

Define the GPIO for IR blaster as IR_LED and IR reciever as IR_RECV. Be careful if nodeMCU dev board is used - enter the actual GPIO pins connected to devices, not the identifiers on board.

Lines 24-39 define virtual pins for controlling the esp8266 through Blynk

Virtual pins used in Blynk are defined using VPIN_* for all the commands copied from remote. Custom pins such as VPIN_Connected and VPIN_terminal are used for monitoring connection status and terminal output using Blynk app.

Lines 53-87 define previously copied IR codes

Store the previously copied IR codes in structured arrays ir_*. Change the value of each variable with cleaned values if you are using a different version of EUFY vacuum cleaner.

Rest of the code can be left as is. Upon booting, the device should connect to internet and Blynk servers

Configuring Blynk GUI:

The virtual pins defined in code (and discussed in previous section) can be assigned to individual buttons in Blynk app. An example of such GUI in making can be seen in following screenshots - feel free to alter or use as is. Although the widgets and settings are self explanatory - Blynk Widget guide is a great resource!

Blynk GUI configuration

Finally, the EUFY remote functionality can be replicated on a smartphone. We made EUFY smart again!

Blynk remote

IFTTT/ Google Home/ Alexa integration

Read/ Write functions can be performed on Blynk virtual/ digital/ analog pins by putting data on the following URL:

http://`IP: blynk server/device authorization code/pin/pin identifier`

IP: blynk server depends on your location. For US, it is 45.55.96.146. Open terminal and ping blynk-cloud.com to resolve the local IP address. Auth code helps in identifying the device, and pins can be defined as D1/ V1 etc. for digital or virtual pin.

Once URL is ready - use any action to trigger a webhook with following settings. For example, configure gogle assistant trigger to post 1 on V1 for sending Auto clean command to EUFY, whenever it detects "clean the house"

Webhooks setting

Mounting options

The battery pack and circuit can be mounted on the EUFY using command strips. Due to this, a slim battery pack should be preffered. The product listed only raises the height of EUFY slighly. Getting power directly from the Eufy's battery is to be explored for future revisions. We have already tried getting power from the adapter jack besides the power button - which outputs a DC current, but also puts EUFY in charging mode if it detects a closed circuit.

Updated 8/11/2019

Finally got around to posting this. I have converted this setup to be in an always ON state - powered directly by the Eufy's 12V battery. The setup now looks as follows:

Circuit, voltage regulator

I used a high efficiency voltage regulator (LM2596S) for converting 12V to 3V which esp8266 needs, and mounted everything using command strips. You do have to work on roputing the wire - I found that using a thin wire, routing it through the sides of bumper like follows works pretty well:

Routing wire from side, to the belly

Once you have access to Eufy's belly, you can just route the wire to battery compartment. I made a little hole on cover using my soldering iron. There, just slice wires, and take power directly from the battery.

Underside

I then secured all the wires using electrical tape, laden with superglue. It makes a nice sealed conduit for your wires.

Enclosures, and bumper modification

One might notice all the 3d printed parts on cleaner. These not only protect the parasitic electronics that are taking a ride with our Eufy, but also increase the height of bumper to make sure the cleaner does not go under something and rip off the electroinics. All 3d printed files are in Images folder.

Previous revisions:

  • With a 12000 mAh battery, the eps8266 in this circuit runs for a week. Future versions will explore putting ESP in sleep/ switch off telemetry at night Dropped due to unreliable wakeup on esp's side

  • Powering with Eufy's very capable battery - get rid of the battery pack altogather. Update - successful

  • This is how it looked before, when I used a battery pack:

Happy EUFY

Open Source Agenda is not affiliated with "Make Eufy Smart Again" Project. README Source: nakulbende/Make-Eufy-Smart-Again

Open Source Agenda Badge

Open Source Agenda Rating