- Automatic discovery of NEEO brains on the network and automatic registering of the openHAB as an SDK.
- A NEEO dashboard tile that will show the status of NEEO Brain connections and provide the ability to customize the mapping between openHAB things/item and NEEO device/capabilities.
- Discovery of openHAB things on the NEEO app.
- Full two-way communcation between openHAB and brain.
The NEEO brain has an (unknown) size limit to the amount of items that can be returned for a search and you may be going beyond that limit.
Narrow your search to a specific item to see if you were hitting that search limit.
### IP Address
Whatever openHAB (with this integration) runs on will need a static IP address assigned to it.
The integration will register the IP address with the brain and the brain will callback to the IP address.
If your IP address changes, the brain will no longer be able to reach the integration and operation will fail (such as a search or receiving any updates in NEEO).
### openHAB Primary Address
This integration will use the primary address defined in openHAB to register itself as an SDK with the NEEO Brain (allowing the NEEO Brain to discover your things and to callback to openHAB to retrieve item values).
If you change the primary address option, this binding will de-register the old address and re-register the new address with the NEEO Brain.
## Mappings
For openHAB things/items to appear on the NEEO system, you must create mappings between openHAB and NEEO.
To accomplish this, go to the NEEO Integration dashboard (typically http://localhost:8080/neeo/index.html).
This will open up a screen similar to the following
![Configuration](doc/dashboardmain.png)
### Tabs
There are a number of tabs:
1. Brains - will allow you to view the status of any connected brain (see Brains Tab below).
2. Things - will allow you to manage the exposure of things to the brain (see Things Tab below).
Press the refresh button (next to the tab header) to refresh the information on the particular tab.
### Brains Tab
The Brains tab provides a listing of all NEEO brains that have been found, some information about them and their current status (connected or not).
If your brain has not been discovered, you may manually enter the brain by pressing the "Add Brain" button.
You will be prompted for the Brain's IP address and once entered, the brain should be listed in the resulting table.
#### Actions
1. The 'phone' icon will bring up the EUI associated with the NEEO Brain.
2. The 'file' icon will allow you to view the associated NEEO Brain's log.
3. The 'dot' icon will blink the LED on the associate NEEO Brain (allowing you to identify the brain if you have multiple ones).
4. The 'trash' icon will disconnect from the related Brain.
This will allow you to remove a stale (no longer used) Brain or remove the Brain to be rediscovered again (which may fix a communication issue with the brain).
Please note the integration will properly handle IP address changes.
If the brain is assigned a new IP address, the integration will reconnect to the new IP address change when it receives the notification.
You can force the issue immediately by doing an "Add Brain" with the new IP address.
### Things Tab
The Things tab is where you specify the mappings.
There are two types of devices listed here:
1. openHAB things - any OH2 thing in the openHAB system and optionally (see configuration), any NEEO binding thing.
2. virtual things - these are things you defined that can mix/match any OH1 or OH2 item.
openHAB things can be mapped to a NEEO device and the items within the thing can be mapped to NEEO device capabilities (buttons, lists, switches, sliders, etc).
Virtual things represent a 'thing' that doesn't exist in openHAB but that you would like to define as a NEEO device.
You can then add OH1/OH2 items to that virtual thing and those items will be mapped to a NEEO device capabilities.
There are two types of items supported:
1. Any valid openHAB item (OH1 or OH2).
2. Trigger channels - any trigger channel defined in an openHAB thing or any trigger channel that you add to an existing thing (regardless if it is an openHAB thing or a virtual thing).
Trigger channels are useful to add to an existing thing if you want to add a button on NEEO that when pushed, can perform some rule that you have defined on a trigger.
Please review [NEEO SDK](https://github.com/NEEOInc/neeo-sdk) documentation before attempting to map.
This document describes some (but not all) of the requirements for NEEO things and capabilities.
The NEEO SDK document is written from the perspective of writing native plugins for NEEO but much of its concepts apply here.
Mappings consist of two parts:
1. Mapping of an openHAB thing to a NEEO device or the creation of a new virtual thing.
2. Mapping of an openHAB item or trigger channels to one or more NEEO capabilities.
Please see this screen shot for reference to the next two sections.
This screen show partially shows the setup of my Russound (whole house music system):
![Configuration](doc/dashboardthings.png)
##### NEEO Text Label
The NEEO text label type will allow you to specify showing the label and text or just the text.
To show both a label and the text on the NEEO remote, uncheck the check mark next the the associated label field and enter in the label you wish to assign to the text.
By turning off the label and specifying the format of the text field, you will be able to create your own custom label then.
##### NEEO List
You can now specify a LIST type for items.
A list is simply a list of labels and associated values that the user can choose from on the remote (similar, in concept, to a drop down).
Simply choose the LIST type and press the icon that appears next to the label.
You can then build the list by specifying:
1. The value to send to openHAB if the item is chosen.
2. The label shown on the remote for that value.
3. An optional URI to an image to show for the line.
The image will be scaled down by the remote.
Best practice: although you can specify any URI, to avoid issues where the internet is not available (or the source of the image is offline) - put the image in your conf/images directory and specify the URI to that.
That way the image will always be available if openHAB is running.
Please note that any changes to the LIST will become active IMMEDIATELY upon saving changes.
There is no need to drop and re-add the device if you make changes (even though the UI may say to re-add the device).
#### Thing to Device
The first step in mapping is to map an openHAB thing to a NEEO device type.
You may either choose an existing openHAB item or create a new 'virtual' thing by pressing the "+ Virtual" button and assign a name to it.
The following action can then be performed:
1. Press the "+" (or "-") icon to see/hide the items for the thing.
2. Press the "i" button to see information about the thing (online status, etc).
3. [Virtual things] Modify the device name.
4. Specify or choose the NEEO device type for the openHAB thing.
5. [Virtual things] Press the "+" icon to add new items to the device.
6. Press the puzzle piece icon to add new trigger channel to the device.
7. Press the SAVE icon to save the mapping for the openHAB thing.
8. Press the REFRESH icon to refresh the mapping to the last saved state (discarding any pending changes).
9. [openHAB things] Press the RESTORE icon to restore the mapping to its original content (discarding any pending changes).
10. [Virtual things] Press the DELETE icon to delete the thing.
11. [things with trigger channel(s)] Press the RULES icon to download an example .rules file for the triggers.
12. [NON ACCESSORIE/LIGHT] Specify device timings (see below).
The list of device types is unknown, must match those that NEEO expects (such as "ACCESSORIE", "AUDIO", etc) and you have the ability to enter the device type directly or select from a list of device types that have been discovered (although all may not be functional on the NEEO brain yet).
Please review the NEEO SDK documentation for hints on what device types are supported and what capabilities are supported by each device type.
Please note that "ACCESSORIE" is not a misspelling.
That is how the NEEO brain expects it.
You may specify a type of "ACCESSORY" when defining a new type, but after saving - the type will switch back to "ACCESSORIE"
#### Properties Page
The properties page (accessible via the gear icon) will present properties specific to the device.
##### Advanced Properties
1. The driver version can be used to override the driver version sent to the brain. Please note that this number is automatically incremented by one whenever you save the device definition.
2. The 'Specific name' can be used to override the thing name presented to the NEEO Brain.
3. The 'Custom Icon' can be used to assign a custom icon to the device (if left blank, the icon is assigned by the NEEO Brain according to the NEEO Type).
The only 'officially' supported custom icon is "sonos" however you can assign any variety of icons available on the brain.
A list of some of the icons that can be assigned: ![Configuration](doc/icons.png)
##### Device Timings
You can specify three device timings for any non ACCESSORIE and non LIGHT thing:
1. ON - specify how long (in milliseconds) it take the device to turn on.
2. SWITCH - specify how long (in milliseconds) it takes the device to switch inputs.
3. OFF - specify how long (in milliseconds) it takes the device to turn off.
If the device does not have power state or doesn't support input switching, the numbers will be ignored.
1. Text Label - this will simply take the toString() of the item value and optionally format via the Java String Format found in the "Format/Command" field before sending it to the NEEO brain.
2. Button - this will create virtual button with the text from the "NEEO Label".
Upon pressing the button, the specified command in the "Format/Command" will be sent to the item (or ON will be sent if nothing has been specified).
Please note that you can also specify a hard button in the "NEEO Label" - in which case nothing will appear on the NEEO remote screen and the action will occur from the NEEO remote hard button.
You must specify all the hard buttons for a capability (as specified in the NEEO SDK documentation) for the button to work.
Example: if you only defined VOLUME DOWN but not VOLUME UP - the button will not work on the remote.
Likewise, which hard buttons are active or not additionally depends on the NEEO device type.
Additionally, a switch can be bound to hard button pairs (the VOLUME keys, the POWER ON/OFF, the CHANNELS, etc).
The command that is sent is dependent on the KEYS chosen (POWER ON/OFF will send ON/OFF to the underlying item, all others will send an INCREASE/DECREASE).
Similar to the "Button" type - please review the NEEO SDK documentation.
2. Set the overall (HSBType) item to a NEEO type of "Power".
3. Duplicate the overall item and on the duplicate, set the NEEO Type to "Switch" with the label "POWERONOFF".
4. Duplicate the overall item (again) and on the duplicate, set the NEEO Type to "Switch" with a label of "power".
5. Set the HUE/SATURATION/TEMPERATURE to a NEEO type of "Slider" (you can set the BRIGHTNESS as well - but NEEO will automatically assign that for you).
The items section then provide a list of the items you have specified.
To specify a new item, simply click on the line in question - and then enter the item name.
All item names (OH1 and OH2) are shown in the dropdown (and will allow you to search/choose from that dropdown).
You will NOT be able to select an item not shown in this list - all items must be valid openHAB items.
You can delete individual items by pressing the "-" key next to it.
Press OK will add those items to the virtual thing.
Pressing cancel will simply dismiss the window without doing any action.
#### Trigger Channels
Pressing the puzzle piece icon will add a new trigger channel to the associated thing.
A trigger channel will appear as a button on the NEEO Brain (with the specified label) and when pressed, will create a trigger event (with the optional payload) to be consumed by a rule.
You can use the RULES icon (on the device) to download an example .rules file with the rule definition for all triggers defined.
Furthermore the command string "MenuLeft" will be sent to the "KeyRelease Event" item when the "CURSOR LEFT" hard button is pressed on the remote (right/up/down for the other buttons).
As definitions are saved, this file will be updated.
## Firmware
The following are notes on some of the NEEO Firmwares:
### 52.10
The following changes have occurred:
1. Added support for driver version
2. Added support for UI actions on lists
### 51.1
The following changes have occurred:
1. Added support for the LIST type.
2. Changed internals to reflect new naming standards enforced by NEEO.
3. Updated search to provide better results (matches NEEO search perfectly now).
As of this firmware, NEEO is enforcing some internal naming standards (sdk name, device name and sensor names).
*I STRONGLY recommend that you delete and readd all the devices you have after upgrading to this version.*
The old devices will still work but there is one danger to leaving them.
As part of this firmware, there is a new "SDK Integeration" found on the NEEO Brain.
Within this screen, there is a button the "Cleanup unused adapters" that will remove SDK's that have no references to them.
Unfortunately this functionality depends on the new naming standards and existing devices will be 'stranded' (and rendered non-working) since the openHAB SDK name did not match that naming standard.
According to NEEO, there is a chance that future firmware changes will continue looking for these naming standards and there may be additional issues with these devices.
### 50.x
The following changes have occurred:
1. Added support for the MUSICPLAYER type.
2. Added support to hide the label for a text field.