Announcement

Collapse
No announcement yet.

Can't get functional scripts to run from HS3

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

    Can't get functional scripts to run from HS3

    I have created a few scripts that all do the same thing. All of these scripts are simply turning a projector on or off.

    Two leverage telnet:
    One is a batch file that calls a VBS for input.
    One is a VBS that takes care of everything in the VBS file itself.

    One leverages PJLINK:
    This one is a prebuilt Python script/binary that I downloaded.

    All of these scripts work great when running them manually from a logged in session of the Windows 10 HS3 machine. None of them work when trying to call them from HS3 through automation or manual initiation in the web interface.

    There are no errors in the logs, just says it ran it, but it does nothing. I suspect it is something to do with paths, or the fact that there is no logged in user, but I really don't know. Looking for any help I can get here.

    The Python script is the preferred method if I can make that one work from HS3. So let's focus on that one first. Python was installed as the same user that runs HS3 and was also installed for all users. Python was added to the path during install. Again, this works perfectly when calling it manually.

    Here is what that CLI looks like and how I currently have it configured in HS3:

    &"C:\Program Files\Python36\Scripts\pjlink.exe -p 172.20.10.56 power on"

    That would turn the projector on and does if I run it manually from the CLI even without a full path for the EXE.

    Attached is a screenshot of how I have it configured in HS3. I have tried it with and without the full path.

    I grabbed this Python code from https://pypi.python.org/pypi/pypjlink.

    Any ideas why I can't get this to work? I can post the telnet scripts as well, but would prefer to use PJLINK.

    Windows 10 OS
    HS3 3.0.0.368

    Thanks for any guidance!
    -Landon
    Attached Files

    #2
    Originally posted by harshl View Post
    I have created a few scripts that all do the same thing. All of these scripts are simply turning a projector on or off.

    Two leverage telnet:
    One is a batch file that calls a VBS for input.
    One is a VBS that takes care of everything in the VBS file itself.

    One leverages PJLINK:
    This one is a prebuilt Python script/binary that I downloaded.

    All of these scripts work great when running them manually from a logged in session of the Windows 10 HS3 machine. None of them work when trying to call them from HS3 through automation or manual initiation in the web interface.

    There are no errors in the logs, just says it ran it, but it does nothing. I suspect it is something to do with paths, or the fact that there is no logged in user, but I really don't know. Looking for any help I can get here.

    The Python script is the preferred method if I can make that one work from HS3. So let's focus on that one first. Python was installed as the same user that runs HS3 and was also installed for all users. Python was added to the path during install. Again, this works perfectly when calling it manually.

    Here is what that CLI looks like and how I currently have it configured in HS3:

    &"C:\Program Files\Python36\Scripts\pjlink.exe -p 172.20.10.56 power on"

    That would turn the projector on and does if I run it manually from the CLI even without a full path for the EXE.

    Attached is a screenshot of how I have it configured in HS3. I have tried it with and without the full path.

    I grabbed this Python code from https://pypi.python.org/pypi/pypjlink.

    Any ideas why I can't get this to work? I can post the telnet scripts as well, but would prefer to use PJLINK.

    Windows 10 OS
    HS3 3.0.0.368

    Thanks for any guidance!
    -Landon
    As far as HomeSeer is concerned, you are running an executable "C:\Program Files\Python36\Scripts\pjlink.exe". Try changing your action to "Run another program or process". Browse to the program "C:\Program Files\Python36\Scripts\pjlink.exe" to launch with the parameters "-p 172.20.10.56 power on" in the second box..
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      Originally posted by rprade View Post
      As far as HomeSeer is concerned, you are running an executable "C:\Program Files\Python36\Scripts\pjlink.exe". Try changing your action to "Run another program or process". Browse to the program "C:\Program Files\Python36\Scripts\pjlink.exe" to launch with the parameters "-p 172.20.10.56 power on" in the second box..
      Your absolutely right... I got going to fast I guess and lost logic there with all the changes I was making and trying.

      I have since changed it to call an external program with the arguments and everything is working great!

      Thanks for pushing me in the right direction!

      Attached is the working syntax to power on in case anyone cares down the road, super simple.

      -Landon
      Attached Files

      Comment

      Working...
      X