Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: ph_run1() - Revisted Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: September 07 2021 at 14:44 | IP Logged Quote smarty

What can I say, but I love the new PH version 2.2 (and the new commands).

I am doing some cleanup on my production machine (my daily cloud back up). Presently I backup to "BOX"
with:

ph_run("curl -u username:password -T Q:\PH-Backup\pwrhome" + ph_replaceall(string(date(today())),"/","-")+".bak" +" https://dav.box.com/dav/PH_backups/pwrhome" + ph_replaceall(string(date(today())),"/","-")+".bak")

After a short wait (10 seconds), I pull a copy of the file back down from BOX with this:

ph_run("curl -u username:password https://dav.box.com/dav/PH_backups/pwrhome" +
ph_replaceall(string(date(today())),"/","-") + ".bak --output c:\pwrhome" + ph_replaceall(string(date(today())),"/","-")+".bak")

And then I check to see if the file size looks proper (to know I had a good transfer upto BOX with this:

if(ph_fileexists("C:\pwrhome" + ph_replaceall(string(date(today())),"/","-") + ".bak")=1 AND ph_filelength("C:\pwrhome" +
ph_replaceall(string(date(today())),"/","-") + ".bak")>4000000 ,ph_usermessage("BOX Cloud BackUp OK"),ph_usermessage("BOX Cloud BackUp NOT OK"))

..............
My question is regarding the new ph_run1() command that I have asked about before here:

For the life of me, I am trying to get the "cURL" command not to pop the command window onto the screen. Any pointers using the new ph_run1() command?


Edited by smarty - September 07 2021 at 14:56


__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: September 09 2021 at 21:32 | IP Logged Quote dhoward

Steve,

The following worked for me and did not pop up a command window:

ph_run1("C:\download\test\curl-7.78.0-win64-mingw\bin\curl.e xe","-o c:\download\test\curltest.htm www.power-home.com","",0,8)

Hope this helps,

Dave.


Edited by dhoward - September 09 2021 at 21:32
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: September 10 2021 at 13:43 | IP Logged Quote smarty

Thanks Dave, I will give this more study.

Update - To make this work, I needed to follow the help instructions :)   See below:

ph_run1("app path", "app cmd line options","",0,8)

ph_run1("C:\cURL\cURL.exe","-u user:password -T path\filename https://dav.box.com/dav/outputpathfilename","",0,8)

Edited by smarty - September 12 2021 at 11:43


__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: December 23 2021 at 17:29 | IP Logged Quote BeachBum

Just curious.. Got something for the Premium ROKU

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: January 11 2022 at 21:01 | IP Logged Quote smarty

Nothing from me....

I have ditched my Roku and I am now ALL IN on my Amazon
Fire TV's.... I find that I can interact (less propriety)
that the android TV that FTV's run) with them more.

__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum