Homematic Binding with text configuration

Hello community,

i really tried a lot of things to get it up and running but I don’t manage to configure my Homematic LAN Adapter with configuration files.

My setup is: Homematic HM-LAN-CFG which is available with IP address 192.168.178.36. openhab2 is running on Raspberry with homegear 0.6.7-1545 and Homematic devices are configured and working. Also openhab 1 on the same machines is able to talk to devices.

Currently I’m trying to migrate all items / things to openhab 2. Paper UI also automatically finds Homematic Adapter and can configure every single component.

BUT my requirement is to configure Homematic Adapter by text configuration without Paper UI. Is there any change to get it up and running? I configured my things file like this:

Bridge homematic:bridge:HOMEGEAR [ gatewayAddress=“127.0.0.1”, callbackHost=“127.0.0.1”, binCallbackPort=“9126” ]
{
Thing HG-HM-ES-PMSw1-Pl LEQ1315672
}

My item looks like that for example:

Switch hm_sd_waschmaschine_status “Strom” (gHM,gSteckdosen) { channel=“homematic:HG-HM-ES-PMSw1-Pl:HOMEGEAR:LEQ1315672:1#STATE” }

I also tried to create a service file:

homematic:host=172.0.0.1
homematic:callback.host=172.0.0.1

So from my point of view everything should configured well. Do you have any suggestions?

Thanks,
Flo

Hi Flo,

did i understand it right. You try to connect the HM-Lan_CFG to openhab? That will not work. You need to connect a ccu or a homegear instance to open hab. An exanple setup is:

HM_LAN_CFG -------Homegear--------openHAB
Firt you have to setup home gear, connect it to the HM_LAN_CFG, bind some Homematic devices to homegear and the connect it to openhab and create things and items and some cool logic.

If you need some help with home gear use https://forum.homegear.eu/ or https://www.homegear.eu/

Thomas

Hi Thomas,

maybe I didn’t describe my problem clearly enough :smiley:

I already have a setup like HM_LAN_CFG — Homegear — openHAB. This works perfect for openhab 1. Now I want to migrate to openhab 2 and try to connect openhab 2 to homegear to use all connected devices within homegear. I don’t want to use PaperUI but config files only.

Do you have a working configuration example for this scenario (homematic HM_LAN_CFG over homegear without PaperUI)?

Thanks!

Here you go: https://github.com/ThomDietrich/openhab-config/blob/master/things/homematic.things

Ok, now i am close to you. Except the things i configured everything with config files. Maybe you should move step by step.

1.) Create the homemtic config file
2.) Try the paper ui todiscover the gateway and the things -> That the was i do it
3.) Define Items in the config files

With step two you should see if the connection between homegear & openhab works

Thomas

Thomas, you saved my day :+1:

Actually it was only a little typo problem in my existing config. Sometimes you cannot see the wood for the trees.

There is no homematic config file for openHAB2 !?

Leaving out the homematic.things file would not be my recommended way to go (backups, reinstalls, changes)
You can still use discovery to find the bridge and things but then copy the information and define everything in a things file just as linked above. Things added in a things file will automatically disappear from the inbox, making adding all things to the .things file very easy.
Also pay attention to the fact, that you can add a name and a loaction per thing: http://docs.openhab.org/addons/bindings/homematic/readme.html#thing-configuration

:thumbsup:

@ThomDietrich

In my services folder is a homematic.cfg file with the relevant data :slight_smile:

At the end the problem ist solved for Flo and i think the move to the jsonDB will move most people away from the *.somthing files

Thomas

What do you have in there? The connection data needed for the bridge?
I do not believe this file is needed or even evaluated. With openHAB 2 these kinds of details are supposed to go into things files or the respective things context in the database. Just my two cents, maybe helpful for the next user reading this thread.

Yes the connection data. But as your are writing, i am not sure if it is used. That is in my point of view a general problem in oh2 many file san databases and for me no straight way.

  • No need for Item files
  • but sitemap files are required
  • and rules file are a little bit in between from my point of view

but i think things will be soted out in the future. Meanwhile we are try to help each other

Thanks for you help

thomas