Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. Test Adapter doorio v2.1.2

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Test Adapter doorio v2.1.2

    This topic has been deleted. Only users with topic management privileges can see it.
    • Wal
      Wal Developer @AingTii last edited by

      @aingtii ,

      sudo systemctl status piface
      
      A 1 Reply Last reply Reply Quote 0
      • A
        AingTii @Wal last edited by

        @wal sagte in Test Adapter doorio v1.1.x:

        systemctl status piface

        okay, liegt es evtl. daran, dass ich kein PiFace nutze sondern die GPIO direkt?

        wenn ich das richtig gelesen hatte muss ich doch piface dann deaktivieren oder habe ich das falsch rausgelesen?

        habe pimqttio noch mal installiert beim start kommt das...

        pi@raspberrypi:~ $ python3 -m mqtt_io config.yml
        2021-03-19 08:07:12 mqtt_io.server [INFO] Digital input 'DoorBell_1' value changed to True
        2021-03-19 08:07:12 mqtt_io.server [INFO] Digital input 'DoorBell_2' value changed to False
        2021-03-19 08:07:12 mqtt_io.server [INFO] Connecting to MQTT...
        2021-03-19 08:07:12 mqtt_io.server [INFO] Waiting for our tasks to complete...
        Traceback (most recent call last):
          File "/home/pi/.local/lib/python3.7/site-packages/asyncio_mqtt/client.py", line 79, in connect
            await loop.run_in_executor(None, self._client.connect, self._hostname, self._port, 60)
          File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
            result = self.fn(*self.args, **self.kwargs)
          File "/usr/local/lib/python3.7/dist-packages/paho_mqtt-1.5.0-py3.7.egg/paho/mqtt/client.py", line 937, in connect
            return self.reconnect()
          File "/usr/local/lib/python3.7/dist-packages/paho_mqtt-1.5.0-py3.7.egg/paho/mqtt/client.py", line 1071, in reconnect
            sock = self._create_socket_connection()
          File "/usr/local/lib/python3.7/dist-packages/paho_mqtt-1.5.0-py3.7.egg/paho/mqtt/client.py", line 3522, in _create_socket_connection
            return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
          File "/usr/lib/python3.7/socket.py", line 727, in create_connection
            raise err
          File "/usr/lib/python3.7/socket.py", line 716, in create_connection
            sock.connect(sa)
        ConnectionRefusedError: [Errno 111] Connection refused
        
        During handling of the above exception, another exception occurred:
        
        Traceback (most recent call last):
          File "/home/pi/.local/lib/python3.7/site-packages/mqtt_io/server.py", line 1142, in run
            await self._connect_mqtt()
          File "/home/pi/.local/lib/python3.7/site-packages/mqtt_io/server.py", line 549, in _connect_mqtt
            await self.mqtt.connect()
          File "/home/pi/.local/lib/python3.7/site-packages/mqtt_io/mqtt/asyncio_mqtt.py", line 63, in connect
            await self._client.connect(timeout=timeout)
          File "/home/pi/.local/lib/python3.7/site-packages/asyncio_mqtt/client.py", line 88, in connect
            raise MqttError(str(error))
        asyncio_mqtt.error.MqttError: [Errno 111] Connection refused
        
        During handling of the above exception, another exception occurred:
        
        Traceback (most recent call last):
          File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
            "__main__", mod_spec)
          File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
            exec(code, run_globals)
          File "/home/pi/.local/lib/python3.7/site-packages/mqtt_io/__main__.py", line 85, in <module>
            main()
          File "/home/pi/.local/lib/python3.7/site-packages/mqtt_io/__main__.py", line 80, in main
            mqtt_gpio.run()
          File "/home/pi/.local/lib/python3.7/site-packages/mqtt_io/server.py", line 1174, in run
            self.loop.run_until_complete(self._main_task)
          File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
            return future.result()
          File "/home/pi/.local/lib/python3.7/site-packages/mqtt_io/server.py", line 1168, in run
            await self.shutdown()
          File "/home/pi/.local/lib/python3.7/site-packages/mqtt_io/server.py", line 1229, in shutdown
            wait=False,
          File "/home/pi/.local/lib/python3.7/site-packages/mqtt_io/server.py", line 635, in _mqtt_publish
            await self.mqtt.publish(msg)
          File "/home/pi/.local/lib/python3.7/site-packages/mqtt_io/mqtt/asyncio_mqtt.py", line 76, in publish
            topic=msg.topic, payload=msg.payload, qos=msg.qos, retain=msg.retain
          File "/home/pi/.local/lib/python3.7/site-packages/asyncio_mqtt/client.py", line 128, in publish
            raise MqttCodeError(info.rc, 'Could not publish message')
        asyncio_mqtt.error.MqttCodeError: [code:4] Could not publish message
        
        Wal 1 Reply Last reply Reply Quote 0
        • Wal
          Wal Developer @AingTii last edited by

          @aingtii ,
          nein piface ist nur ein Name den ich gewählt habe. Du hast ja die Konfig an GPIO angepasst. Du hattest nur keine Verbindung und jetzt nach dem neu installieren ein anders Problem.

          1 Reply Last reply Reply Quote 0
          • A
            AingTii @Wal last edited by

            @wal

            Ich habe irgendwie das problem dass beim manuellen start über
            $ baresip

            alles läuft, allerdings wenn ich es über
            sudo systemctl enable baresip hinzufügen, funktioniert erst mal
            auch alles, aber der Anruf wird sofort nach dem annehmen wieder aufgelegt, kann also nicht sprechen....

            Leider ist der Entwickler nicht so gesprächig und wirklich dokumentiert ist das ganze ja nicht.
            anscheinend hatte ich auch eine Alte Version installiert, wobei für die neue auch nicht
            Wirklich erklärt ist wie ich die installieren muss, da muss man sich einiges selbst erdenken.....

            Hast Du ne Idee dazu?

            Und wie mache ich dass das ein lifevideo übertragen wird oder liegt es nur an Fritz das es nicht
            unterstützt wird?

            Hast Du eigentlich ne App die auf dem Smartphone die Gegenstelle darstellt?

            Danke
            Gruß Jens

            Wal 1 Reply Last reply Reply Quote 0
            • Wal
              Wal Developer @AingTii last edited by

              @aingtii ,
              ich nutze Fritzfons mit einer Fritzbox, da wird das Bild vom Mjpg-Streamer den ich für eine USB-Webcam installiert habe direkt angezeigt. Video über Baresip habe ich nicht versucht. Wenn du Baresip mit Hand startest, kommt nach dem annehmen eine Fehlermeldung ?

              A 1 Reply Last reply Reply Quote 0
              • A
                AingTii @Wal last edited by

                @wal

                Das ist ja das Problem bei manuell gestartete baresip läuft es einwandfrei.

                Aber als System automatisch beim Boot gestartet sehe ich ja keine Ausgabe und dnn habe ich die Probleme, dass es gleich wieder auflegt und ich dann nur noch tut tut tut höre

                Wal 1 Reply Last reply Reply Quote 0
                • Wal
                  Wal Developer @AingTii last edited by

                  @aingtii ,
                  in "/var/log/messages" stehen die Meldungen.

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    AingTii @Wal last edited by

                    @wal

                    also in /var/log/messages habe ich keienerlei einträge,

                    letzter Eintrag war 18:55
                    19:07 habe ich 3x hintereinander den Anruf ausgelöst und und angenommen wobei jedes
                    baresip unmittelbar nach Annahme von allein aufgelegt hat.
                    der Nächste Eintrag ist dann 19:08 das booten bzw kurz vor dem booten jedes mal der scan
                    der Ports denke ich mal. (mtp-probe)

                    Merkwürdig, vor Allem was ist der Unterschied, ob ich es nun manuell starte oder per service?!?!?

                    hier noch mal die baresip.service

                    [Unit]
                    Description=baresip
                    After=syslog.target network.target ntpdate.service
                    
                    [Service]
                    Type=simple
                    User=pi
                    Group=pi
                    ExecStart=/usr/local/bin/baresip -f /home/pi/.baresip
                    
                    [Install]
                    WantedBy=multi-user.target
                    
                    

                    ExecStart=/usr/local/bin/baresip /home/pi/.baresip

                    Wal 1 Reply Last reply Reply Quote 0
                    • Wal
                      Wal Developer @AingTii last edited by

                      @aingtii ,

                      Apr 13 15:03:07 raspberrypi baresip[11459]: doorio2sip@192.168.122.2: selected for request
                      Apr 13 15:03:07 raspberrypi baresip[11459]: ua: using best effort AF: af=AF_INET
                      Apr 13 15:03:07 raspberrypi baresip[11459]: call: connecting to 'sip:**610@192.168.122.2'..
                      Apr 13 15:03:07 raspberrypi baresip[11459]: call: SIP Progress: 100 Trying (/)
                      Apr 13 15:03:07 raspberrypi baresip[11459]: call: SIP Progress: 183 Session Progress (application/sdp)
                      Apr 13 15:03:07 raspberrypi baresip[11459]: doorio2sip@192.168.122.2: Call in-progress: sip:**610@192.168.122.2
                      Apr 13 15:03:07 raspberrypi baresip[11459]: stream: update 'audio'
                      Apr 13 15:03:07 raspberrypi baresip[11459]: audio: Set audio decoder: PCMU 8000Hz 1ch
                      Apr 13 15:03:07 raspberrypi baresip[11459]: audio: Set audio encoder: PCMU 8000Hz 1ch
                      Apr 13 15:03:07 raspberrypi baresip[11459]: audio tx pipeline:       (src) ---> PCMU#012audio rx pipeline:      (play) <--- PCMU
                      Apr 13 15:03:07 raspberrypi baresip[11459]: stream: incoming rtp for 'audio' established, receiving from 192.168.122.2:7078
                      Apr 13 15:03:37 raspberrypi baresip[11459]: call: terminate call '7920ff0b496abf86' with sip:**610@192.168.122.2
                      

                      so sieht die message bei mir aus.
                      Liegt baresip überhaupt unter /usr/local/bin ?
                      Wird baresip über apt installiert liegt es unter /usr/bin über Github unter /usr/local/bin.

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        AingTii @Wal last edited by

                        @wal

                        jup, liegt unter usr/local/bin

                        Da ich über git clone installiert habe um die aktueller Version zu erhalten.
                        die alte hat sich ständig abgemeldet, war also nicht zuverlässig

                        Vielleicht ist es ein Konfiguratiosnding, dass es ein Log erzeugt?
                        oder auch das auflegen?
                        Wobei ich mich dann frage warum es ein Unterschied ist ob manuell oder per system gestartet

                        Wal 2 Replies Last reply Reply Quote 0
                        • Wal
                          Wal Developer @AingTii last edited by Wal

                          @aingtii ,

                          #
                          # baresip configuration
                          #
                          
                          #------------------------------------------------------------------------------
                          
                          # Core
                          poll_method		epoll		# poll, select, epoll ..
                          
                          # SIP
                          sip_listen		0.0.0.0:5060
                          #sip_certificate	cert.pem
                          
                          # Call
                          call_local_timeout	20
                          call_max_calls		2
                          
                          # Audio
                          audio_path		/usr/local/share/baresip
                          #audio_player            alsa,default
                          #audio_source            alsa,default
                          #audio_alert             alsa,null
                          audio_player            pulse,noecho.sound_out
                          audio_source            pulse,noecho.mic_in
                          audio_alert             pulse,noecho.sound_out
                          #ausrc_srate		48000
                          #auplay_srate		48000
                          #ausrc_channels		0
                          #auplay_channels	0
                          #audio_txmode		poll		# poll, thread
                          audio_level		no
                          ausrc_format		s16		# s16, float, ..
                          auplay_format		s16		# s16, float, ..
                          auenc_format		s16		# s16, float, ..
                          audec_format		s16		# s16, float, ..
                          
                          # Video
                          #video_source		v4l2,/dev/video0
                          #video_display		x11,nil
                          video_size		352x288
                          video_bitrate		500000
                          video_fps		25.00
                          video_fullscreen	yes
                          videnc_format		yuv420p
                          
                          # AVT - Audio/Video Transport
                          rtp_tos			184
                          #rtp_ports		10000-20000
                          #rtp_bandwidth		512-1024 # [kbit/s]
                          rtcp_mux		no
                          jitter_buffer_delay	5-10		# frames
                          rtp_stats		no
                          #rtp_timeout		20
                          
                          # Network
                          #dns_server		10.0.0.1:53
                          #net_interface		eth0
                          
                          # BFCP
                          #bfcp_proto		udp
                          
                          #------------------------------------------------------------------------------
                          # Modules
                          
                          module_path		/usr/local/lib/baresip/modules
                          
                          # UI Modules
                          module			stdio.so
                          #module			cons.so
                          #module			evdev.so
                          #module			httpd.so
                          
                          # Audio codec Modules (in order)
                          #module			opus.so
                          #module			amr.so
                          #module			g7221.so
                          #module			g722.so
                          #module			g726.so
                          module			g711.so
                          #module			gsm.so
                          #module			l16.so
                          #module			bv32.so
                          #module			mpa.so
                          #module			codec2.so
                          #module			ilbc.so
                          #module			isac.so
                          
                          # Audio filter Modules (in encoding order)
                          #module			vumeter.so
                          #module			sndfile.so
                          #module			speex_aec.so
                          #module			speex_pp.so
                          #module			plc.so
                          
                          # Audio driver Modules
                          #module			alsa.so
                          module			pulse.so
                          #module			jack.so
                          #module			portaudio.so
                          #module			aubridge.so
                          #module			aufile.so
                          
                          # Video codec Modules (in order)
                          #module			avcodec.so
                          #module			vp8.so
                          #module			vp9.so
                          #module			h265.so
                          
                          # Video filter Modules (in encoding order)
                          #module			selfview.so
                          #module			snapshot.so
                          #module			swscale.so
                          #module			vidinfo.so
                          
                          # Video source modules
                          #module			v4l2.so
                          #module			v4l2_codec.so
                          #module			avformat.so
                          #module			x11grab.so
                          #module			cairo.so
                          #module			vidbridge.so
                          
                          # Video display modules
                          #module			directfb.so
                          #module			x11.so
                          #module			sdl2.so
                          #module			fakevideo.so
                          
                          # Audio/Video source modules
                          #module			rst.so
                          #module			gst1.so
                          #module			gst_video1.so
                          
                          # Media NAT modules
                          #module			stun.so
                          #module			turn.so
                          #module			ice.so
                          #module			natpmp.so
                          #module			pcp.so
                          
                          # Media encryption modules
                          #module			srtp.so
                          #module			dtls_srtp.so
                          #module			zrtp.so
                          
                          
                          #------------------------------------------------------------------------------
                          # Temporary Modules (loaded then unloaded)
                          
                          #module_tmp		uuid.so
                          module_tmp		account.so
                          
                          
                          #------------------------------------------------------------------------------
                          # Application Modules
                          
                          #module_app		auloop.so
                          #module_app		b2bua.so
                          #module_app		contact.so
                          module_app		debug_cmd.so
                          #module_app		dtmfio.so
                          #module_app		echo.so
                          #module_app		gtk.so
                          module_app		menu.so
                          #module_app		mwi.so
                          #module_app		presence.so
                          module_app		syslog.so
                          #module_app		mqtt.so
                          module_app		ctrl_tcp.so
                          #module_app		vidloop.so
                          
                          
                          #------------------------------------------------------------------------------
                          # Module parameters
                          
                          
                          # UI Modules parameters
                          cons_listen		0.0.0.0:5555 # cons
                          
                          http_listen		0.0.0.0:8000 # httpd - server
                          
                          ctrl_tcp_listen		0.0.0.0:4444 # ctrl_tcp
                          
                          evdev_device		/dev/input/event0
                          
                          # Opus codec parameters
                          opus_bitrate		28000 # 6000-510000
                          #opus_stereo		yes
                          #opus_sprop_stereo	yes
                          #opus_cbr		no
                          #opus_inband_fec	no
                          #opus_dtx		no
                          #opus_mirror		no
                          #opus_complexity		10
                          #opus_application		audio	# {voip,audio}
                          
                          # Opus Multistream codec parameters
                          #opus_ms_channels	2	#total channels (2 or 4)
                          #opus_ms_streams		2	#number of streams
                          #opus_ms_c_streams	2	#number of coupled streams
                          
                          vumeter_stderr		yes
                          
                          # Selfview
                          video_selfview		window # {window,pip}
                          #selfview_size		64x64
                          
                          # ICE
                          ice_turn		no
                          ice_debug		no
                          ice_nomination		regular	# {regular,aggressive}
                          ice_mode		full	# {full,lite}
                          
                          # ZRTP
                          #zrtp_hash		no  # Disable SDP zrtp-hash (not recommended)
                          
                          # Menu
                          #menu_bell		yes
                          #redial_attempts	3 # Num or <inf>
                          #redial_delay		5 # Delay in seconds
                          #ringback_disabled	yes
                          #statmode_default	off
                          
                          # avcodec
                          #avcodec_h264enc	libx264
                          #avcodec_h264dec	h264
                          
                          # h265
                          #h265_encoder		libx265
                          #h265_decoder		hevc
                          
                          # MQTT
                          #mqtt_broker_host	localhost
                          #mqtt_broker_port	1883
                          #mqtt_broker_clientid	baresip
                          #mqtt_broker_user	pi
                          #mqtt_broker_password	raspberry
                          #mqtt_basetopic		doorio
                          
                          

                          du wirst nur auf alsa umstellen müssen.

                          1 Reply Last reply Reply Quote 0
                          • Wal
                            Wal Developer @AingTii last edited by Wal

                            @aingtii sagte in Test Adapter doorio v1.1.x:

                            Wobei ich mich dann frage warum es ein Unterschied ist ob manuell oder per system gestartet

                            der Unterschied ist, das von der Konsole gestartet alle Dienste schon geladen sind und evtl. andere Rechte gesetzt sind.
                            Das Videoding würde ich erstmal weg lassen bis Audio funktioniert.

                            1 Reply Last reply Reply Quote 0
                            • M
                              M4rcus last edited by

                              Hallo zusammen!
                              Nachdem ich seit ein paar Jahren den DoorPi in Betrieb habe, möchte ich aufgrund der bekannten Einschränkungen gerne eine neue Anlage aufbauen.

                              An dieser Stelle ein herzliches Dankeschön an @Wal für die hervorragende Arbeit. Ich bin zwar Informatiker, doch teilweise sprengt das Wissen, das du hier an den Tag legst, einfach meinen Rahmen, deshalb bin ich froh, dass du das Projekt hier so vorantreibst 🙂

                              Zu meinem Problem:
                              Die Installation und Konfiguration aller Komponenten hat soweit ganz gut geklappt, und das Gegensprechen im Testaufbau funktioniert auch super. Allerdings habe ich dasselbe Problem wie @AingTii bereits geschildet hatte - baresip als Service möchte anscheinend als nicht-pi-User auf pulseaudio zugreifen, was dann in einer "connection refused" Fehlermeldung endet. Der Start von Hand als pi-User funktioniert tadellos.

                              Da ich nun seit mehreren Stunden erfolglos versucht habe, das Probelm zu lösen, wollte ich euch mal fragen, ob es in der Zwischenzeit gelöst werden konnte?
                              Was mich stutzig macht, ist die Tatsache, dass baresip, sobald ich sudo verwende, anscheinend auch nicht unter dem normalen User gestartet wird. Ich bin bisher immer davon ausgegangen, dass ein sudo die User-Rechte erweitert, aber nicht einen Wechsel auf root vollzieht... sehr seltsam. Könnt ihr mir vielleicht einen Denkanstoß geben? Gerne share ich auch Logs o.ä., aber ich wollt's im ersten Post nicht übertreiben 🙂

                              Viele Grüße,
                              Marcus

                              Thomas Braun A 2 Replies Last reply Reply Quote 0
                              • Thomas Braun
                                Thomas Braun Most Active @M4rcus last edited by Thomas Braun

                                @m4rcus sagte in Test Adapter doorio v1.1.x:

                                sudo die User-Rechte erweitert, aber nicht einen Wechsel auf root vollzieht

                                pi@chet:/opt/iobroker $ sudo whoami
                                root
                                pi@chet:/opt/iobroker $ sudo -u iobroker whoami
                                iobroker
                                pi@chet:/opt/iobroker $ whoami
                                pi
                                
                                M 1 Reply Last reply Reply Quote 0
                                • M
                                  M4rcus @Thomas Braun last edited by

                                  @thomas-braun
                                  Genau, das hatte ich dann auch festgestellt. Allerdings frage ich mich, wie @Wal dann seinen Service ans Laufen bekommen hat...

                                  Wal 1 Reply Last reply Reply Quote 0
                                  • Wal
                                    Wal Developer @M4rcus last edited by

                                    @m4rcus ,
                                    hängt die Sprechanlage an WLan oder an Lan ?
                                    Seit dem neuen RPI-OS wird Pulseaudio nicht mehr als Service gestartet, sondern startet automatisch wenn ein Programm z.B. Baresip Pulseaudio anfordert.

                                    Habe heute erst wieder DoorIO neu installiert, wir können eine Schritt für Schritt Anleitung erstellen falls du möchtest.

                                    M 1 Reply Last reply Reply Quote 0
                                    • M
                                      M4rcus @Wal last edited by

                                      @wal
                                      Momentan habe ich einen RPi3 mit PiFace2 als Testaufbau im WLAN hängen, auf dem ich nach diesem Thread hier alles konfiguriert und installiert habe. Es wäre aber auch kein Problem, ihn mit LAN zu versorgen.

                                      [...] sondern startet automatisch wenn ein Programm z.B. Baresip Pulseaudio anfordert.

                                      Ich denke, genau das wird mir dann zum Verhängnis. Ich sehe die Fehlermeldungen, sobald baresip die Pulseaudio-Adapter beim Start zu initialisieren versucht.

                                      Bei einer Schritt-für-Schritt-Anleitung wäre ich sofort dabei, aber ich habe auch fleißig jeden Schritt dokumentiert - solltest du Interesse haben, kann ich dir das Ganze zukommen lassen. 🙂

                                      Ich werde wohl heute nicht mehr online sein, aber ich denke morgen sollte ich etwas Zeit freischaufeln können.

                                      Viele Grüße!

                                      Wal 1 Reply Last reply Reply Quote 1
                                      • Wal
                                        Wal Developer @M4rcus last edited by

                                        @m4rcus ,
                                        lasse WLan mal weg und mach mal so wie ich installiert habe.
                                        Mit dem RPI-OS-Imager das Lite Image schreiben und vor dem einlegen in den RPI die Datei config.txt auf der SD-Karte bearbeiten :

                                        # turn wifi and bluetooth off
                                        dtoverlay=disable-wifi
                                        dtoverlay=disable-bt
                                        
                                        # Enable audio (loads snd_bcm2835)
                                        dtparam=audio=off
                                        

                                        das ist selbsterklärend 🙂
                                        Für Fernzugriff eine Datei ssh in boot erzeugen.
                                        SD-Karte einlegen und booten.

                                        Konsole öffnen und Befehle abarbeiten

                                        1. Password für Nutzer pi ändern
                                        2. Localisation und Timezone setzen
                                        3. Hostname setzen
                                        4. reboot aus raspi-config machen
                                        5. Pakete updaten
                                        6. benötigte Pakete installieren
                                        passwd
                                        sudo raspi-config
                                        sudo apt update
                                        sudo apt full-upgrade
                                        sudo loginctl enable-linger pi
                                        sudo apt install libspandsp-dev libasound2-dev pulseaudio libpulse-dev git mc cmake libjpeg-dev automake autoconf libtool libsamplerate0-dev libspeexdsp-dev libspeex-dev libasound2-doc python3-pip
                                        sudo reboot
                                        

                                        Soundkarte einrichten:

                                        pactl list
                                        sudo nano /etc/pulse/default.pa
                                        sudo reboot
                                        

                                        ich denke das hast du schon hinbekommen, 👍 da Baresip auf der Konsole ja läuft.

                                        alsamixer
                                        

                                        testen ob pulseaudio im alsamixer als default gesetzt ist.

                                        wget https://github.com/baresip/baresip/archive/refs/tags/v1.1.0.tar.gz
                                        wget https://github.com/baresip/re/archive/refs/tags/v2.0.1.tar.gz
                                        wget https://github.com/baresip/rem/archive/refs/tags/v1.0.0.tar.gz
                                        tar -xvzf v1.1.0.tar.gz
                                        tar -xvzf v2.0.1.tar.gz
                                        tar -xvzf v1.0.0.tar.gz
                                        cd re-*
                                        make
                                        sudo make install
                                        sudo ldconfig
                                        cd ..
                                        cd rem*
                                        sudo make install
                                        sudo ldconfig
                                        cd ..
                                        cd bare*
                                        sudo make install
                                        sudo ldconfig
                                        cd ..
                                        baresip -vvv
                                        nano .baresip/accounts
                                        nano .baresip/config
                                        

                                        baresip installieren und die configs anpassen.

                                        config genau so bitte:

                                        #
                                        # baresip configuration
                                        #
                                        
                                        #------------------------------------------------------------------------------
                                        
                                        # Core
                                        poll_method		epoll		# poll, select, epoll ..
                                        
                                        # SIP
                                        sip_listen		0.0.0.0:5060
                                        #sip_certificate	cert.pem
                                        
                                        # Call
                                        call_local_timeout	20
                                        call_max_calls		2
                                        
                                        # Audio
                                        audio_path		/usr/local/share/baresip
                                        #audio_player            alsa,default
                                        #audio_source            alsa,default
                                        #audio_alert             alsa,null
                                        audio_player            pulse,noecho.sound_out
                                        audio_source            pulse,noecho.mic_in
                                        audio_alert             pulse,noecho.sound_out
                                        #ausrc_srate		48000
                                        #auplay_srate		48000
                                        #ausrc_channels		0
                                        #auplay_channels	0
                                        #audio_txmode		poll		# poll, thread
                                        audio_level		no
                                        ausrc_format		s16		# s16, float, ..
                                        auplay_format		s16		# s16, float, ..
                                        auenc_format		s16		# s16, float, ..
                                        audec_format		s16		# s16, float, ..
                                        
                                        # Video
                                        #video_source		v4l2,/dev/video0
                                        #video_display		x11,nil
                                        video_size		352x288
                                        video_bitrate		500000
                                        video_fps		25.00
                                        video_fullscreen	yes
                                        videnc_format		yuv420p
                                        
                                        # AVT - Audio/Video Transport
                                        rtp_tos			184
                                        #rtp_ports		10000-20000
                                        #rtp_bandwidth		512-1024 # [kbit/s]
                                        rtcp_mux		no
                                        jitter_buffer_delay	5-10		# frames
                                        rtp_stats		no
                                        #rtp_timeout		20
                                        
                                        # Network
                                        #dns_server		10.0.0.1:53
                                        #net_interface		eth0
                                        
                                        # BFCP
                                        #bfcp_proto		udp
                                        
                                        #------------------------------------------------------------------------------
                                        # Modules
                                        
                                        module_path		/usr/local/lib/baresip/modules
                                        
                                        # UI Modules
                                        module			stdio.so
                                        #module			cons.so
                                        #module			evdev.so
                                        #module			httpd.so
                                        
                                        # Audio codec Modules (in order)
                                        #module			opus.so
                                        #module			amr.so
                                        #module			g7221.so
                                        #module			g722.so
                                        #module			g726.so
                                        module			g711.so
                                        #module			gsm.so
                                        #module			l16.so
                                        #module			bv32.so
                                        #module			mpa.so
                                        #module			codec2.so
                                        #module			ilbc.so
                                        #module			isac.so
                                        
                                        # Audio filter Modules (in encoding order)
                                        #module			vumeter.so
                                        #module			sndfile.so
                                        #module			speex_aec.so
                                        #module			speex_pp.so
                                        #module			plc.so
                                        
                                        # Audio driver Modules
                                        #module			alsa.so
                                        module			pulse.so
                                        #module			jack.so
                                        #module			portaudio.so
                                        #module			aubridge.so
                                        #module			aufile.so
                                        
                                        # Video codec Modules (in order)
                                        #module			avcodec.so
                                        #module			vp8.so
                                        #module			vp9.so
                                        #module			h265.so
                                        
                                        # Video filter Modules (in encoding order)
                                        #module			selfview.so
                                        #module			snapshot.so
                                        #module			swscale.so
                                        #module			vidinfo.so
                                        
                                        # Video source modules
                                        #module			v4l2.so
                                        #module			v4l2_codec.so
                                        #module			avformat.so
                                        #module			x11grab.so
                                        #module			cairo.so
                                        #module			vidbridge.so
                                        
                                        # Video display modules
                                        #module			directfb.so
                                        #module			x11.so
                                        #module			sdl2.so
                                        #module			fakevideo.so
                                        
                                        # Audio/Video source modules
                                        #module			rst.so
                                        #module			gst1.so
                                        #module			gst_video1.so
                                        
                                        # Media NAT modules
                                        #module			stun.so
                                        #module			turn.so
                                        #module			ice.so
                                        #module			natpmp.so
                                        #module			pcp.so
                                        
                                        # Media encryption modules
                                        #module			srtp.so
                                        #module			dtls_srtp.so
                                        #module			zrtp.so
                                        
                                        
                                        #------------------------------------------------------------------------------
                                        # Temporary Modules (loaded then unloaded)
                                        
                                        #module_tmp		uuid.so
                                        module_tmp		account.so
                                        
                                        
                                        #------------------------------------------------------------------------------
                                        # Application Modules
                                        
                                        #module_app		auloop.so
                                        #module_app		b2bua.so
                                        #module_app		contact.so
                                        module_app		debug_cmd.so
                                        #module_app		dtmfio.so
                                        #module_app		echo.so
                                        #module_app		gtk.so
                                        module_app		menu.so
                                        #module_app		mwi.so
                                        #module_app		presence.so
                                        module_app		syslog.so
                                        #module_app		mqtt.so
                                        module_app		ctrl_tcp.so
                                        #module_app		vidloop.so
                                        
                                        
                                        #------------------------------------------------------------------------------
                                        # Module parameters
                                        
                                        
                                        # UI Modules parameters
                                        cons_listen		0.0.0.0:5555 # cons
                                        
                                        http_listen		0.0.0.0:8000 # httpd - server
                                        
                                        ctrl_tcp_listen		0.0.0.0:4444 # ctrl_tcp
                                        
                                        evdev_device		/dev/input/event0
                                        
                                        # Opus codec parameters
                                        opus_bitrate		28000 # 6000-510000
                                        #opus_stereo		yes
                                        #opus_sprop_stereo	yes
                                        #opus_cbr		no
                                        #opus_inband_fec	no
                                        #opus_dtx		no
                                        #opus_mirror		no
                                        #opus_complexity		10
                                        #opus_application		audio	# {voip,audio}
                                        
                                        # Opus Multistream codec parameters
                                        #opus_ms_channels	2	#total channels (2 or 4)
                                        #opus_ms_streams		2	#number of streams
                                        #opus_ms_c_streams	2	#number of coupled streams
                                        
                                        vumeter_stderr		yes
                                        
                                        # Selfview
                                        video_selfview		window # {window,pip}
                                        #selfview_size		64x64
                                        
                                        # ICE
                                        ice_turn		no
                                        ice_debug		no
                                        ice_nomination		regular	# {regular,aggressive}
                                        ice_mode		full	# {full,lite}
                                        
                                        # ZRTP
                                        #zrtp_hash		no  # Disable SDP zrtp-hash (not recommended)
                                        
                                        # Menu
                                        #menu_bell		yes
                                        #redial_attempts	3 # Num or <inf>
                                        #redial_delay		5 # Delay in seconds
                                        #ringback_disabled	yes
                                        #statmode_default	off
                                        
                                        # avcodec
                                        #avcodec_h264enc	libx264
                                        #avcodec_h264dec	h264
                                        
                                        # h265
                                        #h265_encoder		libx265
                                        #h265_decoder		hevc
                                        
                                        # MQTT
                                        #mqtt_broker_host	localhost
                                        #mqtt_broker_port	1883
                                        #mqtt_broker_clientid	baresip
                                        #mqtt_broker_user	pi
                                        #mqtt_broker_password	raspberry
                                        #mqtt_basetopic		doorio
                                        

                                        testen ob baresip so läuft:

                                        baresip -vvv
                                        

                                        Autostart als User einrichten:

                                        mkdir -p ~/.config/systemd/user/
                                        nano ~/.config/systemd/user/baresip.service
                                        

                                        das einfügen:

                                        [Unit]
                                        Description=baresip
                                        
                                        [Service]
                                        ExecStart=/usr/local/bin/baresip -4 -f /home/pi/.baresip
                                        
                                        [Install]
                                        WantedBy=default.target
                                        

                                        aktivieren und reboot:

                                        systemctl --user daemon-reload
                                        systemctl --user enable baresip.service
                                        sudo reboot
                                        

                                        bitte die configs und Befehle erst einmal so lassen.
                                        das wars.

                                        A 2 Replies Last reply Reply Quote 1
                                        • A
                                          AingTii @M4rcus last edited by

                                          @m4rcus

                                          Also ich habe es so nicht hinbekommen, leider ist der baresip Support nicht so princkelnd, auch bezüglich installation usw.
                                          obwohl anscheinend dran entwickelt wird.

                                          Ich habe das Problem so nicht lösen können, dass beim autostart von baresip der Anruf bei annahme gleich wieder aufgelegt wurde.
                                          Da ich eh Alles mit NodeRed steuere habe ich dort beim start von NodeRed eingebaut danach per consolenbefehl
                                          baresip zu starten.

                                          Allgemein bin ich noch nicht zufrieden damit, wenn ich eine Mobilnummer anrufe, dauert es mir zu lange,
                                          ist aber ja allgemein so bis es klingelt, ich denke mal viel vor allem Paketboten sind dann schon weg.
                                          Ich habe mir daher eine Voip nummer angelegt, das geht schon mal schneller.

                                          Da fehlt mir noch das Videobild von der Tür.
                                          Da bin ich mir nicht sicher, ob es Baresip unterstützt und der voip Anbieter auch.

                                          Ich bin echt am überlegen, ob man da nicht ein komplettes gemeinsames Projekt draus machen kann,
                                          auf der einen Seite der Rapi mit einer Software, die Audio/Video streamt und auch ein Klingelsignal gibt
                                          und auf der anderen Seite eine App die zumindest auf Knopfdruck Audio streamt und das Klingelsignal aufnimmt
                                          und auf dem Smartphone signalisiert.
                                          Aber ich habe noch nichts das richtig gefunden.
                                          Normal würde man sagen das kann doch nicht so schwer sein, aber man findet fast nichts...
                                          Außer fertige teure Lösungen.

                                          Gehört hier aber ja auch nicht wirklich her.

                                          Gruß
                                          Jens

                                          1 Reply Last reply Reply Quote 0
                                          • A
                                            AingTii @Wal last edited by

                                            @wal

                                            Vielleicht probiere ich das auch nach Deiner Anleitung mal komplett durch ob das Problem dann weg ist.
                                            Sieht auf jeden Fall gut aus und detaillierter!

                                            Ich gebe Rückmeldung

                                            Danke
                                            Gruß Jens

                                            Wal 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            801
                                            Online

                                            31.8k
                                            Users

                                            79.9k
                                            Topics

                                            1.3m
                                            Posts

                                            door intercom doorpi türsprechstelle
                                            34
                                            583
                                            121117
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo