Homematic integration using lan gw

hallo
i am completly new to this system, and am busy looking to see if it would be a solution for me… i am in the starting phases.
i currently use FHEM and use zwave and homematic.
zwave i appear to have managed to set up ok on the home assistant.
i am having issues with homematic

I am using the homematic lan gateway in Fhem currently (hm-lgw-o-tw-w). Fhem connects to this and sends commands via LAN to this gateway which then sends to the few homematic devices i have in the house. the langw is NOT a CCU or CCU2.
is this possible to use also in home assistant or do i need a ccu or ccu2

thanks for any help

No, you don’t need a CCU. You can use Homegear or RaspberryMatic. Using RaspberryMatic will essentially turn a RPi + the LAN Gateway into a CCU2. Homegear works as well (it just adds the required XML-RPC API), but personally I would prefer the RPi+Gateway method.

In any case you will have to re-pair all your HomeMatic devices. And probably the most important part: I’m pretty sure you can not use FHEM and one of the other solutions in parallel. So when deciding to switch (which I would recommend), expect to have a rather long downtime until you replicate your current setup with Home Assistant (or any other solution).
The benefit with these solutions is, that it’s “portable”. Once you have either solution set up, you can use any software that can talk XML-RPC. So you could use HomeAssistant and ioBroker in parallel, or exchange one through the other. At least as far as I know FHEM does not expose the XML-RPC API that’s required to work with HM devices.

strangely we seem to have arrived at the same answers :)… i have installed the homegear component with the correct family… just the gateway is timing out… I am sure i will manage this eventually.
can you tell me why you would prefer the rasberrymatic version?

Because RaspberryMatic makes it more generic. You have a WebUI to manage all your devices, can even do some automations there if for some reason you don’t want to do it somewhere else, and the support is pretty good.
I have used Homegear for a while, and it worked good as well. The developer is a really nice guy too. But I had multiple times where an update of Homegear broke everything and I had to pair all devices again because I had to start from scratch. With more than 20 devices (some being Unterputz) that’s a realy pain. RaspberryMatic on the other hand seems to become the main solution for a lot of HomeMatic users, so in case there’s trouble there are a lot people to help. Another nice feature you only get with the CCU: Thermostat Groups. With those you can group Wallthermostats, Radiator Thermostats and Door/Window Sensors, and when you open a door, the target-temperature gets lowered automatically. Also the Radiator Thermostats work much better when there’s a Wall Thermostat that has a better sense of the current temperature because it’s not directly where the heat is generated.
Edit: And those thermostat groups can be controlled via Home Assistant.

They can? Can you tell me how as I’ve tried to work this out but at least when I’ve tried this they don’t show up as an entity via the auto-discovery for homematic.

Thanks

i dont have too many homematic devices … die die ich habe… sind auch unterputz… also das would really be a pain if i had to do it… i am planning basically on moving everything to zwave … as i am more flexible… and the Zwave implementation in Fhem is not all that good…
one other question… i guess i can not use home assistant to pair homematic devices… this has to be done either with raspberrymatic or homegear.

i did look just at raspberrymatic … this seems to be a nice solution… but it would be nice to be able to install it “stand alone”… rather than using a complete raspberry image … i guess i will have to get in touch with the developer…

Yes. Configure it like this:

homematic:
  hosts:
    hmgroups:
      ip: 192.168.1.123
      port: 9292
      username: Admin
      password: !secret hmadmin
      path: /groups
      resolvenames: json

@dom
Well, you will have to re-pair in any case if you switch away from FHEM. What I did in the beginning while I was still developing the HomeMatic component for HASS was using HTTP commands to control the devices. If you plan to move away from HomeMatic anyways, it may not be worth the effort to switch at all (if there are useful workarounds).

Yes, RaspberryMatic would require a dedicated machine. That’s where Homegear has an advantage. And it will probably stay that way. Even though the Pi3 has some power, running the CCU and whatever in parallel on the same host might not be the best thing to do.
So, if you were to stick to HomeMatic for a longer time, I’d use the Pi. If it’s only temporary, Homegear would be easier. That could even run on a VM or via Docker.

ok so its like this

  1. unpair and reset all homematic things in fhem
  2. start homegear with homematic configured for the homematic gateway as interface
  3. configure hass as u say above - ip is the ip of homegear and user etc is configured in homegear (i didnt see an rpc server default configured on port 9292 … but will look again)
  4. and then i can pair homematic actors etc via hass??

dom

Thanks! And sorry, hadn’t seen the update to the docs referencing this.

9292 is related to my question on thermostat groups.

You need 2001 for wireless, 2000 for wired or 2010 for homematic IP

As mentioned, the configuration was for the other question. For you it should be something like:

homematic:
  hosts:
    homegear:
      ip: 192.168.1.123
      port: 2001

The pairing with Homegear has to be done using a special software. The one that worked best for me was HomeMatic Kickstart. I haven’t followed though and don’t know if that’s still the best software.

thanks for all the help.
everything worked pretty perfectly.
for people doing the same steps.
in FHEM

  1. set unpair
  2. delete device in fhem
  3. stop fhem (service fhem stop)
  4. restart homegear so that it connects to the gateway
  5. connect to the homegear CLI -> docker exec homegear homegear -r
  6. families 0
  7. pairing on -> then press the config button on each of the devices.
  8. restart HomeAssistant -> everything was found as a “cover”

i have a question though still for the developer … i have installed my homematic switches “upside down” so that “up” is actually “down” and “down” is actually “up” … in FHEM i could “flip flop” this so that the arrows in the “cover” group would do the correct thing… is there a possibility here to do anything in home assistant?

Glad everything worked out. :slight_smile:

As for your question: no, that’s not possible as far as I know.

strange though
in the developer tools… the position is showing as 100 but the state is open.
if i was to think of somethin as 100… (100%)… for a 'cover" or jalosie - i would think 100% would mean closed …
but i am irish :slight_smile:

Well, internally the value of cover-actors is referred to as “level”. And if I look at the level of water in a glass, then a glass filled to the top is 100% full. At least that’s my personal interpretation.

2 Likes

Jut as a side bar… for zwave covers… https://home-assistant.io/components/cover.zwave/

  device_config:
    cover.my_cover:
      invert_openclose_buttons: true

so for Zwave cover component … the inverse open/close was implemented for some reason :):grin:

Sure, the Homematic component could do something similar. However, I don’t know if zwave actors have a correct setup like Homematic actors do. If you connect Homematic actors wrong, they’re broken everywhere. If zwave actors are more like relays where you can choose freely how you hook up the cover, then inverting it makes sense, since you can’t to it wrong.

thanks for that explanation… it actually makes sense :slight_smile:
keep up the good work. and have a great christmas

I have a similar question as the original poster. I plan to migrate my FHEM home automation to Home Assistant, and I don’t see any issues for most device types I use. But I was unable to find out how to migrate my homematic setup to Home Assistant.

Hardware:

  • 1x HM-CFG-LAN
  • 1x HM-LGW-O-TW-W-EU
  • 1x CUL
  • no CCU1 neither CCU2

The three devices are grouped together into a single VCCU by FHEM, which is a virtual CCU. It handles roaming of clients and failover of communication adapters. I have read about the different methods that can be used connect Home Assistant to Homematic, most of which require at least one CCUx.

So what is the best migration path for me? I guess I must give up on the roaming and failover features and assign the Homematic devices to the nearest gateway device?

Homegear might be the most suitable solution for you. I don’t think it does roaming, so you’ll lose that when switching away from FHEM. But Home assistant is capable of handeling multiple XML-RPC endpoints. So you could place Raspberries at different locations, all running homegear with one of your wireless-modules, and Home Assistant can talk to every one in parallel.