Jump to content
C4 Forums | Control4

walterlara

c4Forums Member
  • Posts

    14
  • Joined

  • Last visited

Posts posted by walterlara

  1. Here is a PHP file I created to help in converting a tcp request to run ssh command on a computer or other device.  

    <?php
    $connection = ssh2_connect($_GET['ip'], 22);
    ssh2_auth_password($connection, $_GET['user'], $_GET['pass']);
    $stream = ssh2_exec($connection, $_GET['cmd']);
    ?>

    I have it running on my Synology's Web Station app with SSH2 PHP extension enabled.

    Type the URL of the hosted file , for this example I'll use cmd.php as the filename and include example parameters for IP, USER, PASS, and the CMD.

    Ex: http://192.168.1.2/cmd.php?ip=192.168.1.3&user=username&pass=password&cmd=say hello this is a test

    Open a web browser (like chrome) and paste this in so you can test if the command worked properly and if it did.

    http://192.168.1.2/cmd.php?ip=192.168.1.3&user=username&pass=password&cmd=say%20hello%20this%20is%20a%20test

    copy this encoded url from chrome's address bar and put this in the TCP driver in control4. 

    synology settings.jpg

  2. I was able to get my mac controlled by creating a PHP file that would grab variables from an HTTP POST request (using chowmain's driver). Hosting it with my synology and enabling ssh2 php module. You can even use it to reboot servers or anything else that you could otherwise do via terminal. 

     

    HTTP URL example (will open google.com in default browser):

    <your webhost>/cmd.php?ip=<ip of controlled computer>&user=<remotely controlled computer's username>&pass=<password>&cmd=open%20google.com

    The commands need to get encoded, which can easily be done by typing the entire command normally into chrome and having it encode it for you, then copy and paste that into the chowmain tcp event driver.

     

    PHP file (cmd.php):

    <?php
    $connection = ssh2_connect($_GET['ip'], 22);
    ssh2_auth_password($connection, $_GET['user'], $_GET['pass']);
    $stream = ssh2_exec($connection, $_GET['cmd']);
    ?>

  3. @alanchow Not sure if this was asked before, but would it be possible to make this driver cache requests, and store wav files with a filename that matches the words that will be spoken. If wav exists play from local location only. If it does not, retrieve it from the net then store this newly added wav?  Feel that would get us faster announcements and allow for it to work even offline.  Just a thought, appreciate all your drivers. Thanks. 

  4. Thanks. Please submit a ticket to the Houselogix Support page.  Please include a copy of the lua debug output.  You may need to provide remote access to your system for troubleshooting.

     

    Hey Alan, got in contact with them but they were not able to help me.  It seems kodi is unable to import videos if no cover art exists online.  Would it be possible in a future update to have a generic cover art for movies that are not found so they are at least able to import? Or a manual way to import them via the media tab new media button?  Thank you for all your help and sorry for my persistence. 

     

    Some use cases for this.

     

    Client's Family Videos, provide them an easy way in control4 to view them

    Business' wanting to show a client a specific product video on the tv's, could even be triggered by sensors

    Control4 Dealer Demo, show specific, or custom control4 video showcasing the system

  5. Unfortunately locally stored thumbnails are not supported. In order to resolve an issue where KODI's massive cover art sizes big down director and eventually crash of (recluse av's driver had this problem) we had to leverage online cloud image resizing. To do this we send the cloud resizer the URL of the image scrapped by the scrapper (usually TMDB if left as default) and it returns a nice resized image which we import nicely.

     

    I'm not referring to the thumbnails, I would just like the ability to select it, regardless of what thumbnail it has and have it play from the control4 interface. 

    gtA7w.jpg

     

    Notice how my overview video is missing?  Do I have some data that doesn't jive with the driver, or control4's media importer?  Thank for the input. 

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.