• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Rpi VLC

General Discussion
raspberry pi vlc google home hub chromecast
2
5
2.3k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B
    Belleye
    last edited by Russ Jun 26, 2019, 11:35 PM Dec 31, 2018, 5:53 AM

    Hi All,

    I'm attempting to push a Raspberry Pi VLC video stream to my google home hub.
    test.sh
    #!/bin/bash
    a="$(date)"
    p="/home/pi/tmp/Script_ran_$(date +%F_%R).txt"
    echo $a >> $p
    timeout 60 cvlc /home/pi/Desktop/test.mp4 --sout '#chromecast' --sout-chromecast-ip=192.168.0.10 --demux-filter=demux_chromecast

    Commands.json
    {"trigger":"Video background","command":"/home/pi/tmp/test.sh","ground":"background","voice":"video background",allowParams":"false"},

    Running test.sh writes the file and pushes the video to the google home hub.
    TRIGGERcmd writes the text file but does not start the video 😞

    Any help would be greatly appreicated.

    Raspberry Pi 3, Raspbian Stretch with desktop (Nov 2018)

    R 1 Reply Last reply Dec 31, 2018, 6:08 PM Reply Quote 0
    • R
      Russ @Belleye
      last edited by Russ Jan 1, 2019, 12:20 AM Dec 31, 2018, 6:08 PM

      @belleye, that's pretty cool. I didn't know you could do that.

      I think you're probably trying to run cvlc as root because when you run background commands on a Pi, they run as root.

      root@pi:~# cvlc
      VLC is not supposed to be run as root. Sorry.
      If you need to use real-time priorities and/or privileged TCP ports
      you can use /usr/bin/vlc-wrapper (make sure it is Set-UID root and
      cannot be run by non-trusted users first).
      

      You can be root and run something as the pi user like this:

      root@pi:~# sudo -u pi cvlc
      VLC media player 3.0.3 Vetinari (revision 3.0.3-1-0-gc2bb759264)
      [00d0b048] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
      [00d247e8] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
      [00d247e8] main interface error: no suitable interface module
      [00cb2938] main libvlc error: interface "dbus,none" initialization failed
      [00d2fd80] main interface error: no suitable interface module
      [00cb2938] main libvlc error: interface "globalhotkeys,none" initialization failed
      [00d2fde8] dummy interface: using the dummy interface module...
      [00d196e8] main playlist: playlist is empty
      

      Also, I like the tags. I think you're the first person who's used them.

      Russell VanderMey

      B 1 Reply Last reply Jan 1, 2019, 10:14 AM Reply Quote 0
      • B
        Belleye @Russ
        last edited by Jan 1, 2019, 10:14 AM

        @russ, Thanks that sorted it. The MP4 was only to simplify things, the real power comes from linking to a IP camera.

        driveway.sh
        sudo -u pi timeout 60 cvlc rtsp://192.168.0.11:554/user=xxxxx_password=xxxxx_channel=1_stream=0.sdp?real_stream --sout '#chromecast' --sout-chromecast-ip=192.168.0.10 --demux-filter=demux_chromecast

        Now I don't need a nest camera 🙂

        One last piece in the puzzle, can I share my triggercmd account with my wife's google account? Or do I need 2 RPIs?

        I can execute the script from google home, but my wife can't use the service due to not having a triggercmd account.

        R 1 Reply Last reply Jan 1, 2019, 7:50 PM Reply Quote 0
        • R
          Russ @Belleye
          last edited by Russ Jan 1, 2019, 7:53 PM Jan 1, 2019, 7:50 PM

          @belleye, you're probably using Voice Match, so Google Home uses a different Google account depending on who's talking. The issue is you can only have one Google account linked to a TRIGGERcmd account. If you link a second account, it invalidates the previous account's link.

          This issue came up before and the best solution seemed to be to use IFTTT like this:

          Her Google account triggers an IFTTT recipe with Google Assistant on THIS side, and a Webhook on THAT side, which triggers the command with your TRIGGERcmd token.

          Russell VanderMey

          B 1 Reply Last reply Jan 2, 2019, 6:05 AM Reply Quote 0
          • B
            Belleye @Russ
            last edited by Jan 2, 2019, 6:05 AM

            @russ Thanks I'm away for a week or more, I'll have a crack when I get back.

            1 Reply Last reply Reply Quote 0
            1 out of 5
            • First post
              1/5
              Last post