IHC Binding not working in Openhab 2

Hi all - i’m new to Ophenhab an try to learn :slight_smile:

I try to install IHC Binding in Openhab 2 and get the following error

2016-12-18 07:39:21.649 [WARN ] [nhab.binding.ihc.internal.IhcBinding] - Controller is not initialized!
2016-12-18 07:39:21.653 [WARN ] [nhab.binding.ihc.internal.IhcBinding] - Controller is not initialized => refresh cycle aborted!
2016-12-18 07:39:22.656 [WARN ] [nhab.binding.ihc.internal.IhcBinding] - Couldn't connect to IHC controller because of missing connection parameters [IP='192.168.3.42:443' Username='' Password='******'].

It seems like the username is missing, but i have typed it in the cfg file?

My ihc.cfg file is:

# Controller IP address
ip=192.168.3.42:443
# Username and password for Controller
username=admin2
password= (Here i have put my password for the controler)
# Timeout for controller communication
timeout=5000

When i got this working - how do i then make my items file so i kan find it in Paper ui or Habmin?

Hope someone can help me:-)

Have a nice day

It’s not a openhab2 addon yet, so you have to define the items yourself in a .items file

Which editor you have used to edit/create cfg file? Have you used Openhab/Smarthome Designer? Maybe line ending could cause this kind of problem.

Port address shouldn’t be defined to IP address. Port doesn’t cause this problem, but it prevent connection later on.

I have used Notepad

Regarding port i have tried with… and without. No chance

I know its not an openHAB 2. Addon yet but is it possible to male a Sitemap that have both the items that you Can install in paperui and the things you put in an items file viseble at the same time in HABmin - i Can se i have to chose a Sitemap but how do you put openHAB2 items in the same Sitemap file?

As i understand the things that i install in paperui is in a database

Notepad use by default ANSI character encoding. openHAB use UTF-8, so you should use openhab designer or change character set to UTF-8.

Hi Pali

Thanks - i try that later today :slight_smile:

Just tested IHC binding on OH2, it seems to work fine even tcp port is defined to ip address. Didn’t remember that I have implemented it so that TCP port can defined as well. Anyhow, communication to IHC controller is https (TLS) based, so binding will use 443 port by default anyway.

When you make your Ihc.items file the each defined item will show op in your paperui and habmin

Hi Pale

Now i edited the file in smarthome designer - and its working :slight_smile:

Thankyou for the helt.

Next i wil try to make an items file for HABmin.

Hi Stivbert

Thankyou for reply

I try to make a file - i’ll try to and find some examplefile.

Hi Pali

Can you maybe help with an example of how the items file for ihc may look so the components are revealed in HABmin?

Hi Alex,

mine looks like this.

/etc/openhab2/items/ihc.items

Dimmer ihc_kokken_loft_1 { ihc=“>0x845d” }

Contact ihc_gang_roeg_alarm { ihc=“>0x125b5a” }

then my 2 items show up in habmin items

Hi Stivbert

Thanks.

I have a bit of problem getting it working.

i get this

2016-12-25 07:13:43.486 [ERROR] [nhab.binding.ihc.internal.IhcBinding] - Error occured during resource query
java.lang.NullPointerException
        at org.openhab.binding.ihc.ws.IhcResourceInteractionService.resourceQuery(IhcResourceInteractionService.java:89)[206:org.openhab.binding.ihc:1.9.0.201612180210]
        at org.openhab.binding.ihc.ws.IhcClient.resourceQuery(IhcClient.java:409)[206:org.openhab.binding.ihc:1.9.0.201612180210]
        at org.openhab.binding.ihc.internal.IhcBinding.execute(IhcBinding.java:241)[206:org.openhab.binding.ihc:1.9.0.201612180210]
        at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:157)[174:org.openhab.core.compat1x:2.0.0.201612180944]
        at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:173)[174:org.openhab.core.compat1x:2.0.0.201612180944]

And nothing happens when i push the switch i webinterface

This is items

Dimmer GF_stue_sofabord 	"Lys sofabord [%s %%]"			 <slider> (GF_living, Lights)					{ihc=">0x12c975d" } 
Dimmer GF_kitchen        	"Køkken | Spots [%s %%]"       	(GF_Living, Lights)								{ihc=">0x1875654" }
Switch GF_entre				"Lys Entre"						(GF_corridor, Lights)							{ihc=">0x11953" }

My sitemap file

	Frame label="DEMO" {
		Text label="Group Demo" icon="firstfloor" {
			Slider item=GF_stue_sofabord switchSupport
			Switch item=GF_entre
			Group item=Heating
			Group item=Windows
			Text item=Temperature
		}

Hope you can help me :slight_smile:

/Christian

Christian, try to add a space here {ihc = { ihc

not sure it changes anything

Hi Pauli

Du you haven example on how to “put” ihc info obenHAB2.- the binding is working but.
In OH1 you had an item and Sitemap file in OH2 some “things”(2.0) comes automaticly. But how Can 1.x and 2.x bindings be combined in one Sitemap ( for now HUE, Sonos and some z-wave combined with ihc) as i understand will all that comes auto (2.x bindings) be stored in a db instead of a item file

Regards Christian