Jump to content
IHC-User.dk
  • 0

Question

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

 

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

Pauli is now making some final enhancements to the IHC binding 2 to prepare for a final release in the OpenHAB project. 

I have only wired devices in my installation, and no wireless such as a dimmer. Can anyone with a wireless dimmer in the installation please test if this works as intended in the new binding?

You need to manually add a new channel for the wireless device in the Things file, since there is no auto discovery for wireless.

 

Share this post


Link to post
Share on other sites
  • 0
2 timer siden, Henrik Bækbo skrev:

I am fairly new to OpenHAB and the IHC-binding, but I have a number of wireless dimmers in my setup. I am willing to do the test, but need a description on how to add a wireless dimmer to the Things/Items file manually.

If you are new to OpenHAB, then I suggest this approach:

  1. Get OpenHAB working with binding 1 for an ordinary wired switch output (item and sitemap file)
  2. Get OpenHAB working with binding 1 for a wireless dimmer output (item and sitemap file)
  3. Get OpenHAB working with binding 2 for an ordinary wired switch output (item, sitemap and things file)
  4. Get OpenHAB working with binding 2 for a wireless dimmer output (item, sitemap and things file)

This will ensure you build up the knowledge needed + have proper connection to IHC. I have no dimmers at all, so I do not know the input in Things for this. But a manually added channel in binding 2 for a switch could look like this:

Type switch-channel        : ihcoutput     "IHC output"    [resourceId=3938651]

where resourceId is the number from Visual. That line should be added in a Things file for binding 2.

 

Share this post


Link to post
Share on other sites
  • 0

I added airlink_relay, airlink_dimming and resource_humidity_level support to auto discovery. I don't own those devices, so can't test the support either. So someone who own those could try this version. Wireless dimmers supports only direct level adjustment (0-100). So increase and decrease functionality is not directly supported.

 

Share this post


Link to post
Share on other sites
  • 0
1 time siden, Henrik Bækbo skrev:

I already have a setup working with binding 2 for ordinary wired output.

I have however not been able to find out, or find any information about how to set up a wireless dimmer, hence the question. Any one who can help?

On the documentation link here provided by Pauli you can see some examples. I guess it would be similar to: 

Type dimmer-channel                : MyDimmer        "Dimmer living room"   [ resourceId=9000002, direction="WriteOnly", pulseWidth=300 ]

 

 

Share this post


Link to post
Share on other sites
  • 0

Have tested Pauli Anttilas new release including airline_relay and airline_dimming. It seems to work OK.

Additional comments:

- The auto discovery place the new entries at the end of the Channels List instead of sorting the entries together with the rest of the list.

- If the IHC-binding is to be used together with the Homekit-binding there need to be a way to tag each item with an Accessory Type as required by Homekit.

Share this post


Link to post
Share on other sites
  • 0
35 minutter siden, Henrik Bækbo skrev:

Have tested Pauli Anttilas new release including airline_relay and airline_dimming. It seems to work OK.

Additional comments:

- The auto discovery place the new entries at the end of the Channels List instead of sorting the entries together with the rest of the list.

- If the IHC-binding is to be used together with the Homekit-binding there need to be a way to tag each item with an Accessory Type as required by Homekit.

While working with this, I have found that in many ways it is easier to work with Things file instead of the auto discovery. These 2 topics mentioned by you are examples of the same.

A Things file is also handy if you wan't to utilize the cool extra features provided in the binding such as "Direction" and "commandToReact". If you migrate to other hardware or to another box a file with all your configurations can come in handy. Same for backup purposes.

To enable this you need to use "createChannelsAutomatically=false" statement in the header of the Things file as shown by Pauli on his documentation site.

Finally, please be aware that the Homekit integration is currently being refactored to utilize a new metadata feature in OpenHAB. Among other things this will enable all Homekit device types when it is ready. You can read more here.

Share this post


Link to post
Share on other sites
  • 0

Hej beklager jeg skriver på dansk men mit skriftlige engelsk er for dårlig.  

Jeg har også været ved at lege lidt med den nye version, men det er kun de trådløse tryk som bliver fundet hos mig, ingen lysdæmpere men jeg kan tilføre dem manuelt ved at lave en ihc.things fil som denne:

ihc:controller:elko [ ip="192.168.8.200", username="admin", password="xxxxx", timeout=5000, loadProjectFile=true, createChannelsAutomatically=false ] {
Channels:
Type switch-channel : ihcoutput "Baggang output" [ resourceId=1024347, direction="ReadOnly" ]
Type switch-channel : ihcinput1 "Baggang input 1" [ resourceId=5394012, direction="WriteOnly", pulseWidth=1000, commandToReact="ON" ]
Type switch-channel : ihcinput2 "Baggang input 2" [ resourceId=5394268, direction="WriteOnly", pulseWidth=1000, commandToReact="OFF" ]
 
Type dimmer-channel : Kontor_spot_loft "Kontor" [ resourceId=2540893 ]
 
Type dimmer-channel : Koekken_spot_kogeoe "Loft Kogeø" [ resourceId=2549085 ]
Type dimmer-channel : Koekken_spot_loft "Loft køkken" [ resourceId=2545757 ]
Type dimmer-channel : Spisebordslamper "Spisebords Lamper" [ resourceId=3190365 ]
 
 
 
}

Hvor efter de fint kommer frem i Paper UI

image.thumb.png.def79313509490a87fc7a4fd0de79d98.png

Og kan derefter enten lave en manuel ihc.items fil some denne:

//This is the item file
 
Switch Baggang_spot "Lys i baggang" <Light> ["Lighting"] {channel="ihc:controller:elko:ihcoutput", channel="ihc:controller:elko:ihcinput1", channel="ihc:controller:elko:ihcinput2"}
 
Dimmer Kontor_spot "Lys i kontor" <Light> ["Lighting"] {channel="ihc:controller:elko:Kontor_spot_loft"}
 
Dimmer Kogeoe_spot "Spot kogeø" <Light> ["Lighting"] {channel="ihc:controller:elko:Koekken_spot_kogeoe"}
 
Dimmer Koekken_spot_loft "Spot loft køkken" <Light> ["Lighting"] {channel="ihc:controller:elko:Koekken_spot_loft"}
 
Dimmer Spisebordslamper "Lys over spisebord" <Light> ["Lighting"] {channel="ihc:controller:elko:Spisebordslamper"}

 

eller bruge Paper UI metoden og dernæst ved hjælp af OpenHAB REST API Documentions tagge items

image.thumb.png.04bd95b0ed22236b7fc7483a7711a724.png 

 

Men når jeg beder sire eller google assistent om at tænde for lysene, tænder de godt nok men på det laveste mulige blus, hvorefter jeg skal bede dem om at skue helt op for lyset.

Laver jeg mine items rigtig?

Skal jeg lave en regel for at få lyddæmperne til at tænde på 100 %?

Share this post


Link to post
Share on other sites
  • 0
8 minutter siden, Anders Sæderup skrev:

Men når jeg beder sire eller google assistent om at tænde for lysene, tænder de godt nok men på det laveste mulige blus, hvorefter jeg skal bede dem om at skue helt op for lyset.

Laver jeg mine items rigtig?

Skal jeg lave en regel for at få lyddæmperne til at tænde på 100 %?

Hmm, pudsigt du har lige præcis det problem.
Jeg bruger godt nok stadigvæk binding 1.12, men i Google assistant har jeg det modsatte problem. Jeg kan kun få dem til at tænde på 100%. Det er derimod det eneste som giver mening, fordi IHC resoourcen er til dimmeren og ikke til scenarie. (jeg kan ikke linke openhab item til et scenarie i IHC). Så jeg undre mig over, hvorfor dine dimmere tænder på laveste. Hvor får den det fra? Kan det evt. være fordi resourcen er linket til touch i FBen? 

Share this post


Link to post
Share on other sites
  • 0
29 minutes ago, Kandersen said:

 

Hmm, pudsigt du har lige præcis det problem.
Jeg bruger godt nok stadigvæk binding 1.12, men i Google assistant har jeg det modsatte problem. Jeg kan kun få dem til at tænde på 100%. Det er derimod det eneste som giver mening, fordi IHC resoourcen er til dimmeren og ikke til scenarie. (jeg kan ikke linke openhab item til et scenarie i IHC). Så jeg undre mig over, hvorfor dine dimmere tænder på laveste. Hvor får den det fra? Kan det evt. være fordi resourcen er linket til touch i FBen? 

Jeg bruger resource id´en fra Lys niveau 1556942813_IhcopenHAB.thumb.png.dd4e81bbee69b991a7e9a606a41fd461.png

 

 

 

Share this post


Link to post
Share on other sites
  • 0

Instead of changing the output (Lys niveau) directly then try to push the inputs (Tænd and Sluk in your example). In the new binding this functionality works like this example for switches:

Rows in the Things file:
Type switch-channel        : ihcoutput     "IHC output"    [resourceId=3938651, direction="ReadOnly"]  //output
Type switch-channel        : ihcinput1        "IHC input1"    [resourceId=1412954, direction="WriteOnly", pulseWidth=100, commandToReact="ON"]    //input1
Type switch-channel        : ihcinput2        "IHC input2"    [resourceId=1413210, direction="WriteOnly", pulseWidth=100, commandToReact="OFF"]    //input2


Row in the Items file:
Switch    IHC2Spisebord "Spisebord"      {channel="ihc:controller:haldIHC:ihcoutput", channel="ihc:controller:haldIHC:ihcinput1", channel="ihc:controller:haldIHC:ihcinput2"}

 

I cannot test for dimmers, because I have no dimmers in my installation. 

By using this approach IHC will always be in control, and you can benefit from other IHC logic you might have made. It is the same as >[ON:xx] and >[OFF:xx] in binding 1, and I have mentioned it here

 

 

Share this post


Link to post
Share on other sites
  • 0
3 timer siden, Anders Sæderup skrev:

Jeg bruger resource id´en fra Lys niveau 

Yep, det samme gør jeg. 
 

2 timer siden, EjvindHald skrev:

Instead of changing the output (Lys niveau) directly then try to push the inputs (Tænd and Sluk in your example)

To my understanding, you cant use this for a dimmer. Either it will return an error and breake the connection between openhab and Google, or Google will not be able to dimm the light then, cause you´ll have to define it with a Switchable tag. 
 

Share this post


Link to post
Share on other sites
  • 0
On 9/30/2018 at 7:56 PM, Henrik Bækbo said:

Have tested Pauli Anttilas new release including airline_relay and airline_dimming. It seems to work OK.

Great

On 9/30/2018 at 7:56 PM, Henrik Bækbo said:

If the IHC-binding is to be used together with the Homekit-binding there need to be a way to tag each item with an Accessory Type as required by Homekit.

Tags are added to items and items are not related to bindings. Bindings communicate via channels.

Share this post


Link to post
Share on other sites
  • 0
19 hours ago, EjvindHald said:

Instead of changing the output (Lys niveau) directly then try to push the inputs (Tænd and Sluk in your example). In the new binding this functionality works like this example for switches:

Rows in the Things file:
Type switch-channel        : ihcoutput     "IHC output"    [resourceId=3938651, direction="ReadOnly"]  //output
Type switch-channel        : ihcinput1        "IHC input1"    [resourceId=1412954, direction="WriteOnly", pulseWidth=100, commandToReact="ON"]    //input1
Type switch-channel        : ihcinput2        "IHC input2"    [resourceId=1413210, direction="WriteOnly", pulseWidth=100, commandToReact="OFF"]    //input2


Row in the Items file:
Switch    IHC2Spisebord "Spisebord"      {channel="ihc:controller:haldIHC:ihcoutput", channel="ihc:controller:haldIHC:ihcinput1", channel="ihc:controller:haldIHC:ihcinput2"}

 

I cannot test for dimmers, because I have no dimmers in my installation. 

By using this approach IHC will always be in control, and you can benefit from other IHC logic you might have made. It is the same as >[ON:xx] and >[OFF:xx] in binding 1, and I have mentioned it here

 

 

Yes I have seen this method and it works fine with ordinary switches. But not with dimmers, if I make row that you have described and put the dimmer resource ID for: light level, turn on, turn off.
And make an item file identical to the one you have made, I can turn the dimmer on and off like a switch and it turns on the brightness level it had when it was turned off.

But it is not possible to dim the light!

I have tried to change the first channel to a dimmer channel and the item to a dimmer item:

Channels:
 
Type dimmer-channel : Kontoroutput "Kontor output" [resourceId=2540893, direction="ReadOnly"] //output
Type switch-channel : Kontorinput1 "Kontor input1" [resourceId=871185, direction="WriteOnly", pulseWidth=100, commandToReact="ON"] //input1
Type switch-channel : Kontorinput2 "Kontor input2" [resourceId=871441, direction="WriteOnly", pulseWidth=100, commandToReact="OFF"] //input2
 
//item
Dimmer Kontor "Lys i kontor" <Light> ["Lighting"] {channel="ihc:controller:elko:Kontoroutput", channel="ihc:controller:elko:Kontorinput1", channel="ihc:controller:elko:Kontorinput2"}

It does not work either, because the dimmer-channel directions is ReadOnly

If I change it to WriteRead it works as before, it turns on the light at the lowest brightness when i use the apple home app and siri or google assistent.  

Share this post


Link to post
Share on other sites
  • 0
On 10/14/2018 at 9:59 AM, Christian Alexandersen said:

Hi all

I have tried IHC OpenHAB2 binding for a while now and it works fine. Great work.

But i need some help to make a rule that runs when i do a long push on a IHC input

Dont quite know how .-)

Did you already checked the wiki? There is an example.

 


    Channels:
        Type push-button-trigger           : my_test_trigger                           [ resourceId=3988827, shortPressMaxTime=1000, longPressMaxTime=2000, extraLongPressMaxTime=4000 ]
}

Will trigger LONG_PRESS when button is pressed more than 1000ms but less than 2000ms. Other triggers are SHORT_PRESS and EXTRA_LONG_PRESS.


when
    Channel 'ihc:controller:elko:my_test_trigger' triggered LONG_PRESS 
then
    logInfo("Test","Long press detected")
end

 

Share this post


Link to post
Share on other sites
  • 0
23 hours ago, BrianPedersen said:

When will the final release be available truth openhab downloads, I'm planning a brand new installation soon....

It's hard to say as I can't do code review to my own binding. Hopefully it will merged before next release. Review process is nowadays the bottle neck as there are too many open pull request and too few people to do code reviews.

But what you and others could do to hopefully speed up the process is to give a upvote to pull request (just give a +1 comment). You need to create GitHub account if you don't already have it. 

Share this post


Link to post
Share on other sites
  • 0
23 timer siden, Pauli Anttila skrev:

It's hard to say as I can't do code review to my own binding. Hopefully it will merged before next release. Review process is nowadays the bottle neck as there are too many open pull request and too few people to do code reviews.

But what you and others could do to hopefully speed up the process is to give a upvote to pull request (just give a +1 comment). You need to create GitHub account if you don't already have it. 

I have a GitHub account, so no problem, do you have a link?

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   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.

Loading...

×
×
  • Create New...

Important Information

Privacy Policy 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.