Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Air condition remains offline. Any way to troubleshoot? #21

Closed
yiannosi opened this issue Aug 3, 2024 · 33 comments
Closed

Air condition remains offline. Any way to troubleshoot? #21

yiannosi opened this issue Aug 3, 2024 · 33 comments

Comments

@yiannosi
Copy link

yiannosi commented Aug 3, 2024

I have built the ESP 8266 variant to be use on a Daikin FTXS42JV1B unit.
I have easily located the S21 port and connected to it. See below.
Faikin module connects to WiFi as expected but the air conditioner appears to be offline on the web interface page of the module.

IMG_20240727_113458_resized_20240803_062247429

And below connected with Faikin:
IMG_20240803_130453_resized_20240803_071603063

Any ideas? Any way to debug / troubleshoot whats going on?

@yiannosi yiannosi changed the title Air condition remains offline. Any way to torubleshoot? Air condition remains offline. Any way to troubleshoot? Aug 3, 2024
@Sonic-Amiga
Copy link
Owner

Hello! What is your hardware ? Off-she-shelf 8266 ? If so, welcome to #20

@yiannosi
Copy link
Author

yiannosi commented Aug 4, 2024

Hello! What is your hardware ? Off-she-shelf 8266 ? If so, welcome to #20

Its a home brew PCB with esp8266 based on the pinout of this design and two BSS138 fets for level shifting on Rx, Tx lines. Will post full schematic when i get home later.

@Sonic-Amiga
Copy link
Owner

Well, actually two options here:

  1. Sent data does not reach the AC
  2. Reply from the AC does not reach the controller.

If you have a PL2303 or similar adapted, you can tap into lines and see what's going on. Use hex-capable terminal. Parameters are 2400 8E1

@yiannosi
Copy link
Author

yiannosi commented Aug 4, 2024

So this is the schematic:

image

@Sonic-Amiga
Copy link
Owner

Sonic-Amiga commented Aug 4, 2024 via email

@yiannosi
Copy link
Author

yiannosi commented Aug 4, 2024

Hmm isn't it possible to do inversion in software? 

What if I install pull up resistors...somehow..
I made a nice pcb for this and my thinking how to make the most of it...

@Sonic-Amiga
Copy link
Owner

isn't it possible to do inversion in software?

It is possible to configure serial port to do the inversion; but as i said above, that's probably ignored.
Okay, one test is worth 1000 of words. Please stand by, i'll make a beta with this feature, let's retest.

@Sonic-Amiga
Copy link
Owner

Done; and i understood why it didn't work before. Stupid bug.
You can grab a beta release from "betarelease" folder in my repo and flash manually; or you can change OTA URL to http://faikin-ota.home-assistant.my/ , then enable "Beta software" switch on "Basic" settings page, then do the upgrade.
On "Advanced" page you'll see two new settings: swaptx, swaprx. Enable them both; that should work,

@Sonic-Amiga
Copy link
Owner

Sonic-Amiga commented Aug 5, 2024 via email

@yiannosi
Copy link
Author

yiannosi commented Aug 5, 2024

Great thanks! I will try it later today hopefully. It will have to be OTA since I cant do manual upgrade unless I disolder the ESP module because of the inverters..
One small note : the wording swaptx and swaprx suggests swapping rx with tx rather than inversion of the signal so it could be confusing..

@yiannosi
Copy link
Author

yiannosi commented Aug 5, 2024

What you think of this mod as remake of the design to get over the inversion:

image

@yiannosi
Copy link
Author

yiannosi commented Aug 5, 2024

Done; and i understood why it didn't work before. Stupid bug.
You can grab a beta release from "betarelease" folder in my repo and flash manually; or you can change OTA URL to http://faikin-ota.home-assistant.my/ , then enable "Beta software" switch on "Basic" settings page, then do the upgrade.
On "Advanced" page you'll see two new settings: swaptx, swaprx. Enable them both; that should work,

Sorry but cant find a "beta release" on basic settings page.

@Sonic-Amiga
Copy link
Owner

Sonic-Amiga commented Aug 5, 2024 via email

@Sonic-Amiga
Copy link
Owner

What you think of this mod as remake of the design

Frankly speaking i am no expert in transistor circuits. But i know that a commonly used cirquit is https://circuitdigest.com/tutorial/bi-directional-logic-level-controller-using-mosfet

If you look at original Daichi design; they also use it for RX side.

@yiannosi
Copy link
Author

yiannosi commented Aug 6, 2024

Managed to update to beta version OTA.
Before opening up the air conditioner for installation (for the 10th time!) do you think there are any test I can do?

Connecting it to a serial terminal at 2400bps, I just receive a series of '??????' characters

@Sonic-Amiga
Copy link
Owner

There's a lot you can do.

  1. You can install just a cable with connectors on both sides into your AC, so that you don't have to disassemble it over and over again.
  2. You can do majority of testing with PC on your desk. Look at Tools/Simulators directory in my repo. You can build the simulator yourself; or i can give you a Windows .exe file. Then you may connect Faikin to a USB<>Serial adapter, configured to 5V I/O, and do all the debugging on that setup. Proceed to A/C once it works.

Connecting it to a serial terminal at 2400bps, I just receive a series of '??????' characters

  1. Connecting what and how exactly ?
  2. No that's not what is expected. S21 contains printable characters. The first command, sent by Faikin, would start with '?F0'; and the response should start with '?G0' . But hexadecimal display will tell you more.
  3. You can set nox50 and nocnwired in advanced option to disable protocol autodetect and stick to S21, so that you won't be confused by garbage (x50 uses 9600 and cn_wired is not standard uart at all).

@yiannosi
Copy link
Author

yiannosi commented Aug 6, 2024

Thanks so much for your help!

Connecting what and how exactly ?

I used a TTL to usb adapter at 5v connected to Rx, Tx terminal (where the AC connects) , and used arduino serial monitor.

@Sonic-Amiga
Copy link
Owner

To terminals of your Faikin, correct ?
So, just question marks are corrupt data.
Note that your design suggests external +5V reference for pull-up (R9), so you need to connect that to +5V, provided by the adapter. Without that connection your Tx line is just floating with random noise on it.

@yiannosi
Copy link
Author

yiannosi commented Aug 6, 2024

yes you are right!

@Sonic-Amiga
Copy link
Owner

This is what i receive in putty, with only S21 protocol enabled as described
image
F1 (not F0, sorry) is the command (query basic parameters) and 'w' is checksum byte. STX of 0x02 and ETX of 0x03 aren't rendered being control characters

@yiannosi
Copy link
Author

yiannosi commented Aug 6, 2024

i see...nothing like what I saw !
Anyway, am to familiar with the protocol . ie dont know what F1,F0 is...
But i ll try again tomorrow

@Sonic-Amiga
Copy link
Owner

And this is in RealTerm with hex display
image
02 46 31 77 03 is the full packet

@Sonic-Amiga
Copy link
Owner

Sonic-Amiga commented Aug 6, 2024

dont know what F1,F0 is...

Protocol doc is here: https://github.com/Sonic-Amiga/ESP8266-Faikin/blob/main/Manuals/S21.md , kindly provided by @revk . See the source code for more questions. Note that simulator doesn't implement all the commands; only the very basic ones.

But you actually don't really need to know that in order to solve your task. You only need to know what the proper data looks like and here it is.

You're welcome and sorry for only being of passive help. You see, original project's goal was to run Faikin on off-the-shelf solution, which i just happened to already own. I am surprised that there's such a big interest to replicating the HW.

I could eventually order a D1-mini myself and try replicating your design; i really see nothing bad in it. But frankly speaking i'm busy.

For the start, i'd suggest you to get to a known good state. Disconnect everything, connect your USB adapter directly to 8266 and set it to 3.3V. You REALLY SHOULD see data. If not, well, your 8266 is probably blown.

By the way, for quick check, Faikin supports loopback test as described here #20 (comment) Works in the latest release (and in beta too)

@yiannosi
Copy link
Author

yiannosi commented Aug 7, 2024

I could eventually order a D1-mini myself and try replicating your design; i really see nothing bad in it. But frankly speaking i'm busy.

If interested, we could do something better: I have spare PCBs of this design and if you are happy with SMD soldering, I could send you a some by mail. Just give me your mailing address. You then just need to find the components.
:)

By the way, which compiler do I need for the simulator?

@Sonic-Amiga
Copy link
Owner

Sonic-Amiga commented Aug 7, 2024 via email

@yiannosi
Copy link
Author

yiannosi commented Aug 7, 2024

I ve sent you an email...

@Sonic-Amiga
Copy link
Owner

I ain't got no mail... 🤷
Try sonic.amiga gmail.com . There are some issues with .ru apparently...

@yiannosi
Copy link
Author

yiannosi commented Aug 8, 2024

New email sent to gmail acoount

@yiannosi
Copy link
Author

yiannosi commented Aug 25, 2024

Now tested and works on model FTXS42JV1B apart from powerful mode which doesnt work..
Model can be added to the list!

@Sonic-Amiga
Copy link
Owner

Great!
Would you like to contribute your 8266-based design to Hardware/ ?

@yiannosi
Copy link
Author

Sure. I think i ve already sent you the schematic.

@Sonic-Amiga
Copy link
Owner

apart from powerful mode which doesnt work..

Known issue: revk#441

I am launching a new release right now, it has some fixes regarding that; but FTXS is known not to work. Just like my ATX20V. They belong to a different family from FTXF (where everything now works). Unfortunately i failed to find respective control commands on my units. Perhaps it has incomplete S21 support, because i have an original Daikin BRP online controller, i tried to reverse-engineer from that, but it does not give me those controls. Perhaps unsupported. :(

I am working on improvements to S21 simulator for better reverse engineering support, and better testing support. Over time i may ask you to run some scripts to collect profiles from your A/C to try simulating it. If you don't mind.

@revk
Copy link

revk commented Aug 26, 2024

I'll get that on ota when I am back from coffee.

@github-staff github-staff deleted a comment from ViniciusSCG Oct 1, 2024
@github-staff github-staff deleted a comment from syedmaaz9905 Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@revk @Sonic-Amiga @yiannosi and others