mill1000 / esphome-winix-c545

An ESPHome external component for the Winix C545 air purifier.
MIT License
16 stars 1 forks source link

Unable to send/receive data #9

Closed YoungsterJon closed 8 months ago

YoungsterJon commented 8 months ago

New to ESPHome so not sure if I configured everything correctly but I followed the wiring as referenced in the photos. I see all the controls in Home Assistant but they don't actually change the state of the machine. Also sensor data like AQI or light intensity show up as Unknown.

Am I missing something? winix_c545.txt

esphomeHAControls PXL_20240108_193306512

mill1000 commented 8 months ago

Hi. The wiring looks pretty good to me. Nothing obviously wrong.

  1. Are you wiring the RESETn pin to ground as documented in the README?
  2. Are you seeing anything in the device logs?
  3. You can enable UART debugging to see if there's any traffic flowing. e.g.
    uart:
    baud_rate: 115200
    debug:
    direction: BOTH
    after:
      delimiter: "\n"
    sequence:
      - lambda: UARTDebug::log_string(direction, bytes);
YoungsterJon commented 8 months ago
  1. Yes, wired Q16 to GND
  2. The only thing I see in the logs is device ready over and over again. logs_winixesp_logs.txt
mill1000 commented 8 months ago

Is the WiFi LED on your Winix on? If not, press the WiFi button and it should start blinking then go solid

YoungsterJon commented 8 months ago

Hmm that must be the issue then. I pressed the WiFi button to turn it on. LED blinks but never goes solid.

mill1000 commented 8 months ago

Anything different in the logs?

YoungsterJon commented 8 months ago

Messages show up but are not controlling the actual state or receiving the current state.

logs_winixesp_logs (1).txt

mill1000 commented 8 months ago

Looks like your UART connections are OK it's just that the handshake isn't completing properly.

Did you press and hold the WiFi button? It should just be a short press since you don't want the Winix MCU to think the WiFi is in AP mode.

YoungsterJon commented 8 months ago

I did press and hold the WiFi button which is how I got the LED to start blinking and the logs to show MCU ready.

When LED is off, and I press the WiFi button, nothing happends; LED is still off. I can only get it to blink when I press and hold and it still never goes solid.

mill1000 commented 8 months ago

Gotcha. I'm guessing you never setup the OEM Wi-Fi? There's probably some extra handshake needed for that case. I'll review the captures I took in the past and see what else might be needed

YoungsterJon commented 8 months ago

You are correct. I never setup the OEM WiFi.

I removed the RESET wire to setup OEM WiFi. There was a firmware update so I updated the machine. After setup was complete I put back the RESET wire and now everything works.

I wonder if it's because I was on an older firmware. Thanks for your help!

mill1000 commented 8 months ago

Ah haha, I was actually just working on support for the AP handshake in #10.

Either way, glad it's working for you.

YoungsterJon commented 8 months ago

Ah haha, I was actually just working on support for the AP handshake in #10.

Either way, glad it's working for you.

Ah okay, I have another C545 that I was planning on upgrading later this week so I will try out the new AP handshake. Thanks!