Author Topic: Command to control the Power Switch from SSH shell on Vera?  (Read 259 times)

Offline getvera2u

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
I SSH into shell of Vera Edge. Question: what command shall I type to switch this Power Switch ON or OFF?

Device is this:
https://products.z-wavealliance.org/products/673).

In devices it shows up "iPlugEnergy".
In Settings is shows up as device #3.
In Advanced there are plenty of Params and Variables, I will specify if its needed to make the command.


Cheers.

P.S. Where to find a clear guide how to use commands with VeraEdge???

Offline jswim788

  • Hero Member
  • *****
  • Posts: 787
  • Karma: +57/-2
Re: Command to control the Power Switch from SSH shell on Vera?
« Reply #1 on: June 20, 2018, 11:35:27 am »
If you really want to run a command from ssh, you could probably run curl with a command such as the one below (customize for your use).
Code: [Select]
http://vera_ip_address:3480/data_request?id=action&output_format=xml&DeviceNum=6&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0But why do you want to do this from the shell?

Offline getvera2u

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Command to control the Power Switch from SSH shell on Vera?
« Reply #2 on: June 21, 2018, 04:57:22 am »
Hi thanks for prompt answer. I want one-click-make-it-work functionality, one click on an icon from the Android's desktop. I am just tired of Vera app loading for 20-30 seconds every time I open it.

Your suggestion is awesome! I don't even need to ssh into Vera from an Android. I just ssh into my home Network with Dynamic port forwarding (already done).

Where do I find the resources to learn how to modify your code to suit my function?

Cheers.

Offline jswim788

  • Hero Member
  • *****
  • Posts: 787
  • Karma: +57/-2
Re: Command to control the Power Switch from SSH shell on Vera?
« Reply #3 on: June 21, 2018, 12:26:51 pm »
The actions are documented on this page: http://wiki.micasaverde.com/index.php/Luup_Requests#action

You'll want to set the correct device number, service ID, action and value based on the device you want to control.  The example I gave is to turn off a switch with device number 6.