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’.
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.
@Spacecoast
I didn’t see a clear way to set the alarm in the binding so I created a rule. I named my Switch item AlarmStatusSelect. This is a number type item
rule "Set Alarm"
when
Item AlarmStatusSelect received command
then
if (AlarmStatusSelect.state==0)
AlarmModeDisarm.sendCommand("####")
if (AlarmStatusSelect.state==1)
AlarmModeDay.sendCommand("####")
if (AlarmStatusSelect.state==2)
AlarmModeNight.sendCommand("####")
if (AlarmStatusSelect.state==3)
AlarmModeAway.sendCommand("####")
if (AlarmStatusSelect.state==4)
AlarmModeVacation.sendCommand("####")
end
The “####” is a generic pin I set up in the Omni that I have set as a “system” code. I don’t like having to use a pin in the rule but it was the only way I could figure to set the alarm.
Doesn’t work. What I have noticed is that creating rules for contacts requires me to set the contact not by name but by full device:
ule "Motion Contact Open"
when
Item omnilink_zone_4515ad84_1_current_condition changed from 0 to 1
then
{
sendHttpGetRequest("http://172.16.1.136:3480/data_request?id=lu_action&output_format=json&DeviceNum=163&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1")
}
end
I wonder if that’s what the problem is here.
Here is the log when I use Paper UI and send the codes manually:
2018-03-04 11:11:49.689 [me.event.ThingUpdatedEvent] - Thing 'network:device:172_16_0_150' has been updated.
2018-03-04 11:12:05.596 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_current_condition changed from 0 to 1
2018-03-04 11:12:05.602 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_contact changed from CLOSED to OPEN
2018-03-04 11:12:09.199 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_contact changed from OPEN to CLOSED
2018-03-04 11:12:09.201 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_current_condition changed from 1 to 0
2018-03-04 11:12:12.319 [ome.event.ItemCommandEvent] - Item 'omnilink_area_4515ad84_1_night_delayed' received command XXXX
2018-03-04 11:12:12.328 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_night_delayed changed from NULL to XXXX
2018-03-04 11:12:12.444 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_night_delayed changed from XXXX to UNDEF
2018-03-04 11:12:12.556 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_mode changed from 0 to 14
2018-03-04 11:12:12.560 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_contact changed from CLOSED to OPEN
2018-03-04 11:12:12.561 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_current_condition changed from 0 to 1
2018-03-04 11:12:14.676 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_contact changed from OPEN to CLOSED
2018-03-04 11:12:14.677 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_current_condition changed from 1 to 0
2018-03-04 11:12:22.350 [ome.event.ItemCommandEvent] - Item 'omnilink_area_4515ad84_1_disarm' received command XXXX
2018-03-04 11:12:22.359 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_disarm changed from UNDEF to XXXX
2018-03-04 11:12:22.438 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_disarm changed from XXXX to UNDEF
2018-03-04 11:12:22.488 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_mode changed from 14 to 0
2018-03-04 11:12:24.673 [ome.event.ItemCommandEvent] - Item 'omnilink_area_4515ad84_1_day_instant' received command XXXX
2018-03-04 11:12:24.679 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_day_instant changed from NULL to XXXX
2018-03-04 11:12:24.752 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_day_instant changed from XXXX to UNDEF
2018-03-04 11:12:24.798 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_mode changed from 0 to 13
2018-03-04 11:12:35.786 [ome.event.ItemCommandEvent] - Item 'omnilink_area_4515ad84_1_disarm' received command XXXX
2018-03-04 11:12:35.793 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_disarm changed from UNDEF to XXXX
2018-03-04 11:12:35.872 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_disarm changed from XXXX to UNDEF
2018-03-04 11:12:35.916 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_mode changed from 13 to 0
2018-03-04 11:12:39.823 [ome.event.ItemCommandEvent] - Item 'omnilink_area_4515ad84_1_vacation' received command XXXX
2018-03-04 11:12:39.827 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_vacation changed from NULL to XXXX
2018-03-04 11:12:39.905 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_vacation changed from XXXX to UNDEF
2018-03-04 11:12:39.948 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_mode changed from 0 to 12
2018-03-04 11:12:47.168 [ome.event.ItemCommandEvent] - Item 'omnilink_area_4515ad84_1_disarm' received command XXXX
2018-03-04 11:12:47.171 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_disarm changed from UNDEF to XXXX
2018-03-04 11:12:47.240 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_disarm changed from XXXX to UNDEF
2018-03-04 11:12:47.285 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_mode changed from 12 to 0
2018-03-04 11:12:53.953 [ome.event.ItemCommandEvent] - Item 'omnilink_area_4515ad84_1_away' received command XXXX
2018-03-04 11:12:53.957 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_away changed from UNDEF to XXXX
2018-03-04 11:12:54.034 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_away changed from XXXX to UNDEF
2018-03-04 11:12:54.078 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_mode changed from 0 to 11
2018-03-04 11:12:58.101 [ome.event.ItemCommandEvent] - Item 'omnilink_area_4515ad84_1_disarm' received command XXXX
2018-03-04 11:12:58.110 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_disarm changed from UNDEF to XXXX
2018-03-04 11:12:58.180 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_disarm changed from XXXX to UNDEF
2018-03-04 11:12:58.223 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_mode changed from 11 to 0
2018-03-04 11:13:03.053 [ome.event.ItemCommandEvent] - Item 'omnilink_area_4515ad84_1_night' received command XXXX
2018-03-04 11:13:03.055 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_night changed from NULL to XXXX
2018-03-04 11:13:03.134 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_night changed from XXXX to UNDEF
2018-03-04 11:13:03.176 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_mode changed from 0 to 10
2018-03-04 11:13:07.096 [ome.event.ItemCommandEvent] - Item 'omnilink_area_4515ad84_1_disarm' received command XXXX
2018-03-04 11:13:07.099 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_disarm changed from UNDEF to XXXX
2018-03-04 11:13:07.174 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_disarm changed from XXXX to UNDEF
2018-03-04 11:13:07.216 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_mode changed from 10 to 0
2018-03-04 11:13:15.462 [ome.event.ItemCommandEvent] - Item 'omnilink_area_4515ad84_1_day' received command XXXX
2018-03-04 11:13:15.467 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_day changed from UNDEF to XXXX
2018-03-04 11:13:15.542 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_day changed from XXXX to UNDEF
2018-03-04 11:13:15.579 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_mode changed from 0 to 9
2018-03-04 11:13:24.934 [ome.event.ItemCommandEvent] - Item 'omnilink_area_4515ad84_1_disarm' received command XXXX
2018-03-04 11:13:24.938 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_disarm changed from UNDEF to XXXX
2018-03-04 11:13:25.014 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_disarm changed from XXXX to UNDEF
2018-03-04 11:13:25.058 [vent.ItemStateChangedEvent] - omnilink_area_4515ad84_1_mode changed from 9 to 0
2018-03-04 11:13:44.325 [me.event.ThingUpdatedEvent] - Thing 'network:device:172_16_1_100' has been updated.
2018-03-04 11:14:37.233 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_contact changed from CLOSED to OPEN
2018-03-04 11:14:37.251 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_current_condition changed from 0 to 1
2018-03-04 11:14:41.089 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_contact changed from OPEN to CLOSED
2018-03-04 11:14:41.098 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_current_condition changed from 1 to 0
2018-03-04 11:14:43.786 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_contact changed from CLOSED to OPEN
2018-03-04 11:14:43.794 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_current_condition changed from 0 to 1
2018-03-04 11:14:44.381 [me.event.ThingUpdatedEvent] - Thing 'network:device:172_16_1_100' has been updated.
2018-03-04 11:14:47.391 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_contact changed from OPEN to CLOSED
2018-03-04 11:14:47.392 [vent.ItemStateChangedEvent] - omnilink_zone_4515ad84_1_current_condition changed from 1 to 0
I was told to try this as well:
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
With the following sitemap:
```php
Selection item=AlarmStatusSelect label="Select Mode" icon="shield" mappings=[0="Off",1="Day",2="Night", 3="Away",4="Vacation"]
Neither method works, but putting the codes in the PaperUI Channel and sending them manually triggers and deactivates the alarm....
I don't understand why the contact actually addresses "XXXX:XXXX:XXX:XXX" have to be used instead of their defined assignments. Does this have something to do with this?
Any help appreciated!!
@Spacecoast
"XXXX" is a usable pin in your system. I used “XXXX” so I didn’t share a usable pin to arm/disarm my system.
I made a “System” user in my Omni and use that pin. It isn’t optimal to have to use a pin in open view in the code but it is how the binding is configured to work.
No, I used my own master pin I created for openhab.
the XXXX i blocked out so in case someone figures out where I live, I don’t have to redo the code!!
LOL
neither of the two methods are working for me in openhab 2,2
If I manually enter the code in the box next to each arm method (or disarm) in the PaperUI Control screen manually, I can manually send the code thru the binding and arm and disarm it… but none of the logic works above.
if you put your code where it says undef and hit the green icon, it sends the command and you can see the command in the log above…
Number AlarmStatusSelect
Number AlarmMode "Alarm [MAP(area-modes.map):%s]" (Areas_House) {channel="omnilink:area:home:1:mode"}
Where mine says “home” you would put the omnilink controller in your system.
Here is the working functionality and screenshots in my OH setup. My controller name is “home”.
Item:
Number AlarmMode "Alarm [MAP(area-modes.map):%s]" (Areas_House) {channel="omnilink:area:home:1:mode"}
Rule (or use the direct method @broconne showed in the sitemap):
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
Map file to translate the omnilink binding numbers to readable words:
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 is my items file for the alarm. I think the issue is up here: I don’t have this set correctly, I think.
/* ‘omnilink:area:4515ad84:1’ MainArea */
Can someone check their items file and make sure I didn’t forget something? This actually allows me to see the alarm status while it arms as well as chose the alarm arming I want, but nothing happens, despites the logs seeing the numeric selection work on the sitemap file. The problem appears to be below…