-
Notifications
You must be signed in to change notification settings - Fork 0
Samsung AC binding
NOTE: There has been some issues with connection to newer Samsung Air Conditioner (2014-), this might be because of a changed method of communciation with the devices, if you have problems please check out the issue on this: 2863
Documentation of the Samsung Smart Air Conditioner Binding. This Binding should be compatible with Samsung Smart Air Conditioner models
For installation of the binding, please see Wiki page Bindings.
First of all you need to introduce your Samsung AC's in the openhab.cfg file (in the folder '${openhab_home}/configurations').
######################## SAMSUNG AC Binding ############################################
# Host and port of the first AC to control
# samsungac:<ACId1>.host=192.168.1.2
# samsungac:<ACId1>.mac=7825AD1243BC
# samsungac:<ACId1>.token=33965901-4482-M849-N716-373832354144
# Host and port of the second AC to control
# samsungac:<ACId2>.host=192.168.1.3
# samsungac:<ACId2>.mac=7825AD1243BC
# samsungac:<ACId2>.token=22332423-4482-M849-N716-373832354144
<ACId1>
and <ACId2>
can be freely set to whatever name you want to give for a certain Air Conditioner (e.g. "Livingroom" or "Bedroom"), this could be looking like:
samsungac:Livingroom
A working example for such configuration could look like:
######################## SAMSUNG TV Binding ############################################
# Host and port of the first TV to control
# samsungac:Livingroom.host=192.168.1.2
# samsungac:Livingroom.mac=7825AD1243BC
# samsungac:Livingroom.token=33965901-4482-M849-N716-373832354144
If you do not know your Samsung Air Conditioners IP- or Mac-address you can download the jar, and run the following command. Then the details of the FIRST discovered air conditioner will be printed:
java -cp addons/org.openhab.binding.samsungac_1.6.0.SNAPSHOT.jar org.binding.openhab.samsungac.communicator.SsdpDiscovery
When you have entered the host(IP) and mac details in the configuration, you will still need to retrieve a token from the air conditioner. During first connection attempt, you do not have a token, so pay attention to the log. It will ask you to switch on and off the air conditioner within 30 seconds. You will then receive a token printed in the log. Keep it and put it in openhab.cfg.
Procedure:
-
Turn AC on. Comment the line containing token like:
# samsungac:Livingroom.token=
-
Start openHAB in debug mode with:
./start_debug.sh
-
Watch the logs from a (different) console and look at AirConditioner messages:
tail -f openHAB.log | grep AirConditioner
-
You will find the messsage:
WARN o.b.o.s.c.AirConditioner[:179]- NO TOKEN SET! Please switch off and on the air conditioner within 30 seconds
-
Switch AC off and then on (be quick, you really have 20 seconds), you will then find your token in the logfile:
WARN o.b.o.s.c.AirConditioner[:175]- Received TOKEN from AC: 'e56a6def-1ecf-47d4-bc5d-9c818eaec76d'
-
Copy the token to openhab.cfg and uncomment the line
In order to bind an item to the device, you need to provide some configuration settings. The way to do so is to add binding information in your item file (in the folder configurations/items`). The syntax of the binding configuration strings accepted is the following:
samsungac="[<device_id>|<device-command]"
The device-id corresponds device which is introduced in openhab.cfg.
The device-command corresponds the air conditioner command. See a list of the implemented ones below.
Examples, how to configure your items:
Number ac_current_temp "Current temp [%.1f]" (AC) {samsungac="[Livingroom|AC_FUN_TEMPNOW]"}
Switch ac_power (AC) {samsungac="[Livingroom|AC_FUN_POWER]"}
Number ac_mode "Convenience mode" (AC) {samsungac="[Livingroom|AC_FUN_COMODE]"}
Number ac_op_mode "Operation mode" (AC) {samsungac="[Livingroom|AC_FUN_OPMODE]"}
Number ac_set_temp "Set temp [%.1f]" (AC) {samsungac="[Livingroom|AC_FUN_TEMPSET]"}
Number ac_direction "Direction" (AC) {samsungac="[Livingroom|AC_FUN_DIRECTION]"}
Number ac_windlevel "Windlevel" (AC) {samsungac="[Livingroom|AC_FUN_WINDLEVEL]"}
It is important that you specify these correctly in the sitemap, as each command has some special valid values. Here's an example of the sitemap:
Frame label="Air conditioner"{
Text item=ac_current_temp icon="temperature" label="Current temp [%.1f °C]"
Setpoint item=ac_set_temp minValue=16 maxValue=28 step=1 icon="temperature"
Switch item=ac_power icon="heating"
Switch item=ac_mode label="Mode" icon="sofa" mappings=[0="Off", 1="Quiet", 2="Sleep", 3="Smart", 4="SoftCool", 5="TurboMode", 6="WindMode1", 7="WindMode2", 8="WindMode3"]
Switch item=ac_op_mode icon="sofa" mappings=[0="Auto", 1="Cool", 2="Dry", 3="Wind", 4="Heat"]
Switch item=ac_direction icon="wind" mappings=[0="Auto", 1="SwingUD", 2="Rotation", 3="Fixed", 4="SwingLR"]
Switch item=ac_windlevel icon="wind" mappings=[0="Auto", 1="Low", 2="Mid", 3="High", 4="Turbo"]
}
The names can be changed in the sitemap, but the numbers will always mean the same. Eg. AC_FUN_COMODE with value 0 is always Off.
Supported Air conditioner commands (with valid values to send):
AC_FUN_OPMODE:
Auto(0), Cool(1), Dry(2), Wind(3), Heat(4)
AC_FUN_TEMPSET:
16 to 28
AC_FUN_WINDLEVEL:
Auto(0), Low(1), Mid(2), High(3), Turbo(4)
AC_FUN_POWER:
OFF, ON
AC_FUN_COMODE:
Off(0), Quiet(1), Sleep(2), Smart(3), SoftCool(4), TurboMode(5), WindMode1(6), WindMode2(7), WindMode3(8)
AC_FUN_DIRECTION:
Auto(0), SwingUD(1), Rotation(2), Fixed(3), SwingLR(4)
The binding asks the air conditioner for its status every 60 seconds, this is the only update from the air conditioner. Sometimes the newest changed aren't reflected at once, so you might have to wait a bit before the air conditioner returns the correct state. The air conditioner return an xml in the following format:
<?xml version="1.0" encoding="utf-8" ?>
<Response Type="DeviceState" Status="Okay">
<DeviceState>
<Device DUID="7825AD1243BA" GroupID="AC" ModelID="AC" >
<Attr ID="AC_FUN_ENABLE" Type="RW" Value="Enable"/>
<Attr ID="AC_FUN_POWER" Type="RW" Value="On"/>
<Attr ID="AC_FUN_SUPPORTED" Type="R" Value="0"/>
<Attr ID="AC_FUN_OPMODE" Type="RW" Value="Heat"/>
<Attr ID="AC_FUN_TEMPSET" Type="RW" Value="20"/>
<Attr ID="AC_FUN_COMODE" Type="RW" Value="Off"/>
<Attr ID="AC_FUN_ERROR" Type="RW" Value="00000000"/>
<Attr ID="AC_FUN_TEMPNOW" Type="R" Value="21"/>
<Attr ID="AC_FUN_SLEEP" Type="RW" Value="0"/>
<Attr ID="AC_FUN_WINDLEVEL" Type="RW" Value="Auto"/>
<Attr ID="AC_FUN_DIRECTION" Type="RW" Value="Fixed"/>
<Attr ID="AC_ADD_AUTOCLEAN" Type="RW" Value="Off"/>
<Attr ID="AC_ADD_APMODE_END" Type="W" Value="0"/>
<Attr ID="AC_ADD_STARTWPS" Type="RW" Value="Direct"/>
<Attr ID="AC_ADD_SPI" Type="RW" Value="Off"/>
<Attr ID="AC_SG_WIFI" Type="W" Value="Connected"/>
<Attr ID="AC_SG_INTERNET" Type="W" Value="Connected"/>
<Attr ID="AC_ADD2_VERSION" Type="RW" Value="0"/>
<Attr ID="AC_SG_MACHIGH" Type="W" Value="0"/>
<Attr ID="AC_SG_MACMID" Type="W" Value="0"/>
<Attr ID="AC_SG_MACLOW" Type="W" Value="0"/>
<Attr ID="AC_SG_VENDER01" Type="W" Value="0"/>
<Attr ID="AC_SG_VENDER02" Type="W" Value="0"/>
<Attr ID="AC_SG_VENDER03" Type="W" Value="0"/>
</Device>
</DeviceState>
</Response>
###Linux / OS X
###Windows
- Cosm Persistence
- db4o Persistence
- Exec Persistence
- InfluxDB Persistence
- JDBC Persistence
- JPA Persistence
- Logging Persistence
- mapdb Persistence
- MongoDB Persistence
- MQTT Persistence
- my.openHAB Persistence
- MySQL Persistence
- rrd4j Persistence
- Sen.Se Persistence
- SiteWhere Persistence
- AlarmDecoder Binding
- Anel Binding
- Arduino SmartHome Souliss Binding
- Asterisk Binding
- Astro Binding
- Autelis Pool Control Binding
- BenQ Projector Binding
- Bluetooth Binding
- Bticino Binding
- CalDAV Binding
- Comfo Air Binding
- Config Admin Binding
- CUL Binding
- CUL Intertechno Binding
- CUPS Binding
- DAIKIN Binding
- Davis Binding
- Denon Binding
- digitalSTROM Binding
- DMX512 Binding
- DSC Alarm Binding
- DSMR Binding
- eBUS Binding
- Ecobee Binding
- EDS OWSever Binding
- eKey Binding
- Energenie Binding
- EnOcean Binding
- Enphase Energy Binding
- Epson Projector Binding
- Exec Binding
- Freebox Binding
- Freeswitch Binding
- Frontier Silicon Radio Binding
- Fritz AHA Binding
- Fritz!Box Binding
- FS20 Binding
- Global Cache IR Binding
- GPIO Binding
- HAI/Leviton OmniLink Binding
- HDAnywhere Binding
- Heatmiser Binding
- Homematic / Homegear Binding
- HTTP Binding
- IEC 62056-21 Binding
- IHC / ELKO Binding
- ImperiHome Binding
- Insteon Hub Binding
- Insteon PLM Binding
- IPX800 Binding
- IRtrans Binding
- jointSPACE-Binding
- KNX Binding
- Koubachi Binding
- LCN Binding
- LightwaveRF Binding
- Leviton/HAI Omnilink Binding
- Lg TV Binding
- Logitech Harmony Hub
- MailControl Binding
- MAX!Cube-Binding
- MAX! CUL Binding
- MiLight Binding
- MiOS Binding
- Modbus TCP Binding
- MPD Binding
- MQTT Binding
- MQTTitude binding
- Neohub Binding
- Nest Binding
- Netatmo Binding
- Network Health Binding
- Network UPS Tools Binding
- Nibe Heatpump Binding
- Nikobus Binding
- Novelan/Luxtronic Heatpump Binding
- NTP Binding
- One-Wire Binding
- Onkyo AV Receiver Binding
- Open Energy Monitor Binding
- OpenPaths presence detection binding
- OpenSprinkler Binding
- OSGi Configuration Admin Binding
- Panasonic TV Bindung
- panStamp Binding
- Philips Hue Binding
- Piface Binding
- pilight Binding
- Pioneer-AVR-Binding
- Plex Binding
- Plugwise Binding
- PLCBus Binding
- Primare Binding
- Pulseaudio Binding
- RFXCOM Binding
- RWE Smarthome Binding
- Sager WeatherCaster Binding
- Samsung AC Binding
- Samsung TV Binding
- Serial Binding
- Sallegra Binding
- Satel Alarm Binding
- Sinthesi Sapp Binding
- Snmp Binding
- Somfy URTSI II Binding
- Sonos Binding
- Squeezebox Binding
- Swegon ventilation Binding
- System Info Binding
- TA CMI Binding
- TCP/UDP Binding
- Tellstick Binding
- TinkerForge Binding
- Tivo Binding
- VDR Binding
- Velleman-K8055-Binding
- Wago Binding
- Wake-on-LAN Binding
- Waterkotte EcoTouch Heatpump Binding
- Weather Binding
- Wemo Binding
- Withings Binding
- XBMC Binding
- xPL Binding
- Yamahareceiver Binding
- Zibase Binding
- Z-Wave Binding
- Asterisk
- Google Calendar
- Linux Media Players
- ROS Robot Operating System
- Telldus Tellstick
- Zoneminder
- Wink Hub (rooted)
- Wink Monitoring
- Transformations
- XSLT
- JSON
- REST-API
- Security
- Service Discovery
- Voice Control
- BritishGasHive-Using-Ruby
- Dropbox Bundle
A good source of inspiration and tips from users gathered over the years. Be aware that things may have changed since they were written and some examples might not work correctly.
Please update the wiki if you do come across any out of date information.
- Comfo Air Binding
- Ecobee Examples
- Nest Examples
- Rollershutter Bindings
- Squeezebox
- WAC Binding
- WebSolarLog
- Alarm Clock
- Convert Farenheit to Celcius
- The mother of all lighting rules
- Reusable Rules via Functions
- Combining different Items
- Items, Rules and more Examples of a SmartHome
- Google Map
- Controlling openHAB with Android
- Usecase examples
- B-Control Manager
- Spell checking for foreign languages
- Flic via Tasker
- Chromecast via castnow