Re: Remote power on/off via USB relay Arduino CH340. Maybe add it to APCC?


Frank Widmann
 

Check out RelayPros. They have am easily configurable software control tool.

https://relaypros.com/Relay/Relay/USB_Relay_Controller

For a more packaged solution check out Kmtronic. They have a nice control package.

On Feb 4, 2021, at 1:10 PM, Micheal Fields Jr via groups.io <mpfjr@...> wrote:

Looking for a way to restart the mount I ventured onto Amazon and found this little USB relay device https://www.amazon.com/gp/product/B01CN7E0RQ

After poking around trying to figure out how to use it easily I found that documentation was limited and so was software.  I found a helpful youtube video https://www.youtube.com/watch?v=26XHb_cpiAA and the youtuber also provided example power shell scripts and a link to a piece of software that sends hex commands to the device to toggle on / off.

I found the power shell scripts more useful.  Here is an example to turn on/off

ON:
[Byte[]] $powerOn  = 0xA0, 0x01, 0x01, 0xA2
[Byte[]] $powerOff = 0xA0, 0x01, 0x00, 0xA1
$robojax = new-Object System.IO.Ports.SerialPort COM7,9600,None,8,one     <---- Note the com port must match what your windows sets for this device.
$robojax.Open()
$robojax.Write($powerOn, 0, $powerOn.Count)
$robojax.Close()

OFF:
[Byte[]] $powerOn  = 0xA0, 0x01, 0x01, 0xA2
[Byte[]] $powerOff = 0xA0, 0x01, 0x00, 0xA1
$robojax = new-Object System.IO.Ports.SerialPort COM7,9600,None,8,one
$robojax.Open()
$robojax.Write($powerOff, 0, $powerOff.Count)
$robojax.Close()


So it occurs to me that this device is a nifty and inexpensive way to toggle your mount on and off as opposed to the more expensive remote power strips, it would be nice to have this somehow added to APCC where we can slide a switch on  or off and send these commands to the relay board and perhaps as an added bonus be able to specify a delay in seconds.  Eg, turn off for 10 seconds and then turn back on again.

And again yes I am familiar with remote controllable power strips where you can turn on and off certain devices. These are great for remote observatories for sure.  If you are going to spend this much on equipment you probably should go that route anyways.   

If it isn't a big deal to add this to APCC though, that would be wonderful to have.  Hi Ray!

Join main@ap-gto.groups.io to automatically receive all group messages.