Smoria / AM43-WiFi

AM43 blinds engine to WiFi MQTT conversion
MIT License
17 stars 4 forks source link

AM43-WiFi

This project changes chinese AM43 blinds engine (like on image below) controls from BLE to WiFi MQTT using ESP8266 modules such as ESP-01 or ESP-12F

Now with ESPHome version available

This is not same as AM43 cover component which is just WiFi<->BLE bridge, this is hardware conversion with removal of BLE module

AM43 device

This is hardware modification!

Only problem I have noticed after modification that AM43 MCU hangs after couple of days and not responding to commands for unknown reason. So ESP8266 triggers MCU reset pin if there is no answer for 5 minutes, additional ESP8266 pin needed for this to work.

You need

Features (Arduino MQTT version)

Features (ESPHome version)

Installation

Firmware (Arduino MQTT version)

  1. Prepare ESP8266 board to use:
    1. For ESP-12F there is two 1k resistors needed between EN and VCC pins and between GPIO15 and GND.
    2. Also for some modules to upload firmware over UART GPIO0 must be connected to GND.
    3. CHANGE PASSWORD for WiFi Manager and OTA Updates in code! (single "passwd" constant in ESP_AM43.ino)
    4. Upload firmware to module trough UART.
    5. Done. Now you can upload firmware updates using Arduino OTA.
  2. Connect flashed device to power.
  3. If there is no WiFi settings stored on device, WiFi Manager will launch and blue LED will start blinking.
  4. Connect to new WiFi access point named "ESP-AM43-(esp-mac-address)" using changed password from "passwd" constant.
  5. Change WiFi and MQTT settings.
  6. Firmware part is done.

    Firmware (ESPHome version)

    Follow default ESPHome instalation procedure using provided config file.

    Hardware

  7. Disassemble device Mainboard with BLE module
  8. Desolder BLE module from main board Desoldered module
  9. Solder ESP module pins using wires according to map: Pinout
  10. Assemble device
    • ESP-12F result Mainboard with ESP-12F module
    • ESP-01 result (without auto-reset functionality) Mainboard with ESP-01 module
  11. Also I've added some rubber sound-vibration damping material around motor and gearbox to reduce noise, this have improved device acoustics a lot! Now it's almost unnoticeable at night.

Congratulations! Conversion is done!

MQTT Topics

Device topic variable can be changed in WiFi manager as mqtt topic, this is prefix for all provided topics. Default value is "am43-default", i.e. "/status" topic will be published to "am43-default/status".

Device publishes and listens to next MQTT topics:



#### Afterword
There is some commented code in "am43.cpp" since i've implemented almost entire protocol for controlling timings and settings of AM43 MCU. But there is no need for it in this project, you can freely modify it as you want. Also *WEB_SOCKET_DEBUG* flag will help you with modifications, just use http://tzapu.github.io/WebSocketSerialMonitor/ to debug ESP over WiFi.