Stuck with homematicwired HMW-LGW-O-DR-GS-EU

Hi,

After many years of using homegear for both wired as bidcos I decided to replace my cheap chinese USB rs485 board with the HMW-LGW.
But for some reason I cant figure out how to make this working.
Some facts :

  • My RS485 bus is working fine, i hooked up the USB board again and i can use homegear -r cli to list peers, see events etc …
  • tried to make it work with versions 0.7.39-2773 (on intel nuc 4.15.0-70-generic #79-Ubuntu) and 0.7.40-2948 (Raspberry Pi 3 Model B Rev 1.2 Raspbian GNU/Linux 10 buster )
  • all other modules disabled.

config :

#######################################
## HomeMatic Wired RS485 LAN Gateway ##
#######################################

## The device family this interface is for
[HomeMatic Wired RS485 LAN Gateway]

## Specify an unique id here to identify this device in Homegear
id = My-HMW-LGW

## Options: rs485, hmwlgw
deviceType = hmwlgw

## IP address of your HMW-LGW
host = 19.10.1.164

## First Port number your HMW-LGW listens on. Normally 1000.
port = 1000

## Put the security key printed on your HMW-LGW here
lanKey = I have put my key here (tried lower en upper case)

## Should be "13" for serial modules, "20" for USB modules and "8" for HMW-LGW.
responseDelay = 8

So what are the logs saying :

==> homegear.log <==
11/20/19 14:47:25.267 Module HomeMatic Wired: HMW-LGW "My-HMW-LGW": Connected to HMW-LGW with hostname 10.10.1.164 on port 1000.
11/20/19 14:47:25.270 Module HomeMatic Wired: HMW-LGW "My-HMW-LGW": Error: First packet does not start with "S" or has wrong structure. Please check your AES key in homematicwired.conf. Stopping listening.

==> homegear.err <==
11/20/19 14:47:25.270 Module HomeMatic Wired: HMW-LGW "My-HMW-LGW": Error: First packet does not start with "S" or has wrong structure. Please check your AES key in homematicwired.conf. Stopping listening.

I don’t see anything related to successful connection to HMW-LGW but i have no idea what to expect.
Does anyone know what or where this AES setting is set ? If I understand it correctly this is the “lanKey” ?
All help or ideas are welcome.

Regards,
Nico Lembrechts

Hey Nico,

welcome to the forum. Feel free to use the formating options of the forum next time. I just did that for you.


I’m no expert with the lan gateways - neither Wired nor BidCos. But as far as my undersrtanding goes, the devices are not paired to homegear but to the lan gateway directly. Thus needing a separate aes key.

So, with your RS485 dongle the devices are directly paired to homegear. If you use the lan gateway, they have to be paired to the gateway itself.
I don’t know if the aes keys are interchangeable. If not, your only solution could be to correctly unpair all devices from the RS485-dongle-homegear combo, factory reset the devices and repair them using the hmw-lgw.

Maybe @sathya can bring some more light to this.

Cheers,
Patrik

Hey Patrick,

My apologies about the formatting, thanks for your help on that.
The pairing explanation makes sense.
I did try to unpair and reset one peer first via usb-RS485 and then performed a search with the HMW-LGW connected but that didn’t work. Whats confusing me is that the wired peer i am using HMW-IO-12-Sw7-DR for example doesn’t have something like a pairing button or sequence. The docs only talk about “Teaching button inputs to
actuator channels” not to some sort of gateway or central controller. If I understand correctly I might need some software to make the pairing or teaching between the two first. Maybe someone has experience with this ? In the meantime I will try to figure out how pairing is done with wired RS485 peers and the HMW-LGW gateway.
Thanks for your feedback.

Regards,
Nico

I Found it !

It turns out that the lanKey password is not to be mistaken for the serial number.
I was looking for sticker with a code like described in the documentation, apparently there are three stickers on the device. mac address, serial number and the password. So make sure to look for the one that starts with PW: xxxxxxxxxx
Once I entered the right string in the homegearwired.conf and restarted homegear it worked like a charm. I can now even use the USB and LAN gateways at the same time.
Stupid me.

Regards,
Nico

2 Likes

You see. That’s how little I know about the LAN gateway :wink:

Good that it works now.

Cheers,
Patrik