crclayton / custom-cortana-commands-template

This is a template for how to register custom Cortana commands on Windows 10.
85 stars 56 forks source link

cant use ssh #5

Closed IIIdefconIII closed 7 years ago

IIIdefconIII commented 7 years ago
        { "WallLightsOff", (Action)(async () => {
                    using (var client = new SshClient("10.19.1.7", "iiidefconiii", "******"))
        {
            client.Connect();
            client.RunCommand("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl ******@gmail.com ****** 10.19.1.8  issue_device_command 42458302 'Light6'");
            client.Disconnect();
        }
        })},

    };

it does compile and says ok turning the wall lights off, but nothing happens

<Command Name="WallLightsOff">
  <Example> Wall Lights Off </Example>
  <ListenFor> Wall Lights Off </ListenFor>
  <Feedback> Turning off the Wall Lights</Feedback>
  <Navigate/>
</Command>
IIIdefconIII commented 7 years ago

i dont think this is possible in youre script, openssh i have spend almost a week on it on all time i had free and couldnt inplent it without errors

IIIdefconIII commented 7 years ago

any response?

IIIdefconIII commented 7 years ago

what about yeah if you now how it works i will implent it, 30 days ago still no respone

crclayton commented 7 years ago

The repository is to create custom cortana responses, not to figure out how to turn off your lights. Your command compiles and executes, you just need to debug your ssh. Your issue isn't in the scope of what I have time or interest in solving for you.

IIIdefconIII commented 7 years ago

then dont make promises

crclayton commented 7 years ago

Such as...?

IIIdefconIII commented 7 years ago

in closed ticket 3 you said when i get the script working with ssh net you would implent ssh net for easy use... so it took me (non dev) ages to get it work and i quote

"I haven't looked into it much further, but if you get it working then post it back here and I'll include SSH as one of the examples in the template. Good luck!"

crclayton commented 7 years ago

Do you have a working example for me to include in the template?

IIIdefconIII commented 7 years ago

this is what is working in my script

private void button6_Click_1(object sender, EventArgs e)

{ using (var client = new SshClient("10.19.1.7", "username", "pwd")) { client.Connect(); client.RunCommand("/home/iiidefconiii/HarmonyHubControl/HarmonyHubControl @gmail.com 10.19.1.8 issue_device_command 42458302 'Light6'"); client.Disconnect(); } }