This project offers a ESPHome component for integrating Samsung air conditioners into your home automation system. It provides the ability to monitor and control your AC units effortlessly.
This component is designed to connect to the F1 and F2 communication bus between the indoor and the outdoor devices.
Samsung has employed different software protocols for their AC devices over the years. The older devices utilize the Non NASA protocol, while the newer ones utilize the NASA protocol. This ESPHome component is designed to support both protocols, ensuring compatibility with a wide range of Samsung AC units.
The current implementation offers the following features:
-
Mutlisplit Support: One ESP can control all indoor units connected to the outdoor unit.
-
Temperature Monitoring: You can monitor the room temperature.
-
Humidity Monitoring (NASA Protocol): For systems using the NASA protocol, the controller allows you to monitor humidity levels, providing additional environmental insights.
-
Target Temperature Adjustment: You have the ability to change the target temperature, allowing you to set your desired climate.
-
AC Mode Control: The controller enables you to change the AC mode, giving you control over cooling, heating, or other operational modes.
In general, all devices with dedicated communication wires (not only power) should work. If you want to be safe when buying a new AC, then just ask for NASA support.
@hnykda found a way to decode Samsung's product numbers. For more info, see this issue.
There are also two Discussion threads about confirmed NASA and NonNASA uses. If you made this working on a model that has not been confirmed yet, please do so in there!
- AJ080TXJ4KG, AJ026TN1DKG, AR24TXHZAWKNEU, AR09TXFCAWKNEU, AC030KNZDCH/AA (CNH30ZDK), AE090RNYDEG, AE090RXEDEG, AE160JXYDEH/EU, AR09TXFCAWKNEU
- RJ100F5HXBA, AJ050NCJ2EG
- AR12BSEAMWKX (no communication wires)
An ESPHome compatible device and an RS-485 to (TTL) serial adapter is required to run this project. While its possible to run it on an ESP8266 its better to chose an ESP32 since it handles the incoming message stream better (cause it has more CPU power and RAM).
Its cheap, comes with a tiny case (which can fit inside an indoor unit) and allow directly to use the 12V comming from the V1/V2 lines which some AC units provide.
If your AC did not has V1/V2 please check out this post.
-
Purchase the following components and stack them:
- M5STACK ATOM Lite - Aliexpress, M5STACK store, documentation
- M5STACK ATOM RS-485 Base - Aliexpress, M5STACK store, documentation
-
Connect the components as follows:
- Connect F1 on the AC unit to A on the M5STACK controller.
- Connect F2 on the AC unit to B on the M5STACK controller.
- Connect V1 on the AC unit to DC on the M5STACK controller.
- Connect V2 on the AC unit to G on the M5STACK controller.
Follow these steps to install and configure the software for your AC unit controller:
-
Create a New ESPHome Device:
- Begin by creating a new ESPHome device in your Home Assistant instance or ESPHome command line tool.
- Use the configuration from example.yaml file as a template and copy over the
api
andota
sections from the newly created YAML.
-
Deploy and Boot:
- Deploy the configured firmware to your ESP device.
- After deploying, power on the ESP.
-
Check the Log:
- Monitor the log output of your ESPHome device. You should see yellow log messages indicating the reception of data packets. If you only see something like
[samsung_ac] ... update
every 30 seconds or so, you are not receiving messages, and something is wrong.
- Monitor the log output of your ESPHome device. You should see yellow log messages indicating the reception of data packets. If you only see something like
-
Identify Indoor Device Addresses:
- Wait for a minute and watch for purple log messages and the "Discovered devices" section in the format " indoor: 20.00.00, 20.00.01" or " indoor: 00, 01."
- These are the addresses of your indoor devices.
- If you don't see this - look into the Troubleshooting section below.
-
Update Your YAML File:
- Copy the address block containing the indoor device addresses from the log.
- In your ESPHome configuration YAML file, create a section for each indoor unit using the copied addresses.
- Assign meaningful names to each unit based on the rooms they control.
- Customize the configuration properties as needed for each unit.
-
Remove Unneeded Properties:
- Review and clean up the configuration by removing any properties that are not relevant or needed for your setup.
- Check your wiring (I had a lot of problems cause the wire connection was loose)
- Check that you really connected to the same pins/cables as our outdoor device (usually F1/F2), not to the pins/cables of a remote control unit.
- Test if swapping F1/F2 helps
- Change baud_rate from 9600 to 2400 (some older hardware uses a lower baud rate)
- For some boards (like NodeMCU) you need to disable serial logging, since it blocks the pins required for the RS485 serial communication. Just add
baud_rate: 0
to the logger section. - Add the following to your YAML uart configuration section which dumps all data which is received via RS484 to logs. This helps to check if you get any data. This also helps when reporting problems.
debug:
direction: BOTH
dummy_receiver: false
after:
delimiter: "\n"
sequence:
- lambda: UARTDebug::log_hex(direction, bytes, ' ');
- Do I need to power cycle my Samsung devices to make it work? No, but they should be turned on.
- Does this works also with Samsung heat pumps? Yes, while it was not desinged in the first place for them, we have reports that it also works.
- Do I need a ESP for each indoor device? When all your indoor devices are connected to the same outdoor device, then you need just one. Otherwise you need one for each outdoor device.
- Do I need to turn off my climate devices when I connect the ESP? No, but it's advised to do so, cause there is no garantee that it will not harm you Samsung hardware. And as you might be messing around 240V to be able to hook to those F1/F2 cables, it's safer to disconnect the power when attaching the cables and then bring the power up again.
The following YAML configuration is not included in the example since they are for development purposes.
# All this values are optional. Only use the ones you need.
samsung_ac:
# Sends all NASA package values to MQTT so the can be analysed or monitored.
debug_mqtt_host: 10.10.10.10
debug_mqtt_port: 1883
debug_mqtt_username: user
debug_mqtt_password: password
# Prints the parsed message data to the log
debug_log_messages: true
# Prints the binary message data (HEX encoded) to the log
debug_log_messages_raw: true
It took me a while to figure out what the difference is. NASA is the new wire protocol which Samsung uses for their AC systems. The old units are using the so-called Non NASA protocol. The protocols share some aspects like the start and end byte. But the newer NASA protocol is more complex and allows more data to be transferred and more units to communicate.
The NASA protocol is pretty generic. Its basically designed to transport variables which are a key (number) and a value (with a datatype like Enum, Int, Long, Bytes). All meaning is defined to the keys. If you want to know the room temperature you need to know the number and wait for it.
Foxhill67 started to document the NASA protocol here.
The Non NASA protocol is specifically desined to transport AC data.
DannyDeGaspari started toe document the Non NASA protocol (but from wall controller side) here.
Thanks goes to DannyDeGaspari https://github.com/DannyDeGaspari/Samsung-HVAC-buscontrol. He made the initial attempt to describe the older Non NASA protocol.
Thanks goes to matthias882 https://github.com/matthias882/some_esphome_components. He made an an basic ESPHome component for the older Non NASA protocol which was a perfect source for start playing and learning to communicate with the AC and use ESPHome.