NEWS
LIRC Adapter Funktion mit RPI4
-
Hallo,
vor ein paar Tagen habe ich IOBroker auf einem Raspberry PI 4 (2GB) installiert (-sLf https://iobroker.net/install.sh | bash -).
Nachdem ich es geschafft habe, mit dem Adapter RPI-Monitor (rpi2) die GPIOs anzusteuern und auszulesen, wollte ich mit LIRC IR-Signale senden.
LIRC ist installiert und der IR-Transmitter lässt sich auch übers Terminal mit "irsend SEND_START test_fb KEY_1" ansteuern.
Durch einen Fotoapparat sieht man die IR-LED blinken.Leider bekomme ich es im IOBroker mit dem LIRC Adapter nicht hin, die IR-LED anzusteuern.
Wenn ich die Anleitung des LIRC Adaptersrichtig verstanden habe, dann müssten doch im Objekt-Baum die Fernbedienungsbefehle aufgelistet werden, oder?
Bei mir sieht es aber so aus:

Die lircd.conf (/etc/lirc/) sieht so aus:
name test_fb bits 16 flags SPACE_ENC|CONST_LENGTH eps 30 aeps 130 header 9000 4500 one 625 1625 zero 625 375 ptrail 625 repeat 8875 2125 pre_data_bits 16 pre_data 0x609F gap 100000 toggle_bit 0 frequency 38000 duty_cycle 33 begin codes KEY_1 0x00000000000040BF KEY_2 0x000000000000C03F KEY_3 0x00000000000020DF end codes end remoteHier noch Screenshot mit Infos:


Was mache ich ich, bzw. läuft da falsch?
Läuft der LIRC grundsätzlich? Der iobroker-Adapter sattelt ja nur drauf auf.
apt policy lirc lirc-x liblircclient0 inputlirc systemctl status lirc* -
Läuft der LIRC grundsätzlich? Der iobroker-Adapter sattelt ja nur drauf auf.
apt policy lirc lirc-x liblircclient0 inputlirc systemctl status lirc*$ apt policy lirc lirc-x liblircclient0 inputlirc lirc: Installed: 0.10.1-6.3 Candidate: 0.10.1-6.3 Version table: *** 0.10.1-6.3 500 500 http://deb.debian.org/debian bullseye/main arm64 Packages 100 /var/lib/dpkg/status lirc-x: Installed: (none) Candidate: 0.10.1-6.3 Version table: 0.10.1-6.3 500 500 http://deb.debian.org/debian bullseye/main arm64 Packages liblircclient0: Installed: (none) Candidate: 0.10.1-6.3 Version table: 0.10.1-6.3 500 500 http://deb.debian.org/debian bullseye/main arm64 Packages inputlirc: Installed: (none) Candidate: 33-1 Version table: 33-1 500 500 http://deb.debian.org/debian bullseye/main arm64 Packages$ systemctl status lirc* ● lircd.socket Loaded: loaded (/lib/systemd/system/lircd.socket; enabled; vendor preset: enabled) Active: active (running) since Sat 2022-08-13 16:18:05 CEST; 1h 20min ago Triggers: ● lircd.service Listen: /run/lirc/lircd (Stream) CGroup: /system.slice/lircd.socket Aug 13 16:18:05 SmartHomePi systemd[1]: Listening on lircd.socket. ● lircd.service - Flexible IR remote input/output application support Loaded: loaded (/lib/systemd/system/lircd.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2022-08-13 16:18:07 CEST; 1h 20min ago TriggeredBy: ● lircd.socket Docs: man:lircd(8) http://lirc.org/html/configure.html Main PID: 502 (lircd) Tasks: 2 (limit: 1829) CPU: 6.878s CGroup: /system.slice/lircd.service └─502 /usr/sbin/lircd --nodaemon Aug 13 16:37:37 SmartHomePi lircd[502]: lircd-0.10.1[502]: Info: removed client Aug 13 16:37:37 SmartHomePi lircd-0.10.1[502]: Info: removed client Aug 13 17:03:33 SmartHomePi lircd[502]: lircd-0.10.1[502]: Notice: accepted new client on /var/run/lirc/lircd Aug 13 17:03:33 SmartHomePi lircd-0.10.1[502]: Notice: accepted new client on /var/run/lirc/lircd Aug 13 17:03:33 SmartHomePi lircd[502]: lircd-0.10.1[502]: Info: removed client Aug 13 17:03:33 SmartHomePi lircd-0.10.1[502]: Info: removed client -
Wie gesagt, übers Terminal kann ich die IR-LED ansteuern.
Ich sehe mit der Digitalkamera die LED aufblitzen.@johndoe sagte in LIRC Adapter Funktion mit RPI4:
Wie gesagt, übers Terminal kann ich die IR-LED ansteuern.
Das heißt nix, der iobroker muss als client auf den lircd zugreifen können.
lirc bringt aber ganz merkwürdige Abhängigkeiten zum X-Server und dem Druckersystem cups mit, das mag ich nicht auf meinem System haben. Sonst hätte ich das mal installiert. -
Ich habe jetzt gerade mal die LIRC Instanz neu gestartet.
Danach bekomme ich diese Ausgabe (systemctl status lirc*):Aug 13 17:59:02 SmartHomePi lircd[502]: lircd-0.10.1[502]: Info: removed client Aug 13 17:59:02 SmartHomePi lircd-0.10.1[502]: Info: removed client Aug 13 17:59:10 SmartHomePi lircd[502]: lircd-0.10.1[502]: Notice: accepted new client from 127.0.0.1 Aug 13 17:59:10 SmartHomePi lircd[502]: lircd-0.10.1[502]: Info: Cannot configure the rc device for /dev/lirc0 Aug 13 17:59:10 SmartHomePi lircd-0.10.1[502]: Notice: accepted new client from 127.0.0.1 Aug 13 17:59:10 SmartHomePi lircd-0.10.1[502]: Info: Cannot configure the rc device for /dev/lirc0 -
Ich habe jetzt gerade mal die LIRC Instanz neu gestartet.
Danach bekomme ich diese Ausgabe (systemctl status lirc*):Aug 13 17:59:02 SmartHomePi lircd[502]: lircd-0.10.1[502]: Info: removed client Aug 13 17:59:02 SmartHomePi lircd-0.10.1[502]: Info: removed client Aug 13 17:59:10 SmartHomePi lircd[502]: lircd-0.10.1[502]: Notice: accepted new client from 127.0.0.1 Aug 13 17:59:10 SmartHomePi lircd[502]: lircd-0.10.1[502]: Info: Cannot configure the rc device for /dev/lirc0 Aug 13 17:59:10 SmartHomePi lircd-0.10.1[502]: Notice: accepted new client from 127.0.0.1 Aug 13 17:59:10 SmartHomePi lircd-0.10.1[502]: Info: Cannot configure the rc device for /dev/lirc0@johndoe sagte in LIRC Adapter Funktion mit RPI4:
/dev/lirc0
Wie sehen da die Rechte aus?
ls -l /dev/lirc0 -
@thomas-braun said in LIRC Adapter Funktion mit RPI4:
ls -l /dev/lirc0
crw-rw---- 1 root video 251, 0 Aug 13 16:18 /dev/lirc0 -
@thomas-braun said in LIRC Adapter Funktion mit RPI4:
ls -l /dev/lirc0
crw-rw---- 1 root video 251, 0 Aug 13 16:18 /dev/lirc0Ist der user iobroker in der Gruppe 'video' drin?
Vermutlich nicht.sudo -u iobroker groups -
Bitte vollständige Ein- und Ausgabezeilen posten.
Lirc ist etwas tricky. Im Ubuntu-Wiki gibt es noch ein paar Hinweise:
-
Bitte vollständige Ein- und Ausgabezeilen posten.
Lirc ist etwas tricky. Im Ubuntu-Wiki gibt es noch ein paar Hinweise:
@thomas-braun said in LIRC Adapter Funktion mit RPI4:
Bitte vollständige Ein- und Ausgabezeilen posten.
Was meinst du?
So:$ sudo -u iobroker groups iobroker tty dialout audio video bluetooth gpio i2cMehr kommt da nicht.
-
@thomas-braun said in LIRC Adapter Funktion mit RPI4:
Bitte vollständige Ein- und Ausgabezeilen posten.
Was meinst du?
So:$ sudo -u iobroker groups iobroker tty dialout audio video bluetooth gpio i2cMehr kommt da nicht.
So.
echad@chet:/opt/iobroker $ sudo -u iobroker groups iobroker tty dialout audio video plugdev bluetooth gpio i2c -
Aber Fakt ist doch, dass der LIRC Adapter mit lirc verbunden ist und lirc auch sendet.
Was bedeutet das denn:Aug 13 17:59:10 SmartHomePi lircd-0.10.1[502]: Info: Cannot configure the rc device for /dev/lirc0?
Vermutlich nichts, du willst ja keine rc / Fernbedienung betreiben.
-
Kann es daran liegen:
SHPI@SmartHomePi:~ $ sudo systemctl restart lirc.service Failed to restart lirc.service: Unit lirc.service not found.?
-
Hat es was zu sagen, dass die Meldungen von lircd.service doppelt kommen:
SHPI@SmartHomePi:~ $ systemctl status lircd.service ● lircd.service - Flexible IR remote input/output application support Loaded: loaded (/lib/systemd/system/lircd.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2022-08-13 20:51:49 CEST; 5min ago TriggeredBy: ● lircd.socket Docs: man:lircd(8) http://lirc.org/html/configure.html Main PID: 965 (lircd) Tasks: 2 (limit: 1829) CPU: 1.815s CGroup: /system.slice/lircd.service └─965 /usr/sbin/lircd --nodaemon Aug 13 20:53:01 SmartHomePi lircd[965]: lircd-0.10.1[965]: Notice: accepted new client from 127.0.0.1 Aug 13 20:53:01 SmartHomePi lircd-0.10.1[965]: Notice: accepted new client from 127.0.0.1 Aug 13 20:53:02 SmartHomePi lircd[965]: lircd-0.10.1[965]: Info: removed client Aug 13 20:53:02 SmartHomePi lircd[965]: lircd-0.10.1[965]: Info: removed client Aug 13 20:53:02 SmartHomePi lircd-0.10.1[965]: Info: removed client Aug 13 20:53:02 SmartHomePi lircd-0.10.1[965]: Info: removed client Aug 13 20:53:33 SmartHomePi lircd[965]: lircd-0.10.1[965]: Notice: accepted new client from 127.0.0.1 Aug 13 20:53:33 SmartHomePi lircd-0.10.1[965]: Notice: accepted new client from 127.0.0.1 Aug 13 20:53:33 SmartHomePi lircd[965]: lircd-0.10.1[965]: Info: Cannot configure the rc device for /dev/lirc0 Aug 13 20:53:33 SmartHomePi lircd-0.10.1[965]: Info: Cannot configure the rc device for /dev/lirc0?
Ich habe LIRC noch mal neu installiert und konfiguriert: Keine Änderung.
Der LIRC-Adapter ist mit dem Client verbunden und über die RPI-Konsole kann ich IR-Kommandos schicken.
Aber im IOBroker werden die Fernbedienung-KEYs nicht angezeigt.
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden
