Sonic-Amiga / ESP8266-Faikin

Opensource replacement for Daikin BRP module to control Daikin aircon units
GNU General Public License v3.0
16 stars 1 forks source link

CN_WIRED and offline #14

Closed fisiomacao closed 3 months ago

fisiomacao commented 5 months ago

image Hello. I get this image with "system is off line" intermittently, it changes every second. And can't do anything with it. Help? Or can someone guide me to throubleshoot this? Thanks.

fisiomacao commented 5 months ago

With mqtt explorer I got this: {"protocol":"CN_WIRED","online":false,"autor":10.0,"autot":0.0,"auto0":"00:00","auto1":"00:00","autop":false}

lank23 commented 5 months ago

I have the same issue, but the web interface updates went key presses from remote are received. I put my scope on the RX and TX lines , RX is getting input from the CN_WIRED port on the unit, but nothing is ever send out on the TX line of the ESP32. Changed to different GPO, different setting in advance page, same results...how to correct?

ferbulous commented 4 months ago

Hi @fisiomacao did you have any progress with this? I’m also just getting system offline. Do you mind sharing your wired connection to cn_wir port?

lank23 commented 4 months ago

Ok so I figured maybe my esp32 device was bad or non compatible in some way, so I switched to a ESP8286 device "ESP8266 ESP-12 ESP-12F NodeMcu Mini D1 Module WeMos Lua 4M Bytes" and uploaded set TX = 1 RX = 3, selected only CN-WIRE for protocol and it is working! So not sure if its the hardware or the firmware...To add to working list, my unit is FTXB18AXVJU Thanks

ferbulous commented 4 months ago

uploaded set TX = 1 RX = 3, selected only CN-WIRE for protocol

Hi, how do you change tx & rx? Do you just change it in the advanced settings?

IMG_3890

seems to be -26 for tx and -27 for rx, I’m not sure if i should change this or not

lank23 commented 4 months ago

Yes I changed them in the advanced settings, once it connected the option to select different protocols is gone and just a text box to enter protocol number, I did not enter the "2" in the protocol box, guess it is set when protocol is auto found . I also turned off the switching of the TX/RX GPIO options along with the other protocols. see pic. Screenshot from 2024-06-23 10-31-33 Screenshot from 2024-06-23 10-32-43

fisiomacao commented 4 months ago

So, I'm trying to use it with a wemos d1 mini. I used pins 5V, GND, RX and TX (TX from AC connecting to RX in ESP, RX to TX). It was causing this issue. I read somewere else that UART pins weren't those, and read I should use GPIO2 for RX and GPIO4 for TX. It became online, but doesn't read anything nor send info to the device.

lank23 commented 4 months ago

wemos d1 mini is the same type of board I am using. TX =1 and RX = 3 should make it connect. Also the TX/RX pins might be hard-coded in the firmware due the chip has no other option so the web setting probably does nothing...I had some issues before but when I re-flashed the unit with a full erase it worked.

Full erase command esptool.py erase_flash

Program command esptool.py --port /dev/ttyUSB0 write_flash 0x0 Faikin-8266-bootloader.bin 0x8000 partition-table.bin 0xd000 ota_data_initial.bin 0x10000 Faikin-8266.bin

Sonic-Amiga commented 4 months ago

so the web setting probably does nothing

Yes, you're absolutely correct, and i even removed it from recent version (under testing, not released yet). Pins aren't reprogrammable; and even uart1 isn't usable because it doesn't have rx; so the only option is uart0 on pins 1 and 3.

Make sure that cn_wired protocol is enabled. Setting could default to 0 from old version.

Sonic-Amiga commented 4 months ago

If the problem persists; then:

  1. Enable debug in advanced settings.
  2. Connect to MQTT
  3. Collect some logs as described here https://github.com/Sonic-Amiga/ESP8266-Faikin/issues/12#issuecomment-2192696938
LowKey88 commented 4 months ago

Hi @Sonic-Amiga,

I am encountering an same issue (intermittent system status offline/online) with my ESP8266 Faikin setup. Below are the details of my configuration and the problem I am facing:

Configuration:

I have configured my device with the following MQTT settings:

Device ID: 84CCA885AA1B (Faikin-8266: 57fee20)
MQTT Topics and Payloads:

homeassistant/climate/84CCA885AA1B/config {
  "unique_id": "84CCA885AA1B",
  "dev": {
    "ids": ["84CCA885AA1B"],
    "name": "84CCA885AA1B",
    "sw": "57fee20",
    "mf": "RevK",
    "cu": "http://84CCA885AA1B.local/"
  },
  "icon": "mdi:thermostat",
  "~": "command/84CCA885AA1B",
  "min_temp": 16,
  "max_temp": 32,
  "temp_unit": "C",
  "temp_step": 1,
  "temp_cmd_t": "~/temp",
  "temp_stat_t": "84CCA885AA1B",
  "temp_stat_tpl": "{{value_json.target}}",
  "curr_temp_t": "84CCA885AA1B",
  "curr_temp_tpl": "{{value_json.temp}}",
  "mode_cmd_t": "~/mode",
  "mode_stat_t": "84CCA885AA1B",
  "mode_stat_tpl": "{{value_json.mode}}",
  "fan_mode_cmd_t": "~/fan",
  "fan_mode_stat_t": "84CCA885AA1B",
  "fan_mode_stat_tpl": "{{value_json.fan}}",
  "swing_mode_cmd_t": "~/swing",
  "swing_mode_stat_t": "84CCA885AA1B",
  "swing_mode_stat_tpl": "{{value_json.swing}}",
  "swing_modes": ["off", "V"],
  "pr_mode_cmd_t": "~/preset",
  "pr_mode_stat_t": "84CCA885AA1B",
  "pr_mode_val_tpl": "{{value_json.preset}}",
  "pr_modes": ["eco", "boost", "home"]
}

However, I am receiving an error in some of the messages:

error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"D2","data":"0038000000000022"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"44","data":"00000000000000B4"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"D2","data":"0038000000000022"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"44","data":"00000000000000B4"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"D2","data":"0038000000000022"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"44","data":"00000000000000B4"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"D2","data":"0038000000000022"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"44","data":"00000000000000B4"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"D2","data":"0038000000000022"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"44","data":"00000000000000B4"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"D2","data":"0038000000000022"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"44","data":"00000000000000B4"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"D2","data":"0038000000000022"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"44","data":"00000000000000B4"}
info/84CCA885AA1B/rx {"protocol":"CN_WIRED","data":"28C45000000000F0"}
error/84CCA885AA1B/comms {"protocol":"CN_WIRED","badsum":"D2","data":"0038000000000022"}

Despite this error, I am able to see the state updates and other information being published to the MQTT broker. Here are some of the state messages:

state/84CCA885AA1B/status {
  "protocol": "CN_WIRED",
  "online": true,
  "home": 25.0,
  "heat": false,
  "power": false,
  "mode": "A",
  "temp": 20.0,
  "fan": "A",
  "swingv": false,
  "econo": false,
  "powerful": false,
  "autor": 0.0,
  "autot": 0.0,
  "auto0": "00:00",
  "auto1": "00:00",
  "autop": false
}

I have verified the MQTT messages and confirmed that they are received correctly in Home Assistant.

Note : Despite the intermittent errors, I am still able to control the AC through Web/Home Assistant, including turning it on/off, setting the temperature, and changing modes.

Sonic-Amiga commented 4 months ago

Hello! I have updated the file in "release" directory, please test. Your problem should be solved.

Your conditioner sends some additional data in new format, which Faikin did not understand. Two interesting questions:

  1. What's your AC model ?
  2. The unknown packet has number 38 in it. Any idea what that could mean ? Is there any setting on your AC set to 38 ? We are interested because we still don't know how to interpret that data; currently it will be simply ignored.

Unfortunately i don't have my own public update server. I push releases to RevK so that they are available at revk.uk, but that comes with a delay; plus i'd like them to be tested. You can roll your own server in order to use OTA; or you can reflash the board via serial port if you aren't lazy. Sorry for that.

LowKey88 commented 4 months ago

Hi @Sonic-Amiga

I’ve tested the updated file and it’s working perfectly. My AC model is FTKG50T. I’ve also hosted your firmware on my web hosting, which can be accessed here: http://faikin-ota.home-assistant.my

Thank you for the update!

Sonic-Amiga commented 4 months ago

Thank you for support and testing. I'm happy my work is useful for someone else. I'll try backporting my code to ESP32 version; it should definitely work better.

Sonic-Amiga commented 4 months ago

BTW, how reliable is your server ? Can i make it my official update path ? In such case i'd need some access to this dir to be able to upload files.

LowKey88 commented 4 months ago

I can ensure it’s reliable! 😊 Sure, I’m happy with that. You can make it your official update path.

Please let me know how you would like me to provide access to the directory for uploading files, and I’ll set it up for you.

Sonic-Amiga commented 4 months ago

I don't care. Could be FTP, WebDav, SCP, whatever that would work for you best.

type-rke commented 4 months ago

sorry for hijacking this topic, but i wanted to upgrade, but is is not working?

i receive upgrade failed image image

Ow nevermind, i have the esp32 faikin board

for my ftxb50cv would it be ok if i buy one of these boards? https://nl.aliexpress.com/w/wholesale-ESP8266.html?spm=a2g0o.productlist.search.0

which one can you recomend?

Sonic-Amiga commented 4 months ago

i have the esp32 faikin board

Just paid attention to that. :)

Sonic-Amiga commented 3 months ago

@LowKey88 Hello again!

Three weeks ago we've been talking about setting up an update server, and you silenced. My last reply was https://github.com/Sonic-Amiga/ESP8266-Faikin/issues/14#issuecomment-2219600625

LowKey88 commented 3 months ago

@Sonic-Amiga send me your email. I will send out the credentials.

Sonic-Amiga commented 3 months ago

pavel_fedin mail.ru

On Jul 31, 2024, 02:19, at 02:19, LowKey @.***> wrote:

@Sonic-Amiga send me your email. I will send out the credentials.

-- Reply to this email directly or view it on GitHub: https://github.com/Sonic-Amiga/ESP8266-Faikin/issues/14#issuecomment-2259357089 You are receiving this because you were mentioned.

Message ID: @.***>

LowKey88 commented 3 months ago

OK done

Sonic-Amiga commented 3 months ago

Everything works fine, closing.