Announcement

Collapse
No announcement yet.

Controling/watching a windows pc from hs3 Linux

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

  • Controling/watching a windows pc from hs3 Linux

    Hi,

    I found this app , wich work from mqtt: https://github.com/KjetilSv/Win10As

    Anyone know a reliable way to control a windows computer from hs3 *LINUX*?

    For now i am able to hibernate and wol the pc from a ssh script .

    I didn't try the function to monitor the windows application with the app I linked... but i would really like to be able to open any windows program i want from my hs3 machine.
    Would also like to be able to send any cmd i want remotly * shutting down, rebooting, etc work via ssh... but it can't remotly open anything on the distant pc.


    let me know if this is not clear.

    thank you.

  • #2
    not sure if the app i linked is really able to send a custum command.

    i tried : MYpc/Chrome=1 in a hs3 event

    and ''start chrome'' in the commandtext column of the windows app

    Comment


    • #3
      look into this.

      Comment


      • #4
        I think this only works on a Windows hs3 installation?

        Comment


        • #5
          I think this only works on a Windows hs3 installation

          Jon00 Network Monitoring / management plugin only works in Windows.

          BLLan works in Linux but doesn't remote control Windows PCs or Linux PCs. I have not checked out Ultra's plugin.

          Thinking you can remote Windows computers in Linux using Python or Bash scripts. Never have looked at this.

          Here is a one liner to shut down a Windows PC from a Linux terminal prompt.

          You have to have installed Samba on Linux computer.

          Latest Windows 10 update (Redstone?) shuts off most of the Samba features due to security.

          IE: updated home office desktop Windows 10 and now cannot see my home network devices....then I undid many security changes in newest Windows 10 update and now can see my network devices.

          net rpc shutdown -I IPADDRESS -U USERNAME%PASSWORD
          - Pete

          Auto mator
          Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
          Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

          X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

          Comment


          • #6
            Thank i will try with powershell.

            For now i am stuck at the wsman configuration on Linux.

            Comment


            • #7
              It worked fine with : https://github.com/mghaan/winthing

              But just got the idea to use/ install node red ( with the exec node ) on the windows computer.

              I can notice this is working faster. Send command dynamically via mqtt ( see the simple flow ) ! And i can push anything I want from the windows pc to linux-hs3 via the json http get calls.


              I did first run node red as a service. But was not able to open any program on my Windows pc like that from the exec node.

              The solution was to use a windows task to open Node-red at boot. See here : https://discourse.nodered.org/t/wind...oreground/5345


              the Problem with this solution is, that the server isn't hidden anymore.

              i want an hidden server that execute visible programs.

              edit.: Solved

              Solved it with an vbs program.

              runHidden.vbs
              Set Shell = CreateObject("WScript.Shell") Shell.CurrentDirectory = "D:\Users\USERNAME\.node-red" Shell.Run "D:\Users\USERNAME\AppData\Roaming\npm\node-red.cmd -u D:\Users\USERNAME\.node-red > D:\Users\USERNAME\.node-red\service.log", 0, False
              And add this vbs to the Task Sheduler.Set The Task to run as a User (not SYSTEM) and Run only if the User is logged in.

              Node red flow :

              Code:
              [{"id":"4f8581ae.8992b","type":"tab","label":"Cmd","disabled":false,"info":""},{"id":"74a581ed.e2587","type":"mqtt in","z":"4f8581ae.8992b","name":"","topic":"TourSalon/cmd","qos":"0","datatype":"utf8","broker":"a057b24b.8f38d","x":135.5,"y":213,"wires":[["e4d2aa8c.fe9368"]]},{"id":"f6cfeb9c.787528","type":"mosca in","z":"4f8581ae.8992b","mqtt_port":9999,"mqtt_ws_port":9999,"name":"","username":"xxxxxxxxx","password":"xxxxxxxx","dburl":"","x":131.5,"y":371,"wires":[[]]},{"id":"e4d2aa8c.fe9368","type":"exec","z":"4f8581ae.8992b","command":"","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":395.5,"y":218.83335399627686,"wires":[[],[],[]]},{"id":"a057b24b.8f38d","type":"mqtt-broker","z":"","name":"","broker":"127.0.0.1","port":"9999","clientid":"9999","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
              Attached Files

              Comment

              Working...
              X