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

Hi Pauli

Many people including me have benfitted a lot from your original binding 1.x to Openhab. Thank you very much for your effort developing very stable, flexible and robust software which have worked seamlessly for many years now.

That you have now decided to develop binding version 2.x for OpenHab2 is the best news in a long time. I would like to participate in testing, and I also have some input to this, which I will send you in a private email. If interested, I can also offer do donate something to you, because your binding has been of great value to me.

Ejvind

Link til kommentar
Del på andre sites

  • 0

Here is the link to the first test version <-- see first post -->

Just drop the jar file to openHAB addons folder. Binding should work fine also with 2.2 openHAB version. Both version 1 and this new should run parallels also in the same openHAB instance. 

There is no documentation available yet, so I hope you familiar with the openHAB 2 and paper UI (or things file). I will create documentation, when channel structures and functionalities are more close to the final.

Good luck :)

 

Add new thing...

5b043a639d1db_ScreenShot2018-05-21at21_08_05.thumb.png.99461be49302df16d9df1653f3e4d57b.png

5b043a6dadd88_ScreenShot2018-05-21at21_09_02.thumb.png.a8ac4746a03be3f4a009eb5d4f25f611.png

 

You can add new channels manually from icon right side of the Channels text.

5b043a960dd85_ScreenShot2018-05-21at21_09_19.thumb.png.b0c577e28501f7505e9bb158eb7c37d7.png

 

Link til kommentar
Del på andre sites

  • 0

Hi Pauli

Thanks. I have downloaded it and added to addons, and it showing up in Things. Also, it automaticly detects my inputs and outputs as shown below. However, it seems I can only press the blue "O" for the built-in Controller Channels and Signal Strength. All the autodetected content from my installation of type Switch creates no response when the blue "O" is pressed.

I am running version 2.3.0.

Can you help wit this?

Ejvind

ProblemBinding2x.jpg

Link til kommentar
Del på andre sites

  • 0
7 hours ago, EjvindHald said:

Hi Pauli

Thanks. I have downloaded it and added to addons, and it showing up in Things. Also, it automaticly detects my inputs and outputs as shown below. However, it seems I can only press the blue "O" for the built-in Controller Channels and Signal Strength. All the autodetected content from my installation of type Switch creates no response when the blue "O" is pressed.

I am running version 2.3.0.

Can you help wit this?

Ejvind

 

Did you try to refresh the page (reload the Paper UI page)? I have seen similar problem, but page refresh have always helped (issue is related to Paper UI not the binding itself).

Link til kommentar
Del på andre sites

  • 0
37 minutter siden, Pauli Anttila skrev:

Did you try to refresh the page (reload the Paper UI page)? I have seen similar problem, but page refresh have always helped (issue is related to Paper UI not the binding itself).

Yes, I have tried refresh and also several different browsers with same result. I do not know if it is related but I am using the new controller hw 7.

Link til kommentar
Del på andre sites

  • 0
44 minutter siden, Pauli Anttila skrev:

Did you try to refresh the page (reload the Paper UI page)? I have seen similar problem, but page refresh have always helped (issue is related to Paper UI not the binding itself).

Hi Pauli, and thanks for an updated add-on !

I have the same issue as Ejvind, I have tried an force-refresh (ctrl+f5) it does not change anything.

Link til kommentar
Del på andre sites

  • 0

I have now tested it again, and it looks good. I can now push and link to an item if needed, and it seems to be fine. However, so far I guess I will just keep an items file, because then everything is scripted which is convient. I have made this test in my items file, and it works fine:

Switch IHC2Spisebord "Spisebord2"   <phlampe>     {channel="ihc:controller:22d2638c:outputs#2845531"}

This is really good!

I have also tried to add a channel manually, which I could, but I could not get it to work. Maybe because I do not know proper channel naming. @Pauli AnttilaCan you provide an example of a channel like above for a manual added channel belonging to a resource in an function block?

From @Pauli AnttilaI would also like a channel example of the <, > ON, OFF, miliiseconds and more cool functions that were in binding 1.x. Then I will test those as well in the new binding.

Thanks.

Link til kommentar
Del på andre sites

  • 0
3 timer siden, Pauli Anttila skrev:

I updated the dropbox link to to updated binding version, which hopefully solve the linking problem.

2.3.0 RC1 Paper UI (at least) have couple issues now open related to channel linking, so there might still be some difficulties to link in some circumstances.

It works here aswell !

Good job !

Link til kommentar
Del på andre sites

  • 0

You can add channels manually from Paper UI

5b05c93a6a981_ScreenShot2018-05-23at22_47_542.thumb.png.a23487f2df20c9783efb242cdb272d52.png

Add e.g. switch channel

5b05c94241d70_ScreenShot2018-05-23at22_35_45.png.041d488251692db6140e1cbc6b77dbeb.png

Which will then look like following

5b05c94a2e560_ScreenShot2018-05-23at22_36_30.thumb.png.1a03b5c1f30c398b159152fd6f8be670.png

 

Or you can manage things and channels via things file (e.g. ihc.things)

ihc:controller:elko [ ip="192.168.1.2", username="openhab", password="openhab", timeout=5000, loadProjectFile=true, createChannelsAutomatically=false ] {
    Channels:
        Type switch-channel : my_test_switch "My Test Switch" [
            resourceId=3988827
        ]
        
        Type contact-channel : my_test_contact "My Test Contact" [
            resourceId=3988827
        ]
        
        Type number-channel : my_test_number "My Test Number" [
            resourceId=3988827
        ]
}

which will look like following

5b05c9f2a8400_ScreenShot2018-05-23at22_47_54.thumb.png.7a6992f649654a728019c774d622960b.png 

5b05c9f908988_ScreenShot2018-05-23at22_48_06.png.84156d2eccd02a82a2002182d93ba5d2.png

Link til kommentar
Del på andre sites

  • 0
33 minutes ago, Kandersen said:

Pauli - Is it normal to create items as things?
From you screendumps, it looks like you´re creating items (switch) as a thing?

Items can't be created as a thing. Which screenshot you are referring?

I have created channels which can be then linked to the items. Every channel also have a data type, e.g. Switch, which can be then linked to Switch item.

 

Link til kommentar
Del på andre sites

  • 0
22 timer siden, Pauli Anttila skrev:

You can see full channel links e.g. from Paper UI. In my example (test-switch),

image.png.4884ff8133086d898dcb5cbb5354a5c0.png

item definition is 


Switch testSwitch { channel="ihc:controller:elko:test-switch" }

 

Hi Pauli

I have it working now, but I do not know the core reason for the problem. After I dropped and recreated it in PaperUI 2 times it suddenly worked. I never received any errors, but no messages were submitted to the IHC controller. At last messages were sent, and the controller reacted to the input. I verified everything in Service View.

So everything seems to be fine. Only thing remaining is to test <, > ON, OFF along with milliseconds. This is a very powerful feature of the binding. Looking forward to a line example in the items file for that, so I can test this also. Thanks.

Ejvind

Link til kommentar
Del på andre sites

  • 0
11 timer siden, Pauli Anttila skrev:

Items can't be created as a thing. Which screenshot you are referring?

I have created channels which can be then linked to the items. Every channel also have a data type, e.g. Switch, which can be then linked to Switch item.

 

My mistake, I missread your screendump :mellow:

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