Openhab + PIVCCU auf einem RPi3

Virtualisierte CCU für Raspberry Pi und Clones

Moderator: Co-Administratoren

re-vo-lution
Beiträge: 131
Registriert: 07.01.2018, 15:11
Wohnort: 08233 Treuen
Hat sich bedankt: 21 Mal
Danksagung erhalten: 8 Mal

Openhab + PIVCCU auf einem RPi3

Beitrag von re-vo-lution » 07.01.2018, 16:41

Hallo,

Ich möchte PIVCCU auf einem RPi3 betreiben auf dem Openhab unter Openhabian läuft.
Ich habe dazu PIVCCU manuell installiert wie in der Beschreibung (https://github.com/alexreinert/piVCCU/b ... berrypi.md)

Jedoch startet PIVCCU nicht. Ich bekommen folgenden Fehler:

[15:07:14] openhabian@openHABianPi:~$ sudo pivccu-info
[sudo] Passwort für openhabian:
piVCCU version: 2.29.23-19
Kernel modules: Available
Raw UART dev: Not available
Rasp.Pi3 UART: Assigned to GPIO pins
Board serial: Unknown
lxc doesn't exist

[15:50:45] openhabian@openHABianPi:~$ sudo journalctl -xe
Jan 07 15:15:01 openHABianPi CRON[2485]: pam_unix(cron:session): session closed for user root
Jan 07 15:17:01 openHABianPi CRON[2525]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan 07 15:17:01 openHABianPi CRON[2529]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 07 15:17:01 openHABianPi CRON[2525]: pam_unix(cron:session): session closed for user root
Jan 07 15:17:51 openHABianPi systemd[1]: Starting Cleanup of Temporary Directories...
-- Subject: Unit systemd-tmpfiles-clean.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit systemd-tmpfiles-clean.service has begun starting up.
Jan 07 15:17:51 openHABianPi systemd[1]: Started Cleanup of Temporary Directories.
-- Subject: Unit systemd-tmpfiles-clean.service has finished start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit systemd-tmpfiles-clean.service has finished starting up.
--
-- The start-up result is done.
Jan 07 15:20:40 openHABianPi wpa_supplicant[457]: wlan0: WPA: Group rekeying completed with 9c:c7:a6:44:77:25 [GTK=CCMP]
Jan 07 15:25:01 openHABianPi CRON[2662]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan 07 15:25:01 openHABianPi CRON[2666]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jan 07 15:25:01 openHABianPi CRON[2662]: pam_unix(cron:session): session closed for user root
Jan 07 15:30:40 openHABianPi wpa_supplicant[457]: wlan0: WPA: Group rekeying completed with 9c:c7:a6:44:77:25 [GTK=CCMP]
Jan 07 15:35:01 openHABianPi CRON[2834]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan 07 15:35:01 openHABianPi CRON[2838]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jan 07 15:35:01 openHABianPi CRON[2834]: pam_unix(cron:session): session closed for user root
Jan 07 15:40:40 openHABianPi wpa_supplicant[457]: wlan0: WPA: Group rekeying completed with 9c:c7:a6:44:77:25 [GTK=CCMP]
Jan 07 15:45:01 openHABianPi CRON[2990]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan 07 15:45:01 openHABianPi CRON[2994]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jan 07 15:45:01 openHABianPi CRON[2990]: pam_unix(cron:session): session closed for user root
Jan 07 15:50:09 openHABianPi sudo[3044]: openhabian : TTY=pts/0 ; PWD=/home/openhabian ; USER=root ; COMMAND=/usr/sbin/pivccu-info
Jan 07 15:50:09 openHABianPi sudo[3044]: pam_unix(sudo:session): session opened for user root by openhabian(uid=0)
Jan 07 15:50:09 openHABianPi sudo[3044]: pam_unix(sudo:session): session closed for user root
Jan 07 15:50:40 openHABianPi wpa_supplicant[457]: wlan0: WPA: Group rekeying completed with 9c:c7:a6:44:77:25 [GTK=CCMP]
Jan 07 15:50:47 openHABianPi sudo[3071]: openhabian : TTY=pts/0 ; PWD=/home/openhabian ; USER=root ; COMMAND=/bin/journalctl -xe
Jan 07 15:50:47 openHABianPi sudo[3071]: pam_unix(sudo:session): session opened for user root by openhabian(uid=0)


[15:51:41] openhabian@openHABianPi:~$ sudo systemctl status pivccu.service
● pivccu.service - piVCCU
Loaded: loaded (/lib/systemd/system/pivccu.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2018-01-07 15:03:23 CET; 48min ago
Process: 901 ExecStart=/var/lib/piVCCU/start_container.sh (code=exited, status=1/FAILURE)
CPU: 49ms

Jan 07 15:03:22 openHABianPi systemd[1]: Starting piVCCU...
Jan 07 15:03:23 openHABianPi piVCCU[938]: Could not locate raw uart interface. Are the kernel modules and the device tree overlays installed?
Jan 07 15:03:23 openHABianPi start_container.sh[901]: <11>Jan 7 15:03:23 piVCCU: Could not locate raw uart interface. Are the kernel modules and the device tree over
Jan 07 15:03:23 openHABianPi systemd[1]: pivccu.service: Control process exited, code=exited status=1
Jan 07 15:03:23 openHABianPi systemd[1]: Failed to start piVCCU.
Jan 07 15:03:23 openHABianPi systemd[1]: pivccu.service: Unit entered failed state.
Jan 07 15:03:23 openHABianPi systemd[1]: pivccu.service: Failed with result 'exit-code'.

[15:52:00] openhabian@openHABianPi:~$ sudo ifconfig
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.178.199 netmask 255.255.255.0 broadcast 192.168.178.255
inet6 fe80::ba27:ebff:fe0f:20fa prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:0f:20:fa txqueuelen 1000 (Ethernet)
RX packets 5148 bytes 794989 (776.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 106 bytes 10372 (10.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.178.199 netmask 255.255.255.0 broadcast 192.168.178.255
ether b8:27:eb:0f:20:fa txqueuelen 1000 (Ethernet)
RX packets 5178 bytes 799610 (780.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 131 bytes 15352 (14.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Lokale Schleife)
RX packets 58 bytes 4362 (4.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 58 bytes 4362 (4.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.178.200 netmask 255.255.255.0 broadcast 192.168.178.255
inet6 fe80::ba27:ebff:fe5a:75af prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:5a:75:af txqueuelen 1000 (Ethernet)
RX packets 3857 bytes 861529 (841.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 914 bytes 132745 (129.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


Wo könnte das Problem leigen udn wie kann ich dies beheben?

mfg

Rene

Benutzeravatar
deimos
Beiträge: 5396
Registriert: 20.06.2017, 10:38
System: Alternative CCU (auf Basis OCCU)
Wohnort: Leimersheim
Hat sich bedankt: 121 Mal
Danksagung erhalten: 957 Mal
Kontaktdaten:

Re: Openhab + PIVCCU auf einem RPi3

Beitrag von deimos » 07.01.2018, 17:15

Hi,

das Problem liegt daran, dass der Treiber für die Kommunikation mit dem Funkmodul nicht geladen ist, was sehr wahrscheinlich daran liegt, dass der Device Tree Overlay nicht geladen ist.

kann es sein, dass du nach der Installation der Kernel Module noch keinen Neustart gemacht hast?

Ansonsten poste mal bitte deine /boot/config.txt

Viele Grüße
Alex

predi-ger-many
Beiträge: 26
Registriert: 21.11.2016, 09:22

Re: Openhab + PIVCCU auf einem RPi3

Beitrag von predi-ger-many » 09.01.2018, 00:27

Hallo,

ich habe vor kurzem das gleiche Problem gehabt bei einer Neuinstallation mit Stretch.

Da war der Device Tree Overlay Eintrag in /boot/config.txt vorhanden.
Da war auch defintiv ein Reboot gemacht worden.


Hast du zufällig bei der OS-Installation ein rpi-update ausgeführt? Falls ja, mach das System platt.
Installiere komplett neu. Danach wird das Modul erkannt. Ich habe fast einen Tag das halbe System
auseinander genommen und habe nicht gefunden, warum das Modul nach einem rpi-update nicht mehr
korrekt erkannt wurde.

Viele Grüße
Thomas

Benutzeravatar
deimos
Beiträge: 5396
Registriert: 20.06.2017, 10:38
System: Alternative CCU (auf Basis OCCU)
Wohnort: Leimersheim
Hat sich bedankt: 121 Mal
Danksagung erhalten: 957 Mal
Kontaktdaten:

Re: Openhab + PIVCCU auf einem RPi3

Beitrag von deimos » 09.01.2018, 05:12

Hi,

das Problem dürfte es hier nicht sein, das die Aisgabe von pivccu-info ja angibt, dass die Kernel Module vorhanden (und ladbar) sind.

Viele Grüße
Alex

re-vo-lution
Beiträge: 131
Registriert: 07.01.2018, 15:11
Wohnort: 08233 Treuen
Hat sich bedankt: 21 Mal
Danksagung erhalten: 8 Mal

Re: Openhab + PIVCCU auf einem RPi3

Beitrag von re-vo-lution » 09.01.2018, 08:55

Vielen Dank für Euro Tipps.
Ich habe das Problem gefunden.
Der User openhabian musste zur Gruppe gpio hinzugefügt werden.
Nun funktioniert es.

Stryker1
Beiträge: 33
Registriert: 23.08.2017, 10:57
Hat sich bedankt: 1 Mal

Re: Openhab + PIVCCU auf einem RPi3

Beitrag von Stryker1 » 16.03.2018, 13:41

Ich habe das gleiche Problem:
Ich nutze ebenfalls Openhabian und versuche darauf piVCCU gem. https://github.com/alexreinert/piVCCU/b ... berrypi.md zu installieren.

Mehrere Reboots halfen nicht und bei mir ist der User "openhabian" bereits in der Gruppe "gpio":

Code: Alles auswählen

[13:40:09] openhabian@openHABianPi:~$ sudo adduser openhabian gpio
The user `openhabian' is already a member of `gpio'.
Trotzdem erhalte ich schon bei der Package-Installation die Fehlermeldung "WARNING: Could not locate raw uart interface. Are the kernel modules and the device tree overlays installed?"

Weiß jemand Rat?

/boot/config.txt:

Code: Alles auswählen

[...]
dtoverlay=pi3-disable-bt
dtoverlay=pivccu-raspberrypi
[13:37:21] openhabian@openHABianPi:~$ sudo pivccu-info

Code: Alles auswählen

piVCCU version: 2.31.25-23
Kernel modules: Not available
Raw UART dev:   Not available
Rasp.Pi3 UART:  Assigned to GPIO pins
Board serial:   Unknown
lxc doesn't exist

[13:38:40] openhabian@openHABianPi:~$ systemctl status pivccu.service

Code: Alles auswählen

â pivccu.service - piVCCU
   Loaded: loaded (/lib/systemd/system/pivccu.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-03-16 13:35:41 CET; 3min 8s ago
  Process: 7206 ExecStart=/var/lib/piVCCU/start_container.sh (code=exited, status=1/FAILURE)
      CPU: 22ms

Mar 16 13:35:41 openHABianPi systemd[1]: Starting piVCCU...
Mar 16 13:35:41 openHABianPi piVCCU[7209]: Could not locate raw uart interface. Are the kernel modules and the device tree overlays installed?
Mar 16 13:35:41 openHABianPi start_container.sh[7206]: <11>Mar 16 13:35:41 piVCCU: Could not locate raw uart interface. Are the kernel modules and the device tree
Mar 16 13:35:41 openHABianPi systemd[1]: pivccu.service: Control process exited, code=exited status=1
Mar 16 13:35:41 openHABianPi systemd[1]: Failed to start piVCCU.
Mar 16 13:35:41 openHABianPi systemd[1]: pivccu.service: Unit entered failed state.
Mar 16 13:35:41 openHABianPi systemd[1]: pivccu.service: Failed with result 'exit-code'.
lines 1-13/13 (END)

Benutzeravatar
deimos
Beiträge: 5396
Registriert: 20.06.2017, 10:38
System: Alternative CCU (auf Basis OCCU)
Wohnort: Leimersheim
Hat sich bedankt: 121 Mal
Danksagung erhalten: 957 Mal
Kontaktdaten:

Re: Openhab + PIVCCU auf einem RPi3

Beitrag von deimos » 16.03.2018, 13:55

Hi,

bevor wir jetzt alles mögliche auseinandernehmen, versuch mal folgendes:

Code: Alles auswählen

sudo apt install --reinstall pivccu-modules-raspberrypi
und danach einen sauberen Reboot, bitte sichere dabei die Ausgabe von dem Befehl, damit die Infos erhalten bleiben, falls es nach dem Reboot noch nicht läuft.

Viele Grüße
Alex

Stryker1
Beiträge: 33
Registriert: 23.08.2017, 10:57
Hat sich bedankt: 1 Mal

Re: Openhab + PIVCCU auf einem RPi3

Beitrag von Stryker1 » 16.03.2018, 15:58

Danke für die schnelle Rückmeldung, Alex.
Hab ich ausgeführt und anschließend sudo reboot.
Leider ist das Ergebnis von pivccu-info unverändert. Hier die Ausgabe des reinstall-Befehls:

Code: Alles auswählen

[15:49:54] openhabian@openHABianPi:~$ sudo apt install --reinstall pivccu-module                                                                 s-raspberrypi
[sudo] password for openhabian:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 80 not upgraded.
Need to get 2,386 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 https://www.pivccu.de/piVCCU stable/main armhf pivccu-modules-raspberrypi armhf 2.0-8 [2,386 B]
Fetched 2,386 B in 0s (2,520 B/s)
Preconfiguring packages ...
(Reading database ... 82293 files and directories currently installed.)
Progress: [  0%] [...................................................................................................]
Removed /etc/systemd/system/multi-user.target.wants/pivccu-rpi-modules.service.
Adding 'diversion of /boot/overlays/pivccu-raspberrypi.dtbo to /usr/share/rpikernelhack/overlays/pivccu-raspberrypi.dtbo                         by rpikernelhack'
Unpacking pivccu-modules-raspberrypi (2.0-8) over (2.0-8) ...
Setting up pivccu-modules-raspberrypi (2.0-8) ...
Removing 'diversion of /boot/overlays/pivccu-raspberrypi.dtbo to /usr/share/rpikernelhack/overlays/pivccu-raspberrypi.dtb                        o by rpikernelhack'
Created symlink /etc/systemd/system/multi-user.target.wants/pivccu-rpi-modules.service â /lib/systemd/system/pivccu-rpi-modules.service.
Updating FireMotD available updates count ...
[15:50:30] openhabian@openHABianPi:~$

Benutzeravatar
deimos
Beiträge: 5396
Registriert: 20.06.2017, 10:38
System: Alternative CCU (auf Basis OCCU)
Wohnort: Leimersheim
Hat sich bedankt: 121 Mal
Danksagung erhalten: 957 Mal
Kontaktdaten:

Re: Openhab + PIVCCU auf einem RPi3

Beitrag von deimos » 16.03.2018, 17:37

Hi,

poste bitte mal deine vollständige /boot/config.txt

Viele Grüße
Alex

Stryker1
Beiträge: 33
Registriert: 23.08.2017, 10:57
Hat sich bedankt: 1 Mal

Re: Openhab + PIVCCU auf einem RPi3

Beitrag von Stryker1 » 16.03.2018, 18:01

Gerne, das meiste ist auskommentiert - habe hier bis auf das Deaktivieren von Bluetooth aus deiner Anleitung noch nie etwas umgestellt:

Code: Alles auswählen

# For more options and information see
# http://rpf.io/configtxt
# 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
gpu_mem=16

dtoverlay=pi3-disable-bt
dtoverlay=pivccu-raspberrypi


Antworten

Zurück zu „piVCCU“