HAI OmniLink Bindings HELP

Hi @craigh,

I’ve raised the following issue in GitHub:

 #84: [omnilink] 2.2.0 binding not working in OpenHAB 2.1 

Thanks,
Randy

Guys I am just digging in to this. I am very confused how I can have a switch with ON - OFF - and then A - B - C - D all on a single line for a particular scene switch? Seems like it should be easy but without a concise example I can’t seem to get it to work properly. Any thoughts? I saw something about rules files but is that still appropriate in OpenHAB 2.x?

@heffneil
Hi Neil, to continue from our cocoontech discussion…

I had some time today to mess around with the scenes. I saw your rule based solution on cocoontech. I also figured out how to do scene switches without using rules. The trick is to use the “state” item for each room. Below is my Family Room item and the example sitemap choices:

Item:
Number FamilyRoom_State "Family Room Lights [%s]" (Lights_FamilyRoom) {channel="omnilink:room:home:1:state"}

Sitemap, 2 options:
Switch item=FamilyRoom_State label="FAMILY ROOM" mappings=[0="OFF", 1="ON", 2="A",3="B",4="C",5="D"]
or
Selection item=FamilyRoom_State label="FAMILY ROOM" mappings=[0="OFF", 1="ON", 2="A",3="B",4="C",5="D"]

I have to try it out! Thanks for the help! Can you expound on your notifications you have enabled? Also anything else you have cool setup? I was trying to stoke the fires of conversation about this on cocoontech.

Just tested this and it does work! Much cleaner! Thanks! I wonder if it is possible to have the state of the room be loaded when the page is loaded? In other words if I push B on the Family Room switch can it reflect that on loading? - Update it looks like it is updating the state on load so that solves that problem! My only issue is the way this is configured in Basic UI I don’t see the room name… I don’t know if you use basic UI but with the optional buttons on the right it leaves no room for the room name?

What is “Lights_FamilyRoom” in your example? I don’t see it used anywhere else? Also the [%s} is the state right? But I don’t believe this is working properly for some reason.

“Lights_FamilyRoom” is a group name. I have nested groups set up using the name of each room and a top level group called “Lights”. This will group the rooms on the sitemap, and all you have to list on the sitemap is the top level group. The rest of the items will show up.

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:on"}
Switch  FamilyRoom_OffScene                   "Scene Off [%s]"               (Lights_FamilyRoom)  {channel="omnilink:room:home:1:off"}       
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:on"}
Switch  Downstairs_OffScene                   "Scene Off [%s]"               (Lights_Downstairs)  {channel="omnilink:room:home:9:off"}       
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:on"}
Switch  Kitchen_OffScene                      "Scene Off"               (Lights_Kitchen)  {channel="omnilink:room:home:17:off"}       
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"}

see http://docs.openhab.org/configuration/items.html#groups for more details.

My sitemap for my lights is very simple (including the two examples I sent you for scenes):

 Frame label="Lights"{
    		Group item=Lights
    		Switch item=FamilyRoom_State label="FAMILY ROOM" mappings=[0="OFF", 1="ON", 2="A",3="B",4="C",5="D"]
    		Selection item=FamilyRoom_State label="FAMILY ROOM" mappings=[0="OFF", 1="ON", 2="A",3="B",4="C",5="D"]
    	}

As for other cool stuff I’m doing with OpenHAB, I have one unfinished experiment after the other, right now. I see OpenHAB as the “glue” I’ve been looking for to bind other technologies with my Omni. The few things I am currently relying on for OH is remote functionality. Using the Harmony remote binding, the Global Cache binding, the Onkyo binding, the LG WebOS binding, and Evdev keylogger (python script), I have a handheld, non-iPad, Harmony button remote (that has a high WAF) that will control the various AV components I have in my home, without needing line of site IR (or any IR, for that matter). It can also control lights attached to my Omni. I also am able to tap into my Rainforest Eagle energy monitor, although I haven’t used the information for anything yet.

My “Goodnight button” that is UPB and controlled through my Omni system now also shuts off all my AV equipment as well. I do still depend on the programming in my Omnipro to do the heavy lifting but not because OpenHAB can’t do it. I’m more comfortable programming my Omni, but I’m learning OpenHAB more and more.

For notifications, I have a few basic set up using the Pushover Binding. You have to register with the Pushover service, add the binding then set up the rules you want. Here is an example “test rule” to give you an idea of how the rule works. This example sends out a Pushover notification when the “Nook Light” is turned on to 100%.

rule "Pushover Notification Test"

when
	Item Lights_FamilyRoom_NookLight_Switch changed from 0 to 100
then
	pushover("NOOK Light ON!")
end

Other stuff I am currently playing with are related to my Opensprinkler set up, controlling my Monoprice 6 zone 6 source audio amp (via a rule and serial control via Global Cache iFlex device). I am also dabbling in z-wave, although I am waiting for the “in development” security version to be released before I do anything serious with z-wave.

Another “todo” is getting Habpanel set up using some cheap Android touch screens I purchased to place on walls in rooms around my home. Habpanel is very slick touchscreen interface but, again, requires a little programming knowledge to get working the way I would want it. Good stuff in the forum, though.

The biggest missing item from the current Omni binding (for me) is the direct ability to control my ZigBee locks. I created a work around so I can control my locks from OH but I had to create a program in my Omni using flags (which are visible in OH as switches).

The current omnilink binding is very new. There are primarily 3 developers who have done all the work (very recently). Not much documention yet but I’m slowly figuring things out.

1 Like

Is there some way to bulk add things vs PaperUI where I have to click the Checkbox and then click yes to everything?

I like this idea and I want to make icons or buttons that show garage status. In other words: If the Middle Garage is open show the button CLOSE Middle Garage. When it is closed make that button say OPEN middle garage. That is what has been missing for a LONG time for me!

There isn’t a way to dynamically generate items with this version but what I have discovered is once you have created your items file the first time, and as long as you change the default controller name to the same as what is in the items file, OH will “auto-link” to the existing items file without having to link the items in the PaperUI. This is very helpful if you want to reload a fresh version of OH.

I haven’t tried making the mapped buttons change but I think I’ve seen some forum examples. I do have icons that visually change with the status of the zone. You assign icons to the items file or on the sitemap from the list of available OH icons:

You add the base icon name like right ofter the item description (before the group name if used or the channel information).

I have my garage door icons and a mapped switch on my sitemap:

Switch item=Buttons_Garage2Btn        label="Right Garage Door" icon="garagedoor" mappings=[ON="Push"]
		Text item=Zones_GarageDrRight_Current label="Right Garage Door" icon="garagedoor"

You’ll notice the icon matches the state of the garage. The locks are also examples. You can also do custom icons as well if you don’t like the standard OH icons. The gate icons are one’s I made. I didn’t make an “open” version yet so those don’t change state.

Ok that is exactly what I am looking for in terms of the status of the garage doors, I don’t get it how it knows or where you tell it to behave this way?

The icons are dynamic. If you look at the list of icons many have multiple names like “garagedoor.svg” “garagedoor-open.svg” and “garagedoor-closed.svg”. By using “garagedoor” as the icon it will follow the status of the zone and automatically change the icon to match the status (open or closed in this case).

Here is my garage zone item, other zones (doors and windows are similar):

Contact Zones_GarageDrRight_Current "Right Garage Door: [%s]" (Zones) {channel="omnilink:zone:home:10:contact"}

Garage 2 button item (from omnipro):

Switch Buttons_Garage2Btn "Garage 2 Btn" (Buttons) {channel="omnilink:button:home:2:press"}

In the sitemap you state the zone status item as a Text item so that it shows you the text status of the zone:

Switch item=Buttons_Garage2Btn        label="Right Garage Door" icon="garagedoor" mappings=[ON="Push"]
		Text item=Zones_GarageDrRight_Current label="Right Garage Door" icon="garagedoor"

No other automation rules required, the status changes when the omni zone status changes.

Ok thanks for the explanation! This is exactly the type of details I was looking for and you helped / saved me from sifting through endless docs to find this answer!

Thanks so much!

Greetings, I have HAI/Leviton Omni experience, but new to OpenHab. Trying to work through the maze of confusing, out of date documents, tutorials, totally different version of OpenHab, different repositories and places to get bindings, different UIs, forks, folder structures, file vs. db based setups, on and on, you have all been there, as it is said, learning curve is VERY steep, like, vertical, hope I can hang on.

Anyway, my main current interest is controlling my OmniIIe panel with OH, and accessing the devices connected to the panel. I am starting from scratch (several times already!) so nothing invested in setup so far. Omni is running latest Leviton 4.0b code, and I am running OH on a Debian RPI, current code, with java 8.151. I can load and run OH no problem, located omnilink bindings, installed them, and can run with some success but not close to what you guys are talking about. With OH 2.1.0 stable code, and omnilink binding from the eclipse marketplace, OH can talk to Omni, and with PaperUI can discover many objects in omni, like buttons, zones, flags, but NOT units. I tried snapshot version of OH, and 1.x and 2.0, 2.2, snapshot versions of omnilink binding installed manually, all with poor results. I am mostly using PaperUI. In my best case so far, where OH discovers much of omni, I tried to manually add a known unit, and it fails and my interpretation of the log is that it could not find a method in the binding for “unit”, which is hard to believe.

So my question is, where is a reasonable place to start? Should I be using the very latest OH snapshot release? Is the binding on eclipse marketplace good enough to do most everything (like find units on my omni) or is there a better version I should get, from somewhere? Is it reasonable to start with db based configs and PaperUI or do I need to figure out how to get manual install working, and where the .cfg and.jar need to go, and what they need to be called? I did see that the discovery process with snapshot code resulted in somewhat different Things in the lists, with more info, so I am inclined to switch to the snapshot repository, purge what I have, reinstall OH from snapshot, and whatever omnilink binding seems to be available from there.

Thanks for any advice to help me get started!

Jack

Replying to myself, sorry. Some success since last post, running 2.2.0 SNAPSHOT, can search and find many Omni Things, but still can’t find any Units. All my Units are X-10 so far, set to Extended house code format. Manually creating Unit thing works but does not link to anything. Manually creating a UPB Thing with same Unit ID works to some extent. Is there a known issue with X-10 Units, or do you have any suggestions to troubleshoot why no Units are found, and no Things created?

Thanks

Sorry, I just saw this.

Units should work fine. I am using it with UPB with no issue. I define them manually (I like my configs to be in source control). I think others are using UPB or other unit types with no problem.

That being said, I have not tested X10 only UPB. Your units aren’t automatically discovered? That should happen no matter the unit type.

Correct, none of my units are automatically discovered. I can add a plain “unit”, (not UPB, ALC, etc) but there is no place to link to the Omni panel Thing for a plain unit, in PaperUI. I can add a UPB unit and have had some success with that. But no auto-discovery.

I have pretty much moved on to Homeseer, partly because things like this seem to work a bit better. It is not great or complete or all that clear either, but it is not quite as steep a learning curve as OpenHab!

Thanks

Another question… how would one pass items (omnilink alarm sensors) to MIOS devices, iif they don’t exist in MIOS? (I would imagine I would create a virtual device in MIOS, and map the status of the item, to the MIOS device - ie contact closed/open)… am I on the right track?

Is there an easy way to do this or is it a one for one rule for each contact in the item list??
Thanks in advance for any assistance!

I am just now setting up openHAB 2.1 on a new MacOS machine, and I’m running into the same problem being reported above… no Units are being discovered from my OmniPro II. Other types of items are found, but not units. I’ve copied over my default.items file from an old openHAB 1 installation that contains all of my units (i.e. lights), and OH2 “sees” these Items. But as 2eJack reported, if I manually create a Thing in OH2, and if I assign it a generic “unit” type, there is no way in PaperUI to link it to the Item that tells OH2 which physical device it is in the OmniPro panel. After reading 2eJack’s above post, I tried creating a Thing that’s a UPB Unit, and now OH2 gives me a Bridge Selection setting that lets me select the matching Item from the default.items file that I copied from OH1 to OH2.

So it appears that there’s some type of glitch in the binding that prevents OH2 from knowing that a plain old “unit” requires a Bridge Selection setting.

BTW, my lights are all Leviton Vizia RF+ devices, not UPB. I am able to control the one Thing (light) that I added with the above UPB Unit method, but it doesn’t seem to be working 100%. Sometimes the dimmer slider moves back to a different value than I set it to in the PaperUI Control page. I suspect it may have to do with the fact that my dimmer is not actually a UPB device.

Another question… how would one pass items (omnilink alarm sensors) to MIOS devices, iif they don’t exist in MIOS? (I would imagine I would create a virtual device in MIOS, and map the status of the item, to the MIOS device - ie contact closed/open)… am I on the right track?

Is there an easy way to do this or is it a one for one rule for each contact in the item list??
Thanks in advance for any assistance!

There is no easy or automated transformation between bindings that i am aware of.

So it appears that there’s some type of glitch in the binding that prevents OH2 from knowing that a plain old “unit” requires a Bridge Selection setting.

Looking at the code, it appears at a quick glance that the binding doesn’t presently support plain units - there should be a log message that says ‘unsupported unit type’.

Can you open an issue over here in GitHub https://github.com/QuailAutomation/openhab2-addons/issues
That is the location where we can discuss and work on changes to the binding.

Thanks!

Hi all,

Does anyone have a solution for this error?


2018-01-03 15:53:33.432 [ERROR] [ome.core.thing.link.ThingLinkManager] - Exception occurred while informing handler: 2018-1-3T15:53:0 is not in a valid format.
java.lang.IllegalArgumentException: 2018-1-3T15:53:0 is not in a valid format.
	at org.eclipse.smarthome.core.library.types.DateTimeType.<init>(DateTimeType.java:96) ~[?:?]
	at org.openhab.binding.omnilink.handler.OmnilinkBridgeHandler.getSystemStatus(OmnilinkBridgeHandler.java:422) ~[?:?]
	at org.openhab.binding.omnilink.handler.OmnilinkBridgeHandler.channelLinked(OmnilinkBridgeHandler.java:469) ~[?:?]
	at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:290) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.time.format.DateTimeParseException: Text '2018-1-3T15:53:0' could not be parsed at index 5
	at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949) ~[?:?]
	at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851) ~[?:?]
	at java.time.LocalDateTime.parse(LocalDateTime.java:492) ~[?:?]
	at org.eclipse.smarthome.core.library.types.DateTimeType.<init>(DateTimeType.java:89) ~[?:?]
	... 10 more

I’ve tried different things, items and even different snapshots but it still throws this error.

I think after a few instances of this it actually restarts my whole rPi system.

Suggestions?