OpenHAB 2.1 - IHC

Hi, I’m brand new in this world with OpenHAB and unfortunately not much of a geek :frowning: I’d like to have the opportunity to use my IHC solution with other things like Z-Wave and more intelligent so HIFI can also be controlled. I want OpenHAB to work with IHC, maybe I should use HomeSeer afterwords because I can not code? Initially, I need IHC to talk to OpenHAB. I have installed the “IHC binding”, in Add-ons - “Bindings”, but it does not appear in “Binding”, under “Configuration”. Is there anyone who has made a dummys guide to make it work? I’m using “Paper UI”.

Hi @Dan_Nielsen

http://docs.openhab.org/addons/bindings/ihc1/readme.html

Does this get you on the right track?

Unfortunately not ;(

I’ve never used this binding before, but hopefully I can point you in the right direction. Where did you get stuck, and which method did you use to install openHAB? I believe that the binding is an openHAB 1.x binding, which means that you’ll have to configure it through text files in your openHAB folders.

OH… I thought i could use the “Paper UI” :frowning:
I have it installed on my Synology server.
Don’t know how to configure it through text files… :frowning:

Unfortunately not, there isn’t an openHAB 2 specific version of the binding but since it’s backwards compatible…

When it’s talking about those files go to where you installed it, the cfg file it’s talking about is in ./openHAB2/services, just open it up using a text editor and put in the ip, username, etc…

To define your items, you need to make a new .items file in ./openHAB2/conf/items/. It gives you an example of an entry to this file, but make sure you familiarise yourself with it using http://docs.openhab.org/configuration/items.html and the other pages around it!

Don’t know how to finde the files on my Synology

Is it in:

/volume1/@appstore/openHAB2/

How du i get to that? Is there a program i can download to the Synology?

i try to use WinSCP but when i try to change ihc.cfg i get “Permission denied”.

I think it is because i need to move the file (ihc.cfg) from /openHAB2/conf/services to /openHAB2/conf/items

But how do i test if it works?

Is there a way to change the *.cfg files from the DSM menu (Synology interface) instead of using WinSCP?

cfg files stay where they are, .items files go into the items folder. I’d definitely have a good read of the openHAB docs, and the how tos on the web for synology before you continue. It might get frustrating for you otherwise.

Hej Dan er du kommet på rette spor, eller skal jeg lave en lille vejledning til dig?

1 Like

There might be a better chance to get an answer if you ask in English :wink:

Sure… this was not a question. He seemed so danish to me, that i just asked in danish. I am using the same setup, and i was offering help. But i see that i might help other in the future to keep the conversation i English.

Hej Henrik. Nej desværre ikke helt, har lidt svært ved at få taget hul på det. Skal hvis lige have sat mig ind i logikken. Altså en Easy guide til at komme igang ville være en kæmpe hjælp for mig og sikkert også for andre. Virker lidt uoverskueligt. Hvis jeg ender med at forstå det håber jeg også jeg kan bidrage med at hjælpe andre.

Hi Dan… Will answer in english, so others can contribute.

I guess you have your basic Openhab install ready.

Simple steps i used to install/configure IHC Binding.

Install binding in Paper UI
Enable ssh on the synology box (Control Panel - Terminal and SNMP - Check the box next to activate SSH and save)
Use putty (Windows) or terminal (Mac) to login to your synology
When logged in use this command to edit the ihc.cfg file
sudo vi <path to ihc.cfg> with sudo you get permissions to edit the file
I guess you know the path already as you mentioned it in an earlier post.
What i have found, is that you need to strip the file from all unnecessary spaces and line changes.
Your file should end up like this:

    # Controller IP address
    ip=<ip adress IHC Controller>
    # Username and password for Controller
    username=<controller user>
    password=<controller password>
    # Timeout for controller communication
    timeout=5000

Next you will have to define items in an items-file (ihc.items or an existing) in conf/items/ folder.

Here is an example:

Switch  Light_Scullary  "Lys Bryggers"  <switch> (IHC,Scullary,Lights)   [ "Lighting" ]  { ihc="2562651" }

The last part { ihc=“2562651” } refers to the IHC-binding. You find the IHC-items in the .vis file for your IHC-project.

My “Lys Bryggers” is defined in .vis as below:

         <product_dataline id="_0x271953" product_identifier="_0x2202" name="Lampeudtag" locked="yes" icon="_0x86" position="Spots Loft">
            THIS LINE IS THE OUTPUT <dataline_output id="_0x271a5b" name="Udgang" backup="yes" address_dataline="_0x8">
               <link_to_resource id="_0x27432c" name="Følg Link" icon="_0x4a" link="_0x27422d"/>
            </dataline_output>
            <scenes id="_0x271b49" name="Scenarier" scene_resource="_0x271a5b"/>
         </product_dataline>

Not sure if binding still supports both HEX and DEC values, but i have had issues with HEX in the past, so i always convert HEX to DEC for use in my items. Remove the underscore in HEX value and use a converter (http://www.binaryhexconverter.com/hex-to-decimal-converter) HEX (0x271a5b) = DEC (2562651)

Now your Openhab engine is listening for changes on this single device, and can also set the value.

In documentation you see all the other options for items, and how to relate them in your .vis file.

Let me know if you need further instructions.

/Henrik

1 Like

Is it possible to use winSCP it is more user friendly?

path: /Volume1/@appstore/openHAB2/conf/services/ihc.cfg

should be possible, but the problem is that synology does not allow you to login with root account. you can use your own account and switch to root.

I do not know if WinSCP has any options to change user at login, but i would suggest you use 5 minutes to get the basics of vi editor.

I think i heard in the past about a solution where you would create symlinks to a folder on a synology-share, so you could access files directly via SMB. If i remember correctly this was the default in an earlier 1.x version.

Hi

Maybe you already know this group

http://www.ihc-user.dk/forum/search/?&q=openhab

they may also help with IHC specifics and Openhab