Kamera - Bild bei Anruf oder Event auf Raspberry 7" Touchscreen anzeigen

  • Hi, ich habe doorpi am laufen und die Elcom-App funktioniert auch.
    Jetzt möchte ich neben der Türe im Innenbereich das 7" Touchdisplay von Raspi montieren,
    dies an den Pi anschliessen, wo doorpi drauf läuft und
    das Kamerabild auf Vollbild ausgeben ,
    wenn es klingelt, oder bei Knopfdruck , bzw. Touch.


    Ich habe schon zich Aktionen versucht, aber
    Ich konnte noch kein Bild ohne den Streamer erzeugen.
    Und von Doorpi1 zu Doorpi1 streamen ??


    Wie bekomm ich das Bild aufs Display?


    Hat jemand ne Idee?

  • Hi Korky2, ich habe den streamer laut doorpi Grundinstallation eingerichtet.


    Ich kann den stream auch auf dem PC mit : http://192.168.0.XX:8080/?action=stream aufrufen.


    Über die Elcom App empfange ich den Stream auch.


    Hier ein Ausschnitt meiner doorpi.ini



    [DoorPi]
    base_path = /usr/local/etc/DoorPi
    eventlog = !BASEPATH!/conf/eventlog.db
    is_alive_led = blinking_led
    last_snapshot =



    [DoorPiWeb]
    indexfile = index.html
    ip =
    loginfile = login.html
    online_fallback = http://motom001.github.io/DoorPiWeb
    port = 80
    public = AREA_public
    www = !BASEPATH!/../DoorPiWeb


    [EVENT_OnStartup]
    10 = sleep:1


    [AdminNumbers]


    **620 = active
    **622 = active
    **623 = active
    **1 = active
    **2 = active


    [SIP-Phone]
    firewallpolicy = PolicyNoFirewall
    audio_codecs = PCMA,PCMU
    call_timeout = 10
    capture_device = ALSA: USB PnP Sound Device
    dialtone = !BASEPATH!/media/ShortDialTone.wav
    dialtone_renew_every_start = False
    dialtone_volume = 35
    echo_cancellation_enabled = True
    identity = DoorPi
    local_port = 5060
    max_call_time = 120
    playback_device = ALSA: USB PnP Sound Device
    record_while_dialing = False
    records = !BASEPATH!/records/%Y-%m-%d_%H-%M-%S.wav



    sipphonetyp = linphone
    sipserver_password = 081567365
    sipserver_realm = fritz.box
    sipserver_server = 192.168.0.1
    sipserver_username = 620620620
    stun_server =
    ua.max_calls = 2
    video_codecs = VP8
    video_device = StaticImage: Static picture
    video_display_enabled = False
    video_size = vga

  • hier ein Ausschnitt aus der datei mjpg_streamer:


    -i | --input "<input-plugin.so> [parameters]"
    -o | --output "<output-plugin.so> [parameters]"
    [-h | --help ]........: display this help
    [-v | --version ].....: display version information
    [-b | --background]...: fork to the background, daemon mode
    ^@^@^@Example #1:
    To open an UVC webcam "/dev/video1" and stream it via HTTP:
    %s -i "input_uvc.so -d /dev/video1" -o "output_http.so"
    ^@Example #2:
    To open an UVC webcam and stream via HTTP port 8090:
    %s -i "input_uvc.so" -o "output_http.so -p 8090"
    ^@^@^@Example #3:
    To get help for a certain input plugin:
    %s -i "input_uvc.so --help"
    ^@In case the modules (=plugins) can not be found:
    * Set the default search path for the modules with:
    export LD_LIBRARY_PATH=/path/to/plugins,
    * or put the plugins into the "/lib/" or "/usr/lib" folder,
    * or instead of just providing the plugin file name, use a complete
    path and filename:
    %s -i "/path/to/modules/input_uvc.so"
    ^@ERROR: too many arguments to input plugin
    ^@^@ i: ^@^@^@^@output_http.so --port 8080^@^@MJPG Streamer Version: %s
    Compilation Date.....: %s
    Compilation Time.....: %s
    ^@^@3:172^@^@^@Nov 28 2017^@12:43:06^@^@^@^@MJPG-streamer ^@^@starting applicat$
    ^@^@MJPG Streamer Version: svn rev: %s
    ^@could not initialize mutex variable
    ^@^@^@^@could not initialize condition variable
    ^@^@^@^@ERROR: could not find input plugin
    ^@ Perhaps you want to adjust the search path with:
    ^@^@^@^@ # export LD_LIBRARY_PATH=/path/to/plugin/folder
    ^@ dlopen: %s

  • Danke Korky2, das habe ich realisiert.
    Allerdings hätte ich gerne per doorpi , bzw. per piface die Hintergrundbeleuchtung geschalten.
    z.B. 1 Tastendruck und das Bild ist für 20s an.


    Habe diese Befehle zum an und ausschalten der Hintergrundbel. gefunden:


    echo 0 > /sys/class/backlight/rpi_backlight/bl_power
    echo 1 > /sys/class/backlight/rpi_backlight/bl_power


    Diese funktionieren zwar, allerdings nur als admin, d.h. sudo reicht hier nicht,
    ich muss mich vorher mit sudo su anmelden.


    Möchte diese Befehle aber in Doorpi ausführen.
    ???

  • Die Befehle an sich funktionieren super!


    Habe hier mal eine Tasterabfrage über Piface verfasst:


    import pifacedigitalio as pfio
    pfio.init()


    while True:
    if pfio.digital_read(2) == 1:
    sudo bash -c "echo 0 > /sys/class/backlight/rpi_backlight/bl_power"


    else:
    sudo bash -c "echo 1 > /sys/class/backlight/rpi_backlight/bl_power"



    Aber wenn ich die Datei testen will, bekomme ich


    pi@doorpi:~ $ sudo python touch_display_switch.py
    File "touch_display_switch.py", line 9
    sudo bash -c "echo 0 > /sys/class/backlight/rpi_backlight/bl_power"
    ^
    SyntaxError: invalid syntax


    ??

  • oder auch:


    SyntaxError: invalid syntax
    >>> sudo sh -c 'echo "1" > /sys/class/backlight/rpi_backlight/bl_power'
    File "<stdin>", line 1
    sudo sh -c 'echo "1" > /sys/class/backlight/rpi_backlight/bl_power'
    ^
    SyntaxError: invalid syntax


    Wie kann ich dem Problem mit sh aus dem Weg gehen?