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.
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 (witch can fit inside an indoor unit) and allow directly to use the 12V comming from the V1/V2 lines witch some AC units provide.
-
Purchase the following components and stack them:
- M5STACK ATOM Lite - Aliexpress, M5STACK store, documentation
- M5STACK ATOM RS-485 Kit - 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.
![M5STACK Wiring Diagram](https://private-user-images.githubusercontent.com/32042186/271854768-42a6757d-bfcf-4a29-be87-cf1b204e248a.jpeg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3MDE5NTgsIm5iZiI6MTcyMzcwMTY1OCwicGF0aCI6Ii8zMjA0MjE4Ni8yNzE4NTQ3NjgtNDJhNjc1N2QtYmZjZi00YTI5LWJlODctY2YxYjIwNGUyNDhhLmpwZWc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxNVQwNjAwNThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04MzM4NDRkZjVmMzhhY2Y0OGU5YTIzNDI0YzE4ZWRiMTdjYzYzOGU4MzRmZmQ3MTI1N2U4YjY1Y2UyNzUzZjQyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.pxhTMHmgobwK5CyvOk8yLQCIMuuX8saVbpEQAMOphEg)
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 comand 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.
-
Identify Indoor Device Addresses:
- Wait for a minute and watch for purple log messages and the "Discovered devices" seciton in the format: " indoor: 20.00.00, 20.00.01" or " indoor: 00, 01".
- These are the addresses of your indoor devices.
- If you see only see - 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 problems cause the wire connection was loose)
- Check that you really connected to the same pins/cables as our outdoor device (usally F1/F2). Not to the pins/calbes 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 RS484 serial communication. Just add
baud_rate: 0
to the logger section. - Add the following to your yaml witch dumps all data witch 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, ' ');
- Did I need to power cycle my Samsung devices to make it work? No, but they should be turned on.
- Did 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.
- Did 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.
- Did I need to turn off my climate devices when I connect the ESP? No, but its adviced to do so, cause there is no garantee that it will not harm you Samsung hardware.
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 basicaly desinged to transport variables witch are a key (number) and a value (with an 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.