Raspberry Pi 3 B+ mit Openhabian in der aktuellsten Version
Homegear 0.7.37-2722
Meine max.conf hat folgende Einträge:
## The device family this interface is for
[CUL]
## Specify an unique id here to identify this device in Homegear
id = My-MAX-CUL
## When default is set to “true” Homegear will assign this device
## to new peers.
default = true
## Options: cul, coc, cc1100
deviceType = cul
device = /dev/ttyUSB0
## Should be “40” for MAX!
responseDelay = 40
Auch mit /dev/serial/by-id/usb-SHK_NANO_CUL_868-if00-port0 statt ttyUSB0 komme ich nicht weiter.
Wenn ich homegear auf pairing stelle und dies dann am Thermostat starte, kann er Signale vom Thermostat lesen, pairen scheint aber unmöglich:
[22:20:16] openhabian@openHABianPi:~$ sudo homegear -r
[sudo] Passwort für openhabian:
Connected to Homegear (version 0.7.37-2722).
Please type >>help<< to list all available commands.
> ls
ID │ Name
──────┼───────────────────────────────
1 │ HomeMatic Wired
4 │ MAX!
254 │ Miscellaneous
──────┴───────────────────────────────
> fs 4
For a list of available family commands type >>help<<.
Family 4> ls
No peers are paired to this central.
Family 4> pon
Pairing mode enabled.
Family 4> pof
Pairing mode disabled.
Family 4> ls
No peers are paired to this central.
Habe ich irgendwo einen grundlegenden Denkfehler? Das selbe passiert auch mit dem Fensterkontakt. Beide Geräte habe ich vorher komplett resettet (Batterie raus, 1 min warten, alle 3 Knöpfe drücken beim Einlegen der Batterien usw.)
Im Log sehe ich folgendes im Debuglevel 10:
03/01/19 23:03:29.001 RPC Server (Port 2001): Info: RPC server client id for client number 9 is: 0
03/01/19 23:03:29.002 RPC Server (Port 2001): Listening for incoming packets from client number 9.
03/01/19 23:03:29.003 RPC Server (Port 2001): Debug: Packet received: 474554202F6465736372697074696F6E2E786D6C20485454502F312E310D0A43616368652D436F6E74726F6C3A206E6F2D63616368650D0A436F6E6E656374696F6E3A204B6565702D416C6976650D0A507261676D613A206E6F2D63616368650D0A4163636570743A20746578742F786D6C2C206170706C69636174696F6E2F786D6C0D0A557365722D4167656E743A204644535344500D0A486F73743A203139322E3136382E312E363A323030310D0A0D0A
03/01/19 23:03:29.026 RPC Server (Port 2001): Debug: Connection to client number 9 closed.
03/01/19 23:03:29.033 RPC Server (Port 2001): Debug: Connection to client number 9 closed (1).
Hmm… wollte sicher gehen, dass es sich um ein 868er Modul handelt. Kannst du irgendwei verifizieren, dass der CUL tut was er soll? Vielleicht an einer anderen Installation testen?
Der CC1101 (dein Funkmodul) hat zwei GDO-Pins (GDO0 und GDO2). Einer davon sollte anhand deiner Adapterplatine mit dem Arduino Nano verbunden sein.
Die Frage ist also welcher von beiden und auf welchem Pin den Nano er landet. Das muss in der Firmware entsprechend hinterlegt sein.
Eventuell muss du die NanoCUL-Firmware dafür selbst kompilieren.
Woah, 38eu ist frech. Für ein CC1101-Modul was 2€ auf eBay kostet. Der Nano (also Klon) kostet auch nur 3€. Die Platine dazwischen bekommt man für 2€ bei oshpark… dann noch die Antenne dazu und ich komme auf max 12€, mit Gewinn 15-18€.
Von fehlender WEEE-Registrierung bei dem ebay-Händler will ich gar nicht sprechen…
Abgesehen davon ist das Platinenlayout wirklich wirklich gräuselich…
Vielleicht sollte ich sowas mal bauen, mit besseren - sprich - funktionierenden Modulen
Wenns dir nur um Homematic oder MAX! in Verbindung mit Homegear geht mag ich dir eins unserer Module empfehlen. Das ist nur der Funkchip mit Antenne, Homegear macht den kompletten Softwareteil: https://shop.codm.de/module/3/cc1101-raspberry-pi-spi-modul-v0.3
Ok, das war jetzt vielleicht etwas Werbung
Mir ist nur jetzt noch was anderes eingefallen, was ich getestet habe. Ich habe noch einen MAX! Cube rumliegen, hab den auf culfw geflasht und das Ganze damit nun auch getestet. Strange ist, dass ich am Rechner und am Pi das selbe Ergebnis habe, wie mit dem NanoCul. Mit einem Thermostat und einem Fenster Sensor.
Ich habe nun irgendwie Zweifel, dass es am Stick liegt.
Nur noch mal zum sicher gehen:
[20:44:51] openhabian@openHABianPi:~$ homegear -r
Connected to Homegear (version 0.7.37-2722).
Please type >>help<< to list all available commands.
> ls
ID │ Name
──────┼───────────────────────────────
1 │ HomeMatic Wired
4 │ MAX!
254 │ Miscellaneous
──────┴───────────────────────────────
> dl 10
Debug level set to 10.
> fs 4
For a list of available family commands type >>help<<.
Family 4> pon
Pairing mode enabled.
Family 4> pof
Pairing mode disabled.
Family 4> ls
No peers are paired to this central.
Family 4> pon
Pairing mode enabled.
Family 4> pof
Pairing mode disabled.
Family 4> ls
No peers are paired to this central.
[18:25:16] openhabian@openHABianPi:~$ cat /etc/homegear/families/max.conf
___________________________________________________________________________
---------------------------------- MAX! ----------------------------------
___________________________________________________________________________
#######################################
########## General Settings ##########
#######################################
[General]
moduleEnabled = true
## The MAX! address of Homegear. It is recommended to change this to a random 3 byte hexadecimal
## value starting with 0xFD (e. g. 0xFD43AB). Only change this, when no MAX! devices
## are paired to Homegear as existing pairings will not work anymore!
centralAddress = 0xFD0002
#######################################
################# CUL #################
#######################################
## The device family this interface is for
[CUL]
## Specify an unique id here to identify this device in Homegear
id = My-MAX-CUL
## When default is set to "true" Homegear will assign this device
## to new peers.
default = true
## Options: cul, coc, cc1100
deviceType = cul
device = /dev/ttyUSB0
## Should be "40" for MAX!
responseDelay = 40
#######################################
########## TI CC1101 Module ##########
#######################################
## The device family this interface is for
#[TI CC1101 Module]
## Specify an unique id here to identify this device in Homegear
#id = My-MAX-CC1101
## When default is set to "true" Homegear will assign this device
## to new peers.
#default = true
## Options: cul, coc, cc1100
#deviceType = cc1100
#device = /dev/spidev0.0
## Default: responseDelay = 95
## Should be "40" for CUL or COC and "45" for TI CC1101.
#responseDelay = 45
## The interrupt pin to use. "0" for GDO0 or "2" for GDO2.
## You only need to connect one of them. Specify the GPIO
## you connected the interrupt pin to below.
#interruptPin = 2
## The GPIO GDO0 or GDO2 is connected to. Specify which GDO to use above.
#gpio1 = 23
### Additional TI CC1190 Config ###
## The GPIO high gain mode of the CC1190 is connected to.
## Default: -1 (disabled)
#gpio2 = 5
## The hexadecimal value for the PATABLE of the TI CC1101.
## Default:
## - Without high gain mode: 0xC2
## - With high gain mode: 0x27 (maximum legally allowed setting)
#txPowerSetting = 0x27
#######################################
################ CUNX ################
#######################################
## The device family this interface is for
#[CUNX]
## Specify an unique id here to identify this device in Homegear
#id = My-CUNX
## When default is set to "true" Homegear will assign this device
## to new peers.
#default = true
## Options: cul, cc1100, coc, cunx, hmcfglan, hmlgw
#deviceType = cunx
## IP address of your CUNX
#host = 192.168.178.100
## Port number your CUNX listens on. Normally 2323.
#port = 2323
## Default: responseDelay = 95
## Should be "40" for CUNX
#responseDelay = 40
#######################################
######### COC, SCC, CSM, CCD #########
#######################################
## The device family this interface is for
#[COC, SCC, CSM, CCD]
## Specify an unique id here to identify this device in Homegear
#id = My-COC
## When default is set to "true" Homegear will assign this device
## to new peers.
#default = true
#deviceType = coc
#device = /dev/ttyAMA0
## Default: gpio1 = 0
## "17" for COC, SCC and CCD. Empty for CSM.
#gpio1 = 17
## Default: gpio2 = 0
## "18" for COC and SCC. "22" for CCD. Empty for CSM.
#gpio2 = 18
## Should be "40" for MAX!
#responseDelay = 40
## Default: stackPosition = 0 (= no stacking)
## Set stackPosition if you use the SCC and stacked multiple devices.
## Set stackPosition to "1" for the lowest device, to "2" for the device
## above that and so on.
# stackPosition = 0
Auf Konfigurationsseite sieht für mich alles gut aus. Bleibt mir leider nichts übrig als auf entweder ein kaputtes Max!-Gerät oder die Firmware des CUL zu tippen.