HM-CFG-USB / hmland / homegear / openHAB


#1

Hi,

the final goal is to be able to be notified by openHAB whenever a window is being opened…

What does work so far? Close to nothing :wink:

I have an HM-CFG-USB2:

[code]# lsusb
Bus 001 Device 005: ID 1b1f:c00f

dmesg

usb 1-1.5: new full-speed USB device number 5 using dwc_otg
usb 1-1.5: New USB device found, idVendor=1b1f, idProduct=c00f
usb 1-1.5: New USB device strings: Mfr=4, Product=14, SerialNumber=36
usb 1-1.5: Product: HM-CFG-USB
usb 1-1.5: Manufacturer: eQ-3
usb 1-1.5: SerialNumber: MEQ012345678[/code]

I’ve installed the latest (.102) hmland and the latest homegear 0.6 (Valentine’s Day Edition g).

hmland seems to be able to talk to the device:

[code]# hmland -p 21234 -D -I -i

USB < 0x0000: 4b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 K…
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
usb-transfer took 43ms!

USB > 0x0000: 48 09 48 4d 2d 55 53 42 2d 49 46 03 c4 0a 4d 45 H.HM-USB-IF…ME
USB > 0x0010: 51 30 32 33 31 35 31 32 37 32 3e 00 00 00 00 60 Q012345678>…`
USB > 0x0020: 00 c3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
Rebooting in 86400 seconds due to old firmware (0.964)
2016-02-15 12:15:51.955997: LAN < HHM-LAN-IF,03C4,MEQ0123456,78323E,000000,006000C3,0000
HHM-LAN-IF,03C4,MEQ0123456,78323E,000000,006000C3,0000[/code]

Now let’s have a look at the next layer - homegear:

[code]# nano /etc/homegear/families/homematicbidcos.conf
[General]
rfKey = 00112233445566778899AABBCCDDEEFF
currentRFKeyIndex = 1

[HM-CFG-USB]
id = hmland
default = true
deviceType = hmcfglan
host = localhost
port = 21234
responseDelay = 60[/code]

And fire up homegear interactively:

# homegear 02/15/16 12:20:43.193 Loading RPC server settings from /etc/homegear/rpcservers.conf 02/15/16 12:20:43.195 Loading RPC client settings from /etc/homegear/rpcclients.conf 02/15/16 12:20:43.199 Starting Homegear... 02/15/16 12:20:43.200 Homegear version 0.6.0-1213 02/15/16 12:20:43.200 Git commit SHA of libhomegear-base: b371e5dc71949665db5ad1da6892ec6f9bad41b1 02/15/16 12:20:43.201 Git commit SHA of Homegear: 8f5b128c3c36dba40e4a6800871c94e4974e9a3a 02/15/16 12:20:43.203 Info: Loading family module mod_miscellaneous.so 02/15/16 12:20:43.207 /etc/homegear/families/miscellaneous.conf 02/15/16 12:20:43.207 Info: Loading family module mod_homematicbidcos.so 02/15/16 12:20:43.220 /etc/homegear/families/homematicbidcos.conf 02/15/16 12:20:43.222 Module HomeMatic BidCoS: LAN-Konfigurationsadapter "hmland": Info: Disabling AES encryption for communication with HM-CFG-LAN. 02/15/16 12:20:43.222 Warning: Running as root. The authors of Homegear recommend running Homegear as user. 02/15/16 12:20:43.223 Warning: Running as root. The authors of Homegear recommend running Homegear as user. 02/15/16 12:20:43.223 Info: Setting allowed core file size to "4294967295" for user with id 0 and group with id 0. 02/15/16 12:20:43.223 Info: Core file size now is "4294967295". 02/15/16 12:20:43.223 Info: Setting maximum thread priority to "0" for user with id 0 and group with id 0. 02/15/16 12:20:43.223 Info: Maximum thread priority now is "0". pure virtual method called terminate called without an active exception 02/15/16 12:20:43.225 Critical: Signal 6 received. Stopping Homegear... 02/15/16 12:20:43.225 Critical: Signal 6 received. Stopping Homegear... Abgebrochen (Speicherabzug geschrieben)

What’s going wrong here?

The old 0.5.2 version of homegear crashes, as well…


#2

Hey,

your Homegear version is not compiled for your system (e. g. you installed Homegear for Debian jessie armhf on Raspbian jessie). If that still doesn’t help, please post some system information (hardware, Linux distribution, …).

Cheers,

Sathya


#3

Reinstalled the latest 0.6 version for armhf… hmland starts, homegear connects to it without complaining - great, thanks!

When I’m now trying to pair two devices (HM-CFG-USB with HM-Sec-SCo), I am doing the following:

[code]# homegear -r
Connected to Homegear (version 0.6.0-1224).

families select 0
Device family “HomeMatic BidCoS” selected.
For information about the family’s commands type: “help”
(Family)>ls
No peers are paired to this central.
(Family)> pon
Pairing mode enabled.
(Family)>[/code]

No matter how long and in which order I press the button above the LED of the windows contact now, it won’t pair with the contact device.

When I short-press the button, it starts blinking and hmland -i shows:

USB > 0x0000: 45 41 a9 0e 00 00 1e d0 63 01 ff ff b8 1a 1c 84 EA......c....... USB > 0x0010: 00 41 a9 0e 00 00 00 10 00 c7 4d 45 51 31 34 30 .A........MEQ140 USB > 0x0020: 11 22 33 44 80 81 01 01 00 00 00 00 00 00 00 00 1234............ USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 2016-02-21 10:07:26.539280: LAN < E41A90E,0000,1ED06301,FF,FFB8,1C840041A90E0000001000C74D45513134303731313780810101 E41A90E,0000,1ED06301,FF,FFB8,1C840041A90E0000001000C74D45513134303731313780810101

I guess that these are already paired?!

But why doesn’t homegear > ls show any devices paired to the central?


#4

Hey,

your device probably doesn’t accept the config packet from Homegear. Did you factory reset the window contact before pairing it to Homegear? The Homegear log will tell you, what went wrong. Post the excerpt of the pairing attempt and I can probably tell you, what went wrong.

Cheers,

Sathya


#5

It’s working now!

What I did:

  • factory reset the sensor
  • upgrade to the latest 1253 version of homegear

Altered settings:

[HomeMaticBidCoS] id = hmland default = true deviceType = hmcfglan host = 192.168.123.45 port = 1000

And fired up hmland

I am getting

and when I am trying to pair the devices it shows up after the first attempt - I can even rename it!

Yeehah! Thank you! :slight_smile:


#6

Meanwhile, I’ve improved many parts of my configuration and also added many more sensors (buy them as a kit, as they’re much cheaper in case you know which end of the soldering iron you may touch g) as well as a remotely switchable socket. It only took me five minutes to integrate that switch into openHAB - it’s fantastic!