Announcement

Collapse
No announcement yet.

How do I run a linux command line or .sh file from an event

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do I run a linux command line or .sh file from an event

    I want to create snapshot jpg from an rtsp feed using the command below. How do I do that with an event?

    Code:
    ffmpeg -ss 2 -i rtsp://10.0.1.3:7447/R0g4Xxxxxxxxxxx -y -f image2 -q:v 0 -frames 1 /usr/local/HomeSeer/html/camera/snap3.jpg
    HS3 SEL running Pro Edition 3.0.0.531 on Ubuntu 18.04, mono 5.20, 656 devices, 209 events.
    Plug-Ins: Chromecast, Device History, EasyTrigger, Ecobee, JowiHue, LutronCaseta, MeiUnifi, PHLocation2, Pushover 3P, SDJ-Health, Sonos, WeatherFlow, weatherXML
    Scripts: SparkMan's Lock Event, 5 of Jon00 scripts.

    #2
    Here are a couple of ways that should work

    (1) Set the program run to /usr/bin/ffmpeg and command parameters to
    Code:
    -ss 2 -i rtsp://10.0.1.3:7447/R0g4Xxxxxxxxxxx -y -f image2 -q:v 0 -frames 1 /usr/local/HomeSeer/html/camera/snap3.jpg
    (2) Set the program to run to /bin/sh or /bin/bash, then set the command parameters to

    Code:
    -c "ffmpeg -ss 2 -i rtsp://10.0.1.3:7447/R0g4Xxxxxxxxxxx -y -f image2 -q:v 0 -frames 1 /usr/local/HomeSeer/html/camera/snap3.jpg"

    Comment


      #3
      Works great, Thanks!
      HS3 SEL running Pro Edition 3.0.0.531 on Ubuntu 18.04, mono 5.20, 656 devices, 209 events.
      Plug-Ins: Chromecast, Device History, EasyTrigger, Ecobee, JowiHue, LutronCaseta, MeiUnifi, PHLocation2, Pushover 3P, SDJ-Health, Sonos, WeatherFlow, weatherXML
      Scripts: SparkMan's Lock Event, 5 of Jon00 scripts.

      Comment

      Working...
      X