OpenHAB / HAI Omni

Sample button items:

 

Group Buttons                         "Buttons"             (All)
Switch Buttons_Garage1Btn             "Garage 1 Btn"                   (Buttons)              {channel="omnilink:button:home:1:press"}
Switch Buttons_Garage2Btn             "Garage 2 Btn"                   (Buttons)              {channel="omnilink:button:home:2:press"}
Switch Buttons_GateBtn                 "Gate Btn"                       (Buttons)              {channel="omnilink:button:home:4:press"}
Switch Buttons_GateGarage             "Gate/Garage "                   (Buttons)              {channel="omnilink:button:home:5:press"}
Switch Buttons_GdNghtBtn             "Gd Nght Btn"                   (Buttons)              {channel="omnilink:button:home:6:press"}
 
Sitemap switches:

 

Frame label="Outside"{
Switch item=PlPumpUnit_Switch label="Pool Pump"  icon="switch" mappings=[ON="On", OFF="Off"]
Switch item=PlSweepUnit_Switch  label="Pool Sweep" icon="switch" mappings=[ON="On", OFF="Off"]
Switch item=Lights_Outside_PoolLight_Switch label="Pool Light" icon="light" mappings=[ON="On", OFF="Off"]


 
 
Ok but how do you set scenes with the sitemap?  
 
I still have some disconnects because I tried setting the security mode and it didn't work.  Lots to figure out! Thanks for the help!
 
I've had to do quite a bit of trial and error.  As you may have noticed the binding is still a work in progress and there isn't much documentation yet.
 
I don't have an elegant example of scenes to share.  Mine currently has a switch for each scene.  I think I can make a "map" selection type of a switch but I haven't done that yet.
 
Here is my alarm set up:
 

My alarm items:

String    AlarmModeDisarm           "Disarm [%s]"                       (Areas_House)            {channel="omnilink:area:home:1:disarm"}
String    AlarmModeDay              "Day [%s]"                          (Areas_House)            {channel="omnilink:area:home:1:day"}
String    AlarmModeNight            "Night [%s]"                        (Areas_House)            {channel="omnilink:area:home:1:night"}
String    AlarmModeAway             "Away [%s]"                         (Areas_House)            {channel="omnilink:area:home:1:away"}
String    AlarmModeVacation         "Vacation [%s]"                     (Areas_House)            {channel="omnilink:area:home:1:vacation"}
String    AlarmModeDayInstant       "Day Instant [%s]"                  (Areas_House)            {channel="omnilink:area:home:1:day_instant"}
String    AlarmModeNightDelayed     "Night Delayed [%s]"                (Areas_House)            {channel="omnilink:area:home:1:night_delayed"}


Group:Contact:OR(OPEN, CLOSED) Zones "All Zones [%s]"
Group:Switch:OR(ON, OFF) Alarms      "All Alarms [%s]"


Number    AlarmStatusSelect
Number    AlarmMode                 "Alarm [MAP(area-modes.map):%s]"    (Areas_House)            {channel="omnilink:area:home:1:mode"}
Number    ConsoleBeep                                                   (Areas_House)            {channel="omnilink:controller:home:beep"}
 
Sitemap alarm mode selection:


Frame label="Security"{


Selection item=AlarmStatusSelect label="Select Mode" icon="shield" mappings=[0="Off",1="Day",2="Night", 3="Away",4="Vacation"] 
        Text item=AlarmMode  label="Current Alarm Status"  icon="house"
 

 
I'm not sure of the designed functionality, but I was able to make the alarm set using my user code (replaced by "XXXX") by creating a rule:



rule "Set Alarm"
when
    Item AlarmStatusSelect received command
then
    if (AlarmStatusSelect.state==0)
    AlarmModeDisarm.sendCommand("XXXX")
    if (AlarmStatusSelect.state==1)
    AlarmModeDay.sendCommand("XXXX")
    if (AlarmStatusSelect.state==2)
    AlarmModeNight.sendCommand("XXXX")
    if (AlarmStatusSelect.state==3)
    AlarmModeAway.sendCommand("XXXX")
    if (AlarmStatusSelect.state==4)
    AlarmModeVacation.sendCommand("XXXX")
end
 
I haven't figured out if there's a way to dynamically enter a user code.  User codes are new for the OH2 version of the binding. 
 
You'll also need to add the "Map Transformations" binding from the Paper UI (Add-ons>Transformations).  Add a "area-modes.map" file under the /Transform folder in your config directory (same as the items and sitemaps files). 
 
Save the following content in the area-modes.map file:


0=Off
1=Day
2=Night
3=Away
4=Vacation
5=Day instant
6=Night delayed
9=Arming day
10=Arming night
11=Arming away
12=Arming vacation
13=Arming day instant
14=Arming night delayed

 
This will translate the alarm status codes to words.
 
So just now my family and I are getting ready for school and the lights in the kitchen are blinking on and off every second.  Very very strange.  I kinda blame this system because in the about 10 years I have lived here that has never happened?!
 
Ok I found the PUSH button which works well.  Also I found out my button names.  Mine aren't logical like yours for some reason.  For example:
 
omnilink:button:8d1a3831:1:press
 
 
Thats a quick gate - not sure why this is that and yours seems so clean.  Any thoughts on this?
 
My lights sight map is pretty simple:


Frame label="Lights"{
Group item=Lights
}

In the sample above you'll notice the items file, the group names associated with each group of lights with a room name and with the top group just labeled "Lights".  The sightmap will group all the like name lights under the main group "Lights" on the sightmap.
 
For my item setup, the reason mine is clean is a lesson learned...when you set up the controller (the first time) you can add the name of the controller or leave it at the default which is an odd set of letters and numbers.  I named mine "home" 
 
Crap how do I change it :)
 
I miss the rest of the code for your sitemap I don't think it came through properly?
 
I don't know how to setup the scene switches properly - its not working for me as expected.
 
This may be TMI, but here are all of my lights.  The small piece of sitemap code was all of my lights.  Below is my .items file.  The trick is the groupings:

 

Group:Switch:OR(ON, OFF) Lights                "Lights [%s]"      (All)
Group:Switch:OR(ON, OFF) Lights_FamilyRoom    "Family Room [%s]"   (Lights)
Switch FamilyRoom_Switch                   "Family Room [%s]"     (Lights_FamilyRoom) {channel="omnilink:room:home:1:switch"}
Switch  FamilyRoom_OnScene                    "Scene On [%s]"                (Lights_FamilyRoom)  {channel="omnilink:room:home:1:eek:n"}
Switch  FamilyRoom_OffScene                   "Scene Off [%s]"               (Lights_FamilyRoom)  {channel="omnilink:room:home:1:eek:ff"}       
Switch  FamilyRoom_Scene_A                    "Scene A [%s]"                 (Lights_FamilyRoom)  {channel="omnilink:room:home:1:scene_a"}
Switch  FamilyRoom_Scene_B                    "Scene B [%s]"                 (Lights_FamilyRoom)  {channel="omnilink:room:home:1:scene_b"}
Switch  FamilyRoom_Scene_C                    "Scene c [%s]"                 (Lights_FamilyRoom)  {channel="omnilink:room:home:1:scene_c"}
Switch  FamilyRoom_Scene_D                    "Scene D [%s]"                 (Lights_FamilyRoom)  {channel="omnilink:room:home:1:scene_d"}
Number FamilyRoom_State                   "Family Room Lights [%s]" (Lights_FamilyRoom)  {channel="omnilink:room:home:1:state"}
Dimmer Lights_FamilyRoom_Ceiling_Switch   "Ceiling [%s]"         (Lights_FamilyRoom) {channel="omnilink:upb:home:2:level"}
Dimmer Lights_FamilyRoom_FanLight_Switch   "Fan Light [%s]"         (Lights_FamilyRoom) {channel="omnilink:upb:home:3:level"}
Dimmer Lights_FamilyRoom_Lamp_Switch       "Lamp [%s]"             (Lights_FamilyRoom) {channel="omnilink:upb:home:4:level"}
Dimmer Lights_FamilyRoom_CeilingFan_Switch   "Ceiling Fan [%s]"     (Lights_FamilyRoom) {channel="omnilink:upb:home:5:level"}
Dimmer Lights_FamilyRoom_NookLight_Switch   "Nook Light [%s]"         (Lights_FamilyRoom) {channel="omnilink:upb:home:6:level"}


Group:Switch:OR(ON, OFF)  Lights_Downstairs    "Downstairs [%s]"       (Lights)
Switch Downstairs_Switch                   "Downstairs [%s]"         (Lights_Downstairs) {channel="omnilink:room:home:9:switch"}
Switch  Downstairs_OnScene                    "Scene On [%s]"                (Lights_Downstairs)  {channel="omnilink:room:home:9:eek:n"}
Switch  Downstairs_OffScene                   "Scene Off [%s]"               (Lights_Downstairs)  {channel="omnilink:room:home:9:eek:ff"}       
Switch  Downstairs_Scene_A                    "Scene A [%s]"                 (Lights_Downstairs)  {channel="omnilink:room:home:9:scene_a"}
Switch  Downstairs_Scene_B                    "Scene B [%s]"                 (Lights_Downstairs)  {channel="omnilink:room:home:9:scene_b"}
Switch  Downstairs_Scene_C                    "Scene c [%s]"                 (Lights_Downstairs)  {channel="omnilink:room:home:9:scene_c"}
Switch  Downstairs_Scene_D                    "Scene D [%s]"                 (Lights_Downstairs)  {channel="omnilink:room:home:9:scene_d"}
Number Downstairs_State                   "Downstairs Lights [%s]"  (Lights_Downstairs)  {channel="omnilink:room:home:9:state"}
Dimmer Lights_Downstairs_DwnStrHall_Switch   "DwnStr Hall [%s]"     (Lights_Downstairs) {channel="omnilink:upb:home:11:level"}
Dimmer Lights_Downstairs_Foyer_Switch       "Foyer [%s]"             (Lights_Downstairs) {channel="omnilink:upb:home:12:level"}
Dimmer Lights_Downstairs_FntRmOutlet_Switch  "FntRm Outlet [%s]"     (Lights_Downstairs) {channel="omnilink:upb:home:13:level"}
Dimmer Lights_Downstairs_Study_Switch       "Study [%s]"             (Lights_Downstairs) {channel="omnilink:upb:home:14:level"}


Group:Switch:OR(ON, OFF) Lights_Kitchen     "Kitchen [%s]"           (Lights)
Switch Kitchen_Switch                       "Kitchen [%s]"         (Lights_Kitchen) {channel="omnilink:room:home:17:switch"}
Switch  Kitchen_OnScene                       "Scene On"                (Lights_Kitchen)  {channel="omnilink:room:home:17:eek:n"}
Switch  Kitchen_OffScene                      "Scene Off"               (Lights_Kitchen)  {channel="omnilink:room:home:17:eek:ff"}       
Switch  Kitchen_Scene_A                       "Scene A"                 (Lights_Kitchen)  {channel="omnilink:room:home:17:scene_a"}
Switch  Kitchen_Scene_B                       "Scene B"                 (Lights_Kitchen)  {channel="omnilink:room:home:17:scene_b"}
Switch  Kitchen_Scene_C                       "Scene c"                 (Lights_Kitchen)  {channel="omnilink:room:home:17:scene_c"}
Switch  Kitchen_Scene_D                       "Scene D"                 (Lights_Kitchen)  {channel="omnilink:room:home:17:scene_d"}
Number Kitchen_State                       "Kitchen Lights [%s]"     (Lights_Kitchen)  {channel="omnilink:room:home:17:state"}
Dimmer Lights_Kitchen_Sink_Switch           "Sink [%s]"             (Lights_Kitchen) {channel="omnilink:upb:home:18:level"}
Dimmer Lights_Kitchen_Overhead_Switch       "Overhead [%s]"         (Lights_Kitchen) {channel="omnilink:upb:home:19:level"}
Dimmer Lights_Kitchen_Chandalier_Switch      "Chandalier [%s]"         (Lights_Kitchen) {channel="omnilink:upb:home:20:level"}
Dimmer Lights_Kitchen_Cabinet1_Switch       "Cabinet 1 [%s]"         (Lights_Kitchen) {channel="omnilink:upb:home:21:level"}
Dimmer Lights_Kitchen_Ceiling1_Switch       "Ceiling 1 [%s]"         (Lights_Kitchen) {channel="omnilink:upb:home:22:level"}
Dimmer Lights_Kitchen_Cabinet2_Switch       "Cabinet 2 [%s]"         (Lights_Kitchen) {channel="omnilink:upb:home:23:level"}
Dimmer Lights_Kitchen_Ceiling2_Switch       "Ceiling 2 [%s]"         (Lights_Kitchen) {channel="omnilink:upb:home:24:level"}


Group:Switch:OR(ON, OFF) Lights_Outside        "Outside [%s]"       (Lights)
Switch Outside_Switch                       "Outside [%s]"         (Lights_Outside) {channel="omnilink:room:home:25:switch"}
Switch  Outside_OnScene                       "Scene On"                (Lights_Outside)     {channel="omnilink:room:home:25:eek:n"}
Switch  Outside_OffScene                      "Scene Off"               (Lights_Outside)     {channel="omnilink:room:home:25:eek:ff"}       
Switch  Outside_Scene_A                       "Scene A"                 (Lights_Outside)     {channel="omnilink:room:home:25:scene_a"}
Switch  Outside_Scene_B                       "Scene B"                 (Lights_Outside)     {channel="omnilink:room:home:25:scene_b"}
Switch  Outside_Scene_C                       "Scene c"                 (Lights_Outside)     {channel="omnilink:room:home:25:scene_c"}
Switch  Outside_Scene_D                       "Scene D"                 (Lights_Outside)     {channel="omnilink:room:home:25:scene_d"}
Number Outside_State                       "Outside Lights [%s]"     (Lights_Outside)     {channel="omnilink:room:home:25:state"}
Switch Lights_Outside_BackFlood_Switch       "Back Flood [%s]"         (Lights_Outside) {channel="omnilink:upb:home:27:level"}
Switch Lights_Outside_FtPchLght_Switch       "Ft Pch Lght [%s]"     (Lights_Outside) {channel="omnilink:upb:home:28:level"}
Switch Lights_Outside_GarageExt_Switch       "Garage Ext [%s]"         (Lights_Outside) {channel="omnilink:upb:home:29:level"}
Switch Lights_Outside_BackPatio_Switch       "Back Patio [%s]"         (Lights_Outside) {channel="omnilink:upb:home:30:level"}
Switch Lights_Outside_PoolLight_Switch       "Pool Light [%s]"             (Lights_Outside) {channel="omnilink:upb:home:31:level"}
Switch Lights_Outside_GarageInt_Switch       "Garage Int [%s]"         (Lights_Outside) {channel="omnilink:upb:home:32:level"}


Group:Switch:OR(ON, OFF) Lights_UpstairsHall    "Upstairs Hall [%s]"   (Lights)
Switch Lights_UpstairsHall_Switch           "Upstairs Hall [%s]"     (Lights_UpstairsHall)  {channel="omnilink:room:home:33:switch"}
Switch  Lights_UpstairsHall_OnScene           "Scene On"                (Lights_UpstairsHall)  {channel="omnilink:room:home:33:eek:n"}
Switch  Lights_UpstairsHall_OffScene          "Scene Off"               (Lights_UpstairsHall)  {channel="omnilink:room:home:33:eek:ff"}       
Switch  Lights_UpstairsHall_Scene_A           "Scene A"                 (Lights_UpstairsHall)  {channel="omnilink:room:home:33:scene_a"}
Switch  Lights_UpstairsHall_Scene_B           "Scene B"                 (Lights_UpstairsHall)  {channel="omnilink:room:home:33:scene_b"}
Switch  Lights_UpstairsHall_Scene_C           "Scene c"                 (Lights_UpstairsHall)  {channel="omnilink:room:home:33:scene_c"}
Switch  Lights_UpstairsHall_Scene_D           "Scene D"                 (Lights_UpstairsHall)  {channel="omnilink:room:home:33:scene_d"}
Number Lights_UpstairsHall_State         "Upstairs Hall Lights [%s]" (Lights_UpstairsHall)  {channel="omnilink:room:home:33:state"}
Dimmer Lights_UpstairsHall_StairCan_Switch   "Stair Can [%s]"         (Lights_UpstairsHall)  {channel="omnilink:upb:home:35:level"}
Dimmer Lights_UpstairsHall_UpHallCans_Switch "Up Hall Cans [%s]"     (Lights_UpstairsHall)  {channel="omnilink:upb:home:36:level"}
Dimmer Lights_UpstairsHall_UpendHall_Switch  "Up end Hall [%s]"     (Lights_UpstairsHall)  {channel="omnilink:upb:home:37:level"}


Group:Switch:OR(ON, OFF) Lights_MasterBed   "Master Bedroom [%s]"   (Lights)
Switch Lights_MasterBed_Switch               "Master Bedroom [%s]"     (Lights_MasterBed)    {channel="omnilink:room:home:41:switch"}
Switch  Lights_MasterBed_OnScene              "Scene On [%s]"                (Lights_MasterBed)    {channel="omnilink:room:home:41:eek:n"}
Switch  Lights_MasterBed_OffScene             "Scene Off [%s]"               (Lights_MasterBed)    {channel="omnilink:room:home:41:eek:ff"}       
Switch  Lights_MasterBed_Scene_A              "Scene A [%s]"                 (Lights_MasterBed)    {channel="omnilink:room:home:41:scene_a"}
Switch  Lights_MasterBed_Scene_B              "Scene B [%s]"                 (Lights_MasterBed)    {channel="omnilink:room:home:41:scene_b"}
Switch  Lights_MasterBed_Scene_C              "Scene c [%s]"                 (Lights_MasterBed)    {channel="omnilink:room:home:41:scene_c"}
Switch  Lights_MasterBed_Scene_D              "Scene D [%s]"                 (Lights_MasterBed)    {channel="omnilink:room:home:41:scene_d"}
Number Lights_MasterBed_State           "Master Bedroom Lights [%s]"  (Lights_MasterBed)    {channel="omnilink:room:home:41:state"}
Dimmer Lights_MasterBed_Overhead_Switch   "Overhead [%s]"         (Lights_MasterBed)    {channel="omnilink:upb:home:43:level"}


Notice I have a group name for each room (Lights_Family) (Lights_Kitchen), etc.  Then there are "GROUP" names above each room's lights.  The top group is the (Lights) group and the second is the group that includes the rooms lights into the main (Lights) group.  The sitemap simply has 
 

Frame label="Lights"{
Group item=Lights
}

All of the lights will group up (including the scene switches) under the lights tab by room.   As I mentioned before, I think there is a more elegant solution to the scene switches but I haven't set mine up. 
 
TMI is best! I will parse this tomorrow and try to get it to work!  I am enjoying learning this piece by piece - I hope to get this nice and fancy down the road!
 
I've been toying around with OpenHAB for the last year and I like it.  It has come a long way in the last year.  WIth Haiku getting flaky I started looking for a viable replacement.  I think OpenHAB is it.  I not only can get notifications like Haiku (no extra software required) I am also able to tie my mis-matched multimedia equipment together using global cache iFlex devices and control all of it with my Harmony remote.  
 
Admittedly, the learning curve is not as easy as programming directly into our Omni's and the rule engine is a little cryptic for non-programmers like me but it is all totally learnable. the OpenHAB forum has lots of good information.
 
Yeah I am researching.  It seems powerful! I haven't even reviewed the notifications.  Are they working on your iphone?  
 
I want to pop cameras when a zone goes not ready like I have in Haiku but with ip cameras which are modern....
 
You have options for notifications but I landed on the "Pushover" binding.  Pushover is a service and it works great on iPhone.  You configure notifications through rules.  
 
Most IP cameras that have a webstream work, although I don't have any set up.  I've been watching Github and there is someone working on a Blue Iris binding that interests me.  There is already a ZoneMinder (http://zoneminder.com) binding. For most IP cameras, half the battle is figuring out the web address for the stream you want to view..
 
Back
Top