openhab/openhab — pull request #1645 by steintore (2014-11-11 08:20:50+00:00)
Title: New Samsung AirConditioner binding

This is a binding that lets OpenHAB control one or more local Samsung Air Conditioners.
It pulls the AC-status every 60seconds.

The WIKI-page will look something like this:

Documentation of the Samsung AC binding Bundle

## Introduction

Binding should be compatible with Samsung Air Conditioner models witch connects to your WiFi.

For installation of the binding, please see Wiki page [[Bindings]].

## Binding Configuration

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:.host=192.168.1.2
# samsungac:.mac=7825AD1243BC
# samsungac:.token=33965901-4482-M849-N716-373832354144

# Host and port of the second AC to control
# samsungac:.host=192.168.1.3
# samsungac:.mac=7825AD1243BC
# samsungac:.token=22332423-4482-M849-N716-373832354144

`` and `` can be freely set to whatever name you want to give for a certain Air Conditioner (e.g. "Livingroom" or "Bedroom"), thus 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

The when you enter the host and mac details in the configuration, you will still need to retreive 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 the configuration.

## Item Binding Configuration

In order to bind an item to the device, you need to provide configuration settings. The easiest 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="[|

```