Hop til indhold
  • 0

openHAB2 IHC binding


Pauli Anttila
 Share

Spørgsmål

Update 12.3.2019:

Binding has been merged to openHAB main repository and will available in 2.5 version. Before that, new version can be found from official openHAB snapshot builds.

Before official add-on documentation page is updated, binding documentation can found here.

 

NOTE. If you have used older beta versions of the binding, beware that there has been some breaking changes lately:

  • Controller address parameter is not anymore ip, but hostname
  • "-channel" suffix is removed from channel types. E.g. switch-channel is just switch.

 

###########################################################################################################################

 

Even openHAB 1 IHC binding has been rock solid for many years, I finally decided to port the binding to support openHAB 2 features.

Latest version: https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.ihc/2.4.0-SNAPSHOT/

Documentation link

Some improvements / features:

  • By default, binding create channels automatically from project file (currently all dataline_inputs, dataline_outputs, airlink_inputs, airlink_outputs and resource_temperature).
  • Auto creation can be disabled, and channels can be created manually (then all resource id's are supported).
  • Support both Paper UI and thing files configuration.
  • Channels for basic controller information (state, SW and HW version, controller uptime, etc).
  • Trigger channels support (button short press, long press and extra long press).
  • Support multiple controllers (those who have e.g. two controllers environment).

 5b000b95160a8_ScreenShot2018-05-19at14_32_14.thumb.png.4093d93247a17cd4fc3d66307c895976.png

5b000ba2cc62b_ScreenShot2018-05-19at14_33_06.thumb.png.648edf0e40855577f58e973c448514b6.png

 

Link til kommentar
Del på andre sites

Recommended Posts

  • 0
1 hour ago, Gilbert said:

With the leatest update can i then remove the old openhab 1 binding ?

Not sure what do you mean by this? OH2 binding doesn’t have any dependencies to OH1 binding. Or do you mean that is all OH1 features supported by the OH2 binding? If yes, it’s pretty impossible the say as there is so many different ways one can use the binding, so basically you need to try by you self and see if you can fully replace OH1 binding by OH2 binding.

Link til kommentar
Del på andre sites

  • 0
4 timer siden, Gilbert skrev:

With the leatest update can i then remove the old openhab 1 binding ?

Yes. I dont see anything in the old binding which the new binding doesnt support as well. But you´ll need to make quite a few changes. 
Btw it´s the same question you asked the other day. And therefore you´ll get basicly the same answer :)

Link til kommentar
Del på andre sites

  • 0

dunno why my last post got posted again sorry..

but now have trouble with updating data to ihc controller.

eks. on the photo i have zwave sensor that i like to be updated to ihc, it was no problem in old binding, seams to give trouble, i have tryed also to only use .things file same thing is does not replicate.screen.thumb.jpg.9daecd392fcd3ce2f42fee4eefb19c0c.jpg

 

 

Link til kommentar
Del på andre sites

  • 0

I havnt tried this myself. But I believe you´ll have to read from your z-wave device and write onto the Ihc controller.. So you´ll need to create the ihc channel manually and on the item you´ll probably do something like this: (remember to set the write only on the ihc channel). 

number item-name "label" <icon> (group) {channel="ihc channel", channel="z-wave channel" }

(number requires that the lux resource ID is a number channel.. I dont know if it is, otherweise you´ll have to use String insted I guess).

Link til kommentar
Del på andre sites

  • 0
På 29.3.2019 at 21:10 , Pauli Anttila skrev:

@Kandersen, the fixes are now merged to main repo. I also fixed the Dimmer ON command bug. Binding now set Dimmer to 100 when ON command is received. In fact, binding set resource to resource max value by ON command and to resource min value by OFF command. Dimmer min is 0 and max is 100, but some other resources min and max could be something else. I didn't introduce configurable level yet. 

Hi @Pauli Anttila
Got the latest openhab 2.5 snapshot installed last night. And the Dimmer now turns on at level 100 when asking Google to turn on the light. So this works pretty well.. Great job!
I really look forward to the configurable level.. That will make it a massive feature, like using sceenaries in Visual..  

Link til kommentar
Del på andre sites

  • 0
På 2.4.2019 at 17:35 , Pauli Anttila skrev:

@Kandersen, from here you can find first test version for configurable ON level. It should work with dimmer channels and you need to add onLevel channel parameter (e.g. onLevel=70). I don't have IHC dimmers so I didn't test it well.

Hi @Pauli Anttila

I just tested the function.
At first try it worked great. I inserted onLevel=35 on two dimmers, and the dimmers turn on at level 35. 
But if I change the value to onLevel=55, the dimmers still turn on at value 35.

These are my channels:
 

	   Type dimmer   :koekkenvask_dimmer           "Køkkenvask Dæmper"                    [ resourceId=13957725, onLevel=55 ]
	   Type dimmer   :koekkenunderskab_dimmer      "Køkken Underskab Dæmper"              [ resourceId=4358493, onLevel=55 ]

 

Link til kommentar
Del på andre sites

  • 0

@Pauli Anttila I didn´t try restart openhab, (I´d thought about it, but wanted to tell you first).
I´ll give it a try tonight to see if it changes.. If it does, I agree, it may be a openhab issue :mellow: 

Anyway, this feature is quite awesome. It makes the use of voice command so much more correct, as it now turns on the light exactly as if somone pushed the button. It´s like going from an "okay" feature to a "perfect" feature! Really nice job done! Massive credits for all your hard work! 

As soon as you´re having a kinda like finished milestone done, let´s talk about how I can help to optimize the doc´s. My idea is to fill the docs with more examples of how to do things, based on manual created channels and items/sitemaps. Maybe even a danish section, as IHC seem more concentrated in the danish market. I dont know if there is an conflict in this with the openhab basic rules for documentation. 

Link til kommentar
Del på andre sites

  • 0

i have tried this with no luck

Citat

ihc:controller:elko [ hostname="192.168.0.3", username="admin", password="password", timeout=5000, loadProjectFile=true, createChannelsAutomatically=false ] {
    Channels:
    Type number    : drivhus_ihctemp    "My Test temp"    [ resourceId=2935316,pulseWidth=300 ]
    Type number    : drivhus_ihchumid    "My Test humid"    [ resourceId=2935079 ]
    Type number    : drivhus_ihclux    "My Test lux"    [ resourceId=3208726 ]
    Type contact    : drivhus_ihcpir    "My test pir"    [ resourceId=3208282 ]
        
}

and then these items

Number drivhus_sensor_ihctemp (drivhus) { channel="ihc:controller:elko:divhus_ihctemp" }
Number drivhus_sensor_ihchumid (drivhus) { channel="ihc:controller:elko:divhus_ihchumid" }
Number drivhus_sensor_ihclux (drivhus) { channel="ihc:controller:elko:divhus_ihclux" }
Switch drivhus_sensor_ihcpir (drivhus) { channel="ihc:controller:elko:divhus_ihcpir" }

 

 

 

Link til kommentar
Del på andre sites

  • 0

and my old item file was like this with ihc 1 binding, different item names

 

Number drivhus_sensor_temp (drivhus) {ihc=">0x2cca14"}

Number drivhus_sensor_lys (drivhus) {ihc=">0x30fb5a"}

Number drivhus_sensor_uv (drivhus)

Number drivhus_sensor_humidity (drivhus) {ihc=">0x2cc927"}

Switch drivhus_sensor_pir (drivhus) {ihc=">0x30f45a"}

 

 

Link til kommentar
Del på andre sites

  • 0

You have different channel names in item and thing files. Item file channels are divhus_ and thing file have drivhus_. 

Simplifying the setup, I added only one channel to following example. When ever that work, you can add more channels.

ihc:controller:elko [ hostname="192.168.0.3", username="admin", password="password", timeout=5000, loadProjectFile=true, createChannelsAutomatically=false ] {
    Channels:
    Type number    : drivhus_ihctemp    "My Test temp"    [ resourceId=2935316, direction="WriteOnly" ]
}

Number drivhus_sensor_ihctemp (drivhus) { channel="ihc:controller:elko:drivhus_ihctemp" }

First of all, I assume that you have linked item drivhus_sensor_ihctemp to your zwave node temperature channel as well (e.g. via PaperUI)?
So when ever item drivhus_sensor_ihctemp is update by the zwave node, IHC binding will send item drivhus_sensor_ihctemp value to resourceId 2935316.
WriteOnly direction make sure that drivhus_sensor_ihctemp item is never updated from IHC controller (binding just mirror the value from item to IHC). 
WriteOnly direction is same as '>' in IHC v1 binding.

You try to update value to IHC lux / temperatue sensor product? Do you have real lux / temperature sensor device connected to that or is it just virtual device in IHC side? 
I'm not sure if it's possible to write data to that (never tried that), but if that has been work with OH1 binding then it should work OH2 binding as well.
 

 

Link til kommentar
Del på andre sites

  • 0
1 time siden, Gilbert skrev:

i have tried this with no luck

and then these items

Number drivhus_sensor_ihctemp (drivhus) { channel="ihc:controller:elko:divhus_ihctemp" }
Number drivhus_sensor_ihchumid (drivhus) { channel="ihc:controller:elko:divhus_ihchumid" }
Number drivhus_sensor_ihclux (drivhus) { channel="ihc:controller:elko:divhus_ihclux" }
Switch drivhus_sensor_ihcpir (drivhus) { channel="ihc:controller:elko:divhus_ihcpir" }

 

 

 

You have made a mis-spelling in the channel section of you items.. It says "....:divhus..." It should be "...:drivhus" 

like this:

Number drivhus_sensor_ihctemp (drivhus) { channel="ihc:controller:elko:drivhus_ihctemp" }
Number drivhus_sensor_ihchumid (drivhus) { channel="ihc:controller:elko:drivhus_ihchumid" }
Number drivhus_sensor_ihclux (drivhus) { channel="ihc:controller:elko:drivhus_ihclux" }
Switch drivhus_sensor_ihcpir (drivhus) { channel="ihc:controller:elko:drivhus_ihcpir" }

:)

Link til kommentar
Del på andre sites

  • 0
37 minutter siden, Pauli Anttila skrev:

You have different channel names in item and thing files. Item file channels are divhus_ and thing file have drivhus_. 

Simplifying the setup, I added only one channel to following example. When ever that work, you can add more channels.


ihc:controller:elko [ hostname="192.168.0.3", username="admin", password="password", timeout=5000, loadProjectFile=true, createChannelsAutomatically=false ] {
    Channels:
    Type number    : drivhus_ihctemp    "My Test temp"    [ resourceId=2935316, direction="WriteOnly" ]
}

Number drivhus_sensor_ihctemp (drivhus) { channel="ihc:controller:elko:drivhus_ihctemp" }

First of all, I assume that you have linked item drivhus_sensor_ihctemp to your zwave node temperature channel as well (e.g. via PaperUI)?
So when ever item drivhus_sensor_ihctemp is update by the zwave node, IHC binding will send item drivhus_sensor_ihctemp value to resourceId 2935316.
WriteOnly direction make sure that drivhus_sensor_ihctemp item is never updated from IHC controller (binding just mirror the value from item to IHC). 
WriteOnly direction is same as '>' in IHC v1 binding.

You try to update value to IHC lux / temperatue sensor product? Do you have real lux / temperature sensor device connected to that or is it just virtual device in IHC side? 
I'm not sure if it's possible to write data to that (never tried that), but if that has been work with OH1 binding then it should work OH2 binding as well.
 

 

yes sorry for the misspelling.

and yes it is just a virtual ihc sensor on a empty input 

 

but it still dosent work, when i look in habmin, the ihc channel is updated 16,7 , but when i check in service view it says 0 

 

 

 

Link til kommentar
Del på andre sites

  • 0
1 minut siden, Gilbert skrev:

but it still dosent work, when i look in habmin, the ihc channel is updated 16,7 , but when i check in service view it says 0 

My experience... dont trust habmin. It´s faulty and doesnt update correct.
Use the tail log to see what happens and what readings you get. Or create a simple sitemap to look for the states/values. 
As far as your example goes, it should work allright.. One thing though.. For sensors you only read, I would add readonly to the channels. There is no reason to use read/write to a resourceID which cant handle write. 

Like this:

[ resourceId=26459, direction="ReadOnly" ]

 

Link til kommentar
Del på andre sites

  • 0
1 time siden, Pauli Anttila skrev:

@Gilbert, If fact, it doesn't work without rules as your zwave sensor doesn't send command but update to the item. So you need to introduce simple rule or use "follow" profile in item definition.

 

 

 

like this, it dosent help

 

Number drivhus_sensor_ihctemp (drivhus) { channel="ihc:controller:elko:drivhus_ihctemp" [profile="follow", profile-
parameterID="zwave_device_167941bc836_node21_sensor_temperature" ] }

Link til kommentar
Del på andre sites

  • 0
10 minutter siden, Gilbert skrev:

zwave_device_167941bc836_node21_sensor_temperature

Are you sure this is the correct channel format? Normally it uses : and not _
Like this. This is the channel for one of my z-wave sensors:

"zwave:device:169d5902619:node8:sensor_temperature"

 I´m using a UZB1 gateway (USB dongle) and the sensor is a Everspring ST814 Temperature and Humidity sensor . 

Link til kommentar
Del på andre sites

  • 0
15 minutter siden, Kandersen skrev:

Are you sure this is the correct channel format? Normally it uses : and not _
Like this. This is the channel for one of my z-wave sensors:

"zwave:device:169d5902619:node8:sensor_temperature"

 I´m using a UZB1 gateway (USB dongle) and the sensor is a Everspring ST814 Temperature and Humidity sensor . 

it dosent change anything.

the simple setup works fine in the old binding, so i dont get that i need to make a rule or profile follow now.

the easy was just linking them 

 

Link til kommentar
Del på andre sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gæst
Svar på dette spørgsmål

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loader...
 Share

×
×
  • Tilføj...

Important Information

Privatlivspolitik og We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

1200x630bb.png

ok