lanwin / esphome_samsung_ac

Provides an ESPHome component for Samsung air conditioners. It allows you to watch and control your devices via a home automation system. And is designed to be attached to the F1,F2 communication bus between the devices.
64 stars 22 forks source link

[Non-NASA] Help with Ducted system #1

Closed buzurk26 closed 5 months ago

buzurk26 commented 1 year ago

Hi,

Great project! very keen to get this working with my AC

I have a non-Nasa ducted system that previously had the wireless controller on the f1/f2 terminals, but it has stopped working of late and Samsung don't sell replacements image

I got some esp32s and the rs485 ttls, I'm a bit of a noob but wondering how i could get started with your code on my non-nasa setup?

Only functions ill need are

@lanwin

lanwin commented 1 year ago

Hi buzurk26, currently this would not work out of the box with that setup. I made sure it NonNASA can be integrated but currently it is not integrated. This is mainly cause I can not test it. When you would do the test part, I can pick the code over.

buzurk26 commented 1 year ago

Hi @lanwin I would be happy to do the testing in hope to get a working solution

buzurk26 commented 1 year ago

Hi @lanwin I have a ESP32 and TTL adapter all setup with ESPhome on it ready to go, let me know what i need to do to help test

thanks a bunch

lanwin commented 1 year ago

Give me some time. Currently I am a little bit overloaded.

In the mean time you could solder everything together. If everything works, the LED on the RS485 board should blink every few seconds.

Then you can bring up ESPHome and try to setup the ESP with my example script https://github.com/lanwin/esphome_samsung_ac/blob/main/example.yaml . Everything below device should be removed for now and the baud_rate should be changed to 2400.

If everything should work, you sould be able to access the webserver on port 80.

buzurk26 commented 1 year ago

Hi @lanwin

Cheers, greatly appreciate your help!

Working in the background to control the zone motors and we mostly got that sorted so just pending the AC control, will spin up an esp with your code and capture the data?

Can i use esp32??? just replace the top part of the code with the board type or is 8266 preferred?

buzurk26 commented 1 year ago

Hi, Its all connected now with your code, I left out everything under "devices" as you suggested

In the esp logs i see this over and over image

The RX light on the TTL485 is flashing heaps but nothing coming down to the ESP logs

Is this code compatible with esp32? should i buy an esp8266 instead and try?

buzurk26 commented 1 year ago

Switched to an ESP8266, still not recieving data on the ESP image

I have this UART converter image

Wired like this image

and here is my code https://pastebin.com/ujyNVnqt

lanwin commented 1 year ago

Switched to an ESP8266, still not recieving data on the ESP image

I have this UART converter image

Wired like this image

and here is my code https://pastebin.com/ujyNVnqt

Switched to an ESP8266, still not recieving data on the ESP image

I have this UART converter image

Wired like this image

and here is my code https://pastebin.com/ujyNVnqt

Thats correct so far and the output is what I would expect. As I said. The actual data handling of the old protocol is not yet implemented. This is why there is not output.

lanwin commented 1 year ago

Please install again. I added some basic logging witch should log the received data messages. You could attach some samples I can use.

buzurk26 commented 1 year ago

@lanwin - Ah makes sense, i hadnt realised.

Do I just re-upload the code to the esp via esphome i assume and it will pull your changes??

Also, does your code support esp32? i plan to use esp32 in future

greatly appreciate your time

lanwin commented 1 year ago

Reinstalling should pull the changes.

ESPHome supports ESP32 so the code should work there too.

buzurk26 commented 1 year ago

Thank you, Just reinstalled now. Not getting any output unfortunately

image

lanwin commented 1 year ago

Can you add this to your config under UART

  debug:
    direction: BOTH
    dummy_receiver: false
      after:
        delimiter: "\n"
        sequence:
        - lambda: UARTDebug::log_hex(direction, bytes, ' ');

This sould print everything whats received via UART.

And did your RS485 convert is blinking?

buzurk26 commented 1 year ago

Sure, will add that now and try

The RX led on the converter is blinking rapidly yes, nothing on the tx led

lanwin commented 1 year ago

You are at the wrong place. Under UART not under logger.

buzurk26 commented 1 year ago

Yeah sorry my bad, tired eyes

uploading now

buzurk26 commented 1 year ago

Heaps out output now

image

buzurk26 commented 1 year ago

capture here https://pastebin.com/RfvmDbXr

Note the system is currently in standby, i turned it on again now and its getting more data too

EDIT: added a longer capture after turning system to heat mode https://pastebin.com/euh0yEy8

lanwin commented 1 year ago

Ok it seems that its receiving data. Please remove that lines again and pull and install again. I added another logging code.

buzurk26 commented 1 year ago

Awesome, Will do that now.

buzurk26 commented 1 year ago

Back to no data unfortunately image

lanwin commented 1 year ago

Ok just put back the debug code from above. That data did not seems to match from what is specified in the protocol.

There should at least be some \x32 and \x34 in there.

Can you try to swap F1 and F2?

buzurk26 commented 1 year ago

Oki, will swap f1/f2 and add that debug code back in

buzurk26 commented 1 year ago

Here is the log now, https://pastebin.com/1jiz9uPE

lanwin commented 1 year ago

Hmm still no \x32 and \x34. Can you swap back F1/F2 and then try the following baud rates? Please check then of you find multiple \x32 and \x34 in log.

1200, 2400, 4800, 9600, 19200, 38400

buzurk26 commented 1 year ago

Sure can try those tomorrow and let you know.

I do remember when trying a different baud rate the other day I got error like below

buzurk26 commented 1 year ago

image

lanwin commented 1 year ago

You can ignore this.

buzurk26 commented 1 year ago

Awesome, will do some testing tomorrow (well today now :-P ) and let you know asap, Thanks again!

buzurk26 commented 1 year ago

Got to 9600 baud rate and things changed image

RAW Code for 9600 baud -https://pastebin.com/Jb7xbR34

lanwin commented 1 year ago

Interesting. I thought the older systems use 2400 baud.

So anyway. We have now data packets I can work with (the yellow parts).

You can now delete the URT debug stuff.

buzurk26 commented 1 year ago

Oh that is awesome to hear :) Glad were on the right track - Phew!

I'll take that out now and reboot, Anything else you need let me know

EDIT: Code removed, seeing lots of the yellow text and sometimes also see [W][TEST: 024]: 3200c828004334

lanwin commented 1 year ago

Can you please reinstall and run it some time and see of you get some log messages.

buzurk26 commented 1 year ago

Yep will do, did you want me to capture the logs?

I can certainly see a difference, the yellow logs are coming in at a much slower rate now and have extra details in front of them image

buzurk26 commented 1 year ago

Here is the log, running for about 1.5 - 2 hrs logs_esp32-hvac-test_run (2).txt

lanwin commented 1 year ago

If you want you can install again. Then you should see some "known addresses".

If that work you could add some devices with that addresses (from template) and reinstall. Then you should be able to see target temperatures, room temperatures and mode within the webinterface and homeassist.

buzurk26 commented 1 year ago

Awesome :) will do that now

buzurk26 commented 1 year ago

image

buzurk26 commented 1 year ago

Sorry not quite sure w hat format to add that known devices into your example code

Tried a few iterations like "00, c8" "c8" "00:c8"

samsung_ac:
  devices:
   - address: "20.00.00"
    room_temperature:
      name: Test1_temp
    target_temperature:
      name: Test1_target
    power:
      name: Test1_power
lanwin commented 1 year ago

This should work.

samsung_ac:
  devices:
   - address: "00"
     room_temperature:
       name: Test1_temp
     target_temperature:
       name: Test1_target
     power:
       name: Test1_power
buzurk26 commented 1 year ago

OMG!!!!!!! i think were getting there - AC is on now and target is set to 20 deg on the panel image

on/off not showing status and adjusting that temp slider does not seem to do anything i assume that expected?,

Is there option for fan speed and mode? (sorry if im jumping too far ahead, dont mean to just excited,)

Thank you

lanwin commented 1 year ago

:D dot get to exited. Currently this reads only a little bit data. Its not complete yet. And the sending part is currently missing.

buzurk26 commented 1 year ago

I really, really appreciate your help on this, truely, let me know if you need anything further from me

buzurk26 commented 12 months ago

Hi @lanwin Just wanted to touch base to see if there was anything else i can do to assist on this one?

Do you know if (now that we have that information) that it likely we can get the rest? Just trying to plan ahead and what to buy but before i go down that path hoping to get this working

lanwin commented 12 months ago

I am sorry. Currently I am ahead of a week off. So don't expect anything the next two weeks.

buzurk26 commented 11 months ago

Hi, Hope you had a good break

Wondering if you had time to revisit this?>

thank you

lanwin commented 10 months ago

Hi, I am back. Maybe I get some time the next days to work on that.

buzurk26 commented 10 months ago

That would be absolutely awesome! Thank you :)

Can i donate to you or anything by way of saying thank you?

Mocky158 commented 10 months ago

Good evening, I have this heat pump from Samsung. I don't know which category it falls into, NASA or NO-NASA. Or if it is likely that this integrity could work when it is finished. Thank you Zoul AE160JNYDGH

Foxhill67 commented 10 months ago

Highly interested in this project, thanks for the work done so far! I have the AE090RXEDGG/EU + AE260RNWSGG/EU heat pump combination from Samsung. According to the manual, the optional wifi module kit MIM H04EN can be installed. This kit is NASA compliant. But the kit is expensive and only accessible via Samsung Smartthings app. I am very much interested in this ESPHOME project to directly connect my heat pump to Home Assistant. Do you think it will be possible to at least read all interesting information (temperatures, power usage, error codes, etc)?