Raspi und HM-MOD-RPI-Pcb

Begonnen von laxmann, 08 Dezember 2016, 19:12:33

Vorheriges Thema - Nächstes Thema

laxmann

Guten Abend zusammen,
ich habe nach
http://www.fhemwiki.de/wiki/HM-MOD-RPI-PCB_HomeMatic_Funkmodul_f%C3%BCr_Raspberry_Pi (ftp://www.fhemwiki.de/wiki/HM-MOD-RPI-PCB_HomeMatic_Funkmodul_f%C3%BCr_Raspberry_Pi)
mehrfach die Installation vorgenommen - ich komme nicht weiter.
In meinem Logfile steht über viele Zeilen
2016.12.08 19:02:52 3: HMRaspi1 device closed
2016.12.08 19:02:52 3: Setting HMRaspi1 serial parameters to 115200,8,N,1
2016.12.08 19:02:52 1: /dev/ttyAMA0 reappeared (HMRaspi1)
2016.12.08 19:02:56 1: HMUARTLGW HMRaspi1 did not respond for the 1. time, resending
2016.12.08 19:02:59 1: HMUARTLGW HMRaspi1 did not respond for the 2. time, resending
2016.12.08 19:03:02 1: HMUARTLGW HMRaspi1 did not respond for the 3. time, resending
2016.12.08 19:03:05 1: HMUARTLGW HMRaspi1 did not respond after all, reopening
2016.12.08 19:03:05 3: HMRaspi1 device closed
2016.12.08 19:03:05 3: Setting HMRaspi1 serial parameters to 115200,8,N,1
2016.12.08 19:03:05 1: /dev/ttyAMA0 reappeared (HMRaspi1)
2016.12.08 19:03:09 1: HMUARTLGW HMRaspi1 did not respond for the 1. time, resending
2016.12.08 19:03:12 1: HMUARTLGW HMRaspi1 did not respond for the 2. time, resending
2016.12.08 19:03:15 1: HMUARTLGW HMRaspi1 did not respond for the 3. time, resending
2016.12.08 19:03:18 1: HMUARTLGW HMRaspi1 did not respond after all, reopening
2016.12.08 19:03:18 3: HMRaspi1 device closed
2016.12.08 19:03:18 3: Setting HMRaspi1 serial parameters to 115200,8,N,1
2016.12.08 19:03:18 1: /dev/ttyAMA0 reappeared (HMRaspi1)
2016.12.08 19:03:22 1: HMUARTLGW HMRaspi1 did not respond for the 1. time, resending
2016.12.08 19:03:25 1: HMUARTLGW HMRaspi1 did not respond for the 2. time, resending
2016.12.08 19:03:28 1: HMUARTLGW HMRaspi1 did not respond for the 3. time, resending
2016.12.08 19:03:31 1: HMUARTLGW HMRaspi1 did not respond after all, reopening
2016.12.08 19:03:31 3: HMRaspi1 device closed
2016.12.08 19:03:31 3: Setting HMRaspi1 serial parameters to 115200,8,N,1
2016.12.08 19:03:31 1: /dev/ttyAMA0 reappeared (HMRaspi1)
2016.12.08 19:03:35 1: HMUARTLGW HMRaspi1 did not respond for the 1.


Ich habe dieses Funkmodul zum Raspi bei mir funktionstüchtig erlebt. Ich konnte eine HM-Funktsteckdose schalten.

Wo ist der Fehler?


Gruß
laxmann

Otto123

Hallo Laxmann,

ich denke, dass Modul arbeitet nicht.
Also Modul defekt, serielle Schnittstelle nicht vorhanden, falsch gesteckt irgend so etwas.
Es liegt nicht an der Konfiguration der seriellen Schnittstelle, sondern das Modul ist über Deine definierte Schnittstelle nicht erreichbar.
Du kannst gern weitere Informationen liefern:
list des Moduls.
Bild vom Modul wie es auf der Schnittstelle steckt.
Sind weitere Module am GPIO gesteckt?
Raspi Modell
usw.

Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

laxmann

Guten Tag Otto,
jetzt ist wieder Zeit.
Ich benutze für dieses Modul den Rasp 3 B

Hier Device des HM-MOD-RPI-Pcb
DeviceOverview
HMRaspi1                         opened
set HMRaspi1

Internals
CNT                                      1
DEF                                     /dev/ttyAMA0
DevState                              1
DevType                                UART
DeviceName                         /dev/ttyAMA0@115200
FD                                         5
LastOpen                             1481368713.31369
NAME                                   HMRaspi1
NR                                        20
PARTIAL
STATE                                     opened
TYPE                                     HMUARTLGW
XmitOpen                              0

Readings
D-type                                  HM-MOD-UART                      2016-12-10 11:46:49
cond                                    init                                       2016-12-10 12:18:47
loadLvl                                 suspended                          2016-12-10 11:46:49
state                                   opened                                2016-12-10 12:18:33

attr HMRaspi1
Attributes
hmId                                        123123




Wobei in den Reading kurzzeitig unter
cond                                disconnected
auftritt.

Das Modul steckt so  auf den GPIO wie es in dem Bau- und Bedienungsanleitung von ELV zu sehen ist.

Gruß
laxmann

Otto123

Hallo laxmann,

was liefert
ls -l /dev/ttyAMA0
?
Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

laxmann

Hallo Otto,

da gibt es folgende Meldung
crw-rw---- 1 root dialout 204, 64 Dez 10 15:21 /dev/ttyAMA0





Otto123

Hi,
das sieht gut aus. Hast Du Einträge im Logfile? wechselnd connect disconnect?
Was sagt cat /lib/systemd/system/hciuart.service

Und cat /boot/config.txt


Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

laxmann

Da bin ich wieder.

Zitatcat /lib/systemd/system/hciuart.service

[Unit]
Description=Configure Bluetooth Modems connected by UART
ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins
Before=bluetooth.service
After=dev-ttyS0.device

[Service]
Type=forking
ExecStart=/usr/bin/hciattach /dev/ttyS0 bcm43xx 921600 noflow -

[Install]
WantedBy=multi-user.target


Zitatcat /boot/config.txt

# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=off
#dtparam=i2s=on
dtparam=spi=off

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on



ZitatHast Du Einträge im Logfile? wechselnd connect disconnect?
2016.12.10 18:16:25 1: /dev/ttyAMA0 reappeared (HMRaspi1)
2016.12.10 18:16:29 1: HMUARTLGW HMRaspi1 did not respond for the 1. time, resending
2016.12.10 18:16:32 1: HMUARTLGW HMRaspi1 did not respond for the 2. time, resending
2016.12.10 18:16:35 1: HMUARTLGW HMRaspi1 did not respond for the 3. time, resending
2016.12.10 18:16:38 1: HMUARTLGW HMRaspi1 did not respond after all, reopening
2016.12.10 18:16:38 3: HMRaspi1 device closed
2016.12.10 18:16:38 3: Setting HMRaspi1 serial parameters to 115200,8,N,1


Dieser Eintrag wiederholt sich ca. alle 13 Sekunden.

In der "fhem.save" habe ich noch etwas gefunden.
#Sat Dec 10 15:33:34 2016
setstate HMRaspi1 opened
setstate HMRaspi1 2016-12-10 12:38:09 D-type HM-MOD-UART
setstate HMRaspi1 2016-12-10 15:33:24 cond init
setstate HMRaspi1 2016-12-10 12:38:09 loadLvl suspended
setstate HMRaspi1 2016-12-10 15:33:23 state opened
setstate Logfile active
setstate autocreate active
setstate eventTypes active
setstate global no definition
setstate initialUsbCheck 2016-12-10 12:38:09
setstate initialUsbCheck 2016-12-10 12:38:09 state active


und hier in der "eventTypes.txt
454 HMRaspi1 CONNECTED
1 HMRaspi1 D-type: HM-MOD-UART
455 HMRaspi1 cond: disconnected
461 HMRaspi1 cond: init
1 HMRaspi1 loadLvl: suspended
1 HMRaspi1 updateCoPro /home/pi/coprocessor_update.eq3



Vielleicht ist auch noch das Booten von FHEM interessant:
2016.12.04 17:49:03 0: Server shutdown
2016.12.04 17:49:06 1: Including fhem.cfg
2016.12.04 17:49:06 3: telnetPort: port 7072 opened
2016.12.04 17:49:06 3: WEB: port 8083 opened
2016.12.04 17:49:06 3: WEBphone: port 8084 opened
2016.12.04 17:49:06 3: WEBtablet: port 8085 opened
2016.12.04 17:49:06 2: eventTypes: loaded 0 events from ./log/eventTypes.txt
2016.12.04 17:49:06 1: Including ./log/fhem.save
2016.12.04 17:49:06 1: usb create starting
2016.12.04 17:49:07 3: Probing CUL device /dev/ttyAMA0
2016.12.04 17:49:07 3: Probing TCM_ESP3 device /dev/ttyAMA0
2016.12.04 17:49:07 3: Probing FRM device /dev/ttyAMA0
2016.12.04 17:49:13 1: usb create end
2016.12.04 17:49:13 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2016.12.04 17:49:13 0: Featurelevel: 5.7
2016.12.04 17:49:13 0: Server started with 9 defined entities (fhem.pl:12680/2016-11-28 perl:5.020002 os:linux user:fhem pid:1314)
2016.12.04 17:49:51 3: Opening myHmUART device /dev/ttyAMA0
2016.12.04 17:49:51 3: Setting myHmUART serial parameters to 115200,8,N,1
2016.12.04 17:49:51 3: myHmUART device opened

laxmann

Hallo Otto,
ich habe auf deinem Blog zur "Homematic Firmwareupdate"
http://heinz-otto.blogspot.de/ (ftp://heinz-otto.blogspot.de/)
einen Hinweis zu deiner Installation gelesen.
ZitatIch habe zusätzlich zu meinem produktiven System mit einem HMLAN und einem RPI Modul noch ein Test System mit einem RPI Modul.
Der Unterschied zu deiner Installation sind bei mir drei 3 HMLAN im Einsatz. Das Funkmodul steckt auch auf meinem Test-Rasp. Kann meine Störung daher kommen?

Schönes Wochenende
laxmann

Otto123

Hallo laxmann,

ich kann in Deiner boot/config.txt nicht mal erkennen, dass die UART aktiviert wird.
Hast Du die Schritte überhaupt ausgeführt? Ich bin der Meinung von allem was da steht hast Du nichts gemacht.

Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

laxmann

Hallo Otto,
ich habe wohl die falsche Datei ausgewählt.
Hier die Richtige:
# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

enable_uart=1
dtoverlay=pi3-miniuart-bt
core_freq=250


Gruß
laxmann

Otto123

Hallo Laxmann,

wolltest Du mich testen? :)

Deine andere Umgebung verursacht keine "Störung" dein Modul wird an der seriellen Schnittstelle nicht richtig in Betrieb genommen, bzw stört ein anderer Prozess.

setze mal bitte attr initialUsbCheck disable 1 und starte FHEM neu.
Mich stört dies hier
Zitat2016.12.04 17:49:06 1: usb create starting
2016.12.04 17:49:07 3: Probing CUL device /dev/ttyAMA0
2016.12.04 17:49:07 3: Probing TCM_ESP3 device /dev/ttyAMA0
2016.12.04 17:49:07 3: Probing FRM device /dev/ttyAMA0
Nicht das FHEm ein zweites Device an der ttyAMA0 einrichten will.

Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

laxmann

Guten Abend Otto,
ich habe es ausprobiert - keine Veränderung
Aber mit deinen Bemerkungen und zu dem Code
Zitatattr initialUsbCheck disable 1
muss ich wohl noch etwas hinzufügen. Mein Test-Rasp wird von einer ext. Festplatte gebootet. Ich habe in der Zwischenzeit diesen Rasp so umkonfiguriert, dass von der SD-Karte gebootet wird. Siehe da -
2016.12.11 17:11:07 0: Server shutdown
2016.12.11 17:11:10 1: Including fhem.cfg
2016.12.11 17:11:10 3: telnetPort: port 7072 opened
2016.12.11 17:11:10 3: WEB: port 8083 opened
2016.12.11 17:11:10 3: WEBphone: port 8084 opened
2016.12.11 17:11:10 3: WEBtablet: port 8085 opened
2016.12.11 17:11:11 2: eventTypes: loaded 194 events from ./log/eventTypes.txt
2016.12.11 17:11:11 3: Opening HMRaspi1 device /dev/ttyAMA0
2016.12.11 17:11:11 3: Setting HMRaspi1 serial parameters to 115200,8,N,1
2016.12.11 17:11:11 3: HMRaspi1 device opened
2016.12.11 17:11:12 1: Including ./log/fhem.save
2016.12.11 17:11:12 3: Device HM_4B41E8 added to ActionDetector with 000:10 time
2016.12.11 17:11:12 1: usb create starting
2016.12.11 17:11:13 1: usb create end
2016.12.11 17:11:13 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2016.12.11 17:11:13 0: Featurelevel: 5.7
2016.12.11 17:11:13 0: Server started with 19 defined entities (fhem.pl:12719/2016-12-06 perl:5.020002 os:linux user:fhem pid:2062)
2016.12.11 17:11:13 3: CUL_HM set HM_4B41E8_Sw statusRequest
2016.12.11 17:12:16 3: HMRaspi1: Unknown code A14FA845E36D18F000000801061000000000008D9FE::-54:HMRaspi1, help me!
2016.12.11 17:12:30 3: CUL_HM set HM_4B41E8_Sw on
2016.12.11 17:12:31 3: HMRaspi1: Unknown code A148E845E370BA5000000800000000000000008EBFE::-80:HMRaspi1, help me!
2016.12.11 17:12:32 3: CUL_HM set HM_4B41E8_Sw off

Das Funkmodul funktioniert.
Das spricht doch dafür, dass das Problem die externe Festplatte verursacht.
Wenn das so ist, wie gehe ich dann vor?

Gruß
laxmann

Otto123

Guten Abend laxmann,

na das ist ja wieder interessant  :-X
Ich habe da jetzt weder ein Vorstellung warum, das so ist, noch was Du machen kannst.

Wie wird die Festplatte angeschlossen?

Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

laxmann

Ist eine
Intenso 3813430 High Performance interne SSD 120GB (6,3 cm (2,5 Zoll), SATA III, 520 MB/Sekunden)
mit einem USB-SATA III - Adapter.
Die Festplatte wird vom Raspi versorgt.

Noch eine Guten Abend
Gruß
laxmann    :(

Otto123

Hi,

was ich in Deiner config.txt vermisse ist der Eintrag
max_usb_current=1

Der dient dazu über USB mehr Strom zur Verfügung zu stellen. Ich habe keine Ahnung ob das einen Einfluss hat. Eigentlich dürfte Deine SSD nicht laufen, aber vielleicht wird die Spannung runtergezogen und das Modul am GPIO Connector wird nicht versorgt?

Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz