A cost effective Web Relay control

  • 4
  • Idea
  • Updated 5 months ago
I wanted to share a 4 port cost effective Web Relay Switch.  This is a subset of the one I use on my remote base (I use 16 relays).  While there are many other way, I like this software as it allows me to start to build out the RemoteQTH server as you build up your station.

This is a picture of my test setup.  When done, all you need is the power cord, the network cable and any devices you wish to turn on or off to be wired in.



Regarding the Remote RCA connector:

This RCA connector is provided for remote power-on functionality. When the RemotePower ON feature is enabled, shorting this input to ground will activate the radio - openingthis connector will disable power on the radio. Refer to the SmartSDR documentation forinformation on how to configure this input. (Note: 3.3VDC Max Input.)

The parts required are:

The quick cookbook is:

  1. Order the RPI if you don't have one already
  2. Order the KS0212 for $8.99 
  3. Find and RCA cable that has the RCA connector on one end to plug into the radio and bare wires on the other end to wire up to the KS0212
  4. Build the RPI server by downloading the image from RemotQTH and booting your RPI (directions are on their website on how to build and image and get up and running.  Their image is a complete Raspian install.
  5. Login into their control panel and you want to configure their relays numbered 1, 5, 17 and 24.  This will be relay 1, 2, 3 and 4 on the KS0212 that you have plugged into the RPI.
You want to wire the 2 wires from the RCA connector to the Normally Open contacts so that when you turn the Relay ON, the 2 wires are shorted and the 6000 radio will come out of standby mode.

After that, let's assume you want to add some control for AC Power devices.  I found this on Amazon which is the least expensive power switch I could find, called the IoT Relay for less than $30 each.



Once you have all that wired up, this is the One of the Web Views you can get and it works well from a Mobile Device:




There are many other ways to get this done, but this one is one of my favourites and does not require any wire wrapping, soldering on special jumpers.

Mike va3mw
Photo of Michael Walker

Michael Walker, Employee

  • 1059 Posts
  • 314 Reply Likes

Posted 2 years ago

  • 4
Photo of kr4k

kr4k

  • 75 Posts
  • 17 Reply Likes
Excellent post. Thanks. You are paying a lot less than the ones I use.

I control the 6700 RELAY ON connection and also use three of the IoT Relays for other gear. They are excellent for 120 VAC switching.

I have been using these two remote relays, which are more pricey:
Webswitch 1216H  http://www.remoterig.com/wp/?page_id=166
RelayPros Web Relay 4-Channel 20-Amp ProXRZADR420PROXR_WEB-I  http://relaypros.com/Relay/Device/ZADR420PROXR_WEB-I
RelayPros RS232 Controller 4-Channel 10-Amp ProXR LiteR410PL_ZRS http://relaypros.com/Relay/Device/R410PL_ZRS

If anyone is interested in the RelayPro versions, I have MATLAB classdefs to control them. MATLAB has an inexpensive home edition for $149. I use it extensively in my amateur radio projects.

73/gus
Photo of Michael Walker

Michael Walker, Employee

  • 1059 Posts
  • 314 Reply Likes
I had a bunch ask me about this during Dayton, so I just wanted to bump this up.  I used this to replace my remoterig equipment as it was more cost effective.
Photo of Michael Walker

Michael Walker, Employee

  • 1059 Posts
  • 314 Reply Likes
For those experimenters, I just found this on Banggood that might be worth trying.  It is a web based switch that you can use to soft power off your 6000 series radio.

https://www.banggood.com/ESP8266-5V-WiFi-Relay-Module-Internet-Of-Things-Smart-Home-Phone-APP-Remote...



They even have a dual relay one

https://www.banggood.com/5V-ESP8266-Dual-WiFi-Relay-Module-Internet-Of-Things-Smart-Home-Mobile-APP-...


Mike
Photo of Ken - VE5KC

Ken - VE5KC

  • 52 Posts
  • 14 Reply Likes
Check these out on Amazon:

WiFi Smart Power Strip

- cheap - around $30.00
- 4  Individually remote switched AC Outlet
- 4 USB Outlets - remotely switched together

There are much more expensive versions but likely use the same internal parts..

Working fine.. I'm using an Android App for control
.
US

https://www.amazon.com/Conico-Protector-Outlets-Compatible-Controlled/dp/B074SFQDN5/ref=sr_1_3?ie=UTF8&qid=1527752246&sr=8-3&keywords=WiFi+Smart+Power+Strip+Surge+Protector

Canada

https://www.amazon.ca/gp/product/B079X2CRK9/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1
Photo of Frank Kirschner

Frank Kirschner

  • 47 Posts
  • 3 Reply Likes
Here's one that's directly controllable with USB. It has eight SPDT relays, comes with free software, doesn't require the Raspberry Pi, and costs less than $18.

https://www.amazon.com/gp/product/B07DYNVB38/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1

All it needs is a 5 V power supply and a USB connection to a Win 7 computer. The app only only works on Win 7, but you can address it through programming under Win 8.1 or 10.


Photo of Paul - K6HR

Paul - K6HR

  • 122 Posts
  • 22 Reply Likes
Need a Web Relay? Take a look at www.controlbyweb.com Highly recommended! I bought mine used on eBay.
Photo of Michael Walker

Michael Walker, Employee

  • 1059 Posts
  • 314 Reply Likes
The KMTronics ones are of great value as well.  I have used this one.

https://www.ebay.com/itm/KMTronic-LAN-Ethernet-IP-8-channels-Relay-board-WEB-BOX/281238587151?hash=i...

Mike va3mw
Photo of Clay N9IO

Clay N9IO

  • 633 Posts
  • 170 Reply Likes
Hey Michael do you check the panafall to see if these devices emit RF?
I imagine yes but thought I would ask.
Photo of Michael Walker

Michael Walker, Employee

  • 1059 Posts
  • 314 Reply Likes
I did and I didn't hear the KMTronics one.  They will also work directly with PSTRotatorAZ.
Photo of Kevin - K4KWB

Kevin - K4KWB

  • 9 Posts
  • 0 Reply Likes
Anyone come up with a coax relay , that is reasonable to remotely turn them on and off, to protect from lightning ?
Photo of Michael Walker

Michael Walker, Employee

  • 1059 Posts
  • 314 Reply Likes
Hi Kevin

Most coax relays will work with web switches.  If you are searching on eBay, DowKey is the gold standard.   This one looks cool  https://www.ebay.com/itm/Remote-Controled-Android-OS-MS-S4-WiFi-smart-ANTENNA-COAXIAL-SWITCH-2-KW-PE...

Of course we also have our great line by 4O3A will do the same.  Much better quality.

Mike
Photo of Dan Scukanec

Dan Scukanec

  • 2 Posts
  • 0 Reply Likes
Mike,

You might want to update your post to specify that the Raspberry Pi 3 B+ is NOT supported by the remote QTH server software download.

Dan
Photo of Michael Walker

Michael Walker, Employee

  • 1059 Posts
  • 314 Reply Likes
I see that, but I will leave that message for Dan's team to get out.  

Photo of Alan KB5CUS

Alan KB5CUS

  • 30 Posts
  • 10 Reply Likes
Michael, I have some curious ( maybe far fetched ) questions ... LOL    Currently I'm using the Denkovi 8 relay USB unit hooked to an Ameritron RCS-10 Antenna switch.( cheap route )  I also use the c232hm-edhsl-0 for the Amp to track the radio band BCD data.   Do you see in near future that Flex may bring out such a simple PCB as Denkovi, & have like 16 relays, 8 for Antenna switching & the other 8 for like Amp AC pwr control ..  etc... I suppose the PCB would also have to have Network connection to Turn on the Flex radio First... Not sure if this has any feasibility or not.... Your thoughts on the ideal all-in-one unit ......OH... I forgot to ask...  Is the RemoteQth  link for security or ??
(Edited)
Photo of Michael Walker

Michael Walker, Employee

  • 1059 Posts
  • 314 Reply Likes
Hi

At the moment, I don't see it on the radar.  That is why we did provide the BCD data port that works well with the Denkovi as you have found out.  

Can you  rephrase your RemoteQTH question?  I am not sure what you are asking.
Photo of Dan Scukanec

Dan Scukanec

  • 2 Posts
  • 0 Reply Likes
Mike,

I am a total newbie when it comes to Raspberry PI.  I got the remote QTH disk image successfully written to the micro SD card.  When the Pi boots all I get is Linux commands ending in a login prompt.

when I try my callsign with the default password of 1234 all I get is incorrect login prompt.

I am stumped.


Anything you can help with on this?

Thanks,

Dan
Photo of Kevin - K4KWB

Kevin - K4KWB

  • 9 Posts
  • 0 Reply Likes
The first time you go to the IP address and log in with “yourcall” then password “1234”. Once you do that, then you go in and change the user name and put your callsign or what ever you want then a new password.
(Edited)
Photo of Wim

Wim

  • 109 Posts
  • 23 Reply Likes
I use the Insteon home automation switches. They have an app that allows remote control and
can automate lights in your house .

This is their relay switch that can directly interface with the RCA plug on the flex

https://www.insteon.com/io-module/

You do need one Hub in your house but all the command and control is done over the
electric household 110V wiring

https://www.insteon.com/insteon-hub/

 
Photo of rjguidrysr

rjguidrysr

  • 98 Posts
  • 14 Reply Likes
WEB RELAY QUAD: Added a new Remote PTT using one of the WebRelay Quad ports and now can register my Flex remotely. Using others three ports for Flex Remote on, 220 power to SPE 2K-FA amp via HD relay and SPE Amp on. Realy neat and complete remote relay package.  
Great little unit.  73 Russ K5OA
Photo of mikeatthebeach .

mikeatthebeach .

  • 480 Posts
  • 82 Reply Likes
Running SPE from 220VAC - What HD relay did you use
73 Mike
Photo of rjguidrysr

rjguidrysr

  • 98 Posts
  • 14 Reply Likes
YC-GP-DPDT-6D YuCo Power Relay 12V DC Coil 50Amp 2 Pole DPDT Heavy-Duty

Got from Amazon put in 6 inch by 6 inch plastic electrical box and made up  short power cord with 5-20 proper plug for my 220-230 volt outlet with # 8 wire to power panel.

So I use one relay  to turn on this relay with 12 volt coil, , one to turn on amp with 12 volts to remote on,  one to turn  remote on ground to Flex and had the spare now used to give me remote PTT so I can re-register my unit if needed.  Had help VE2WU and lost my unit in Smartlink but SmartCat worked and it is 85 miles away!

Most at local electrial supply will work but hard to find the 12 volt dc coil.

Hope it helps Mike. 

73, Russ K5OA
Photo of Sergey, R5AU

Sergey, R5AU

  • 862 Posts
  • 117 Reply Likes
I am not using an relay boards but RemoteQTH SW with solid-state relays drived via opto-transistors
(Edited)
Photo of Michael Walker

Michael Walker, Employee

  • 1059 Posts
  • 314 Reply Likes
Photo of Michael Walker

Michael Walker, Employee

  • 1059 Posts
  • 314 Reply Likes
Moving this to the SmartLink conversation
Photo of John Adkins

John Adkins

  • 16 Posts
  • 1 Reply Like
This thread has been interesting reading--using the now unavailable USB Knacro 8-relay bank, I built a little enclosure that is set to open the Remote On switch, to open the 12v power supply to my 6400, and to open the 240v line to my amplifier.  I can also close the PTT line on the 6400.  It doesn't look like there is any RF emanating from the aluminum enclosure, at least in the HF bands.  The device is controlled by an executable file running under Win 10.

Photo of Chip Swett

Chip Swett

  • 30 Posts
  • 1 Reply Like
I have been using an IP Power Switch 9258 (http://www.aviosys.com/9258.html) to remotely power devices at my remote base in Maine including Flex.  It has worked great, except when it doesn't. Currently, it is offline.  When this happens, I have to wait for a power failure after which it normally comes back online (not unusual in rural Maine).   Obviously, I will be looking to put in a more reliable system once the snow melts.  The ideas presented here will be a big help.
Photo of John - K3MA

John - K3MA

  • 379 Posts
  • 127 Reply Likes
IF you have not done so you might look to see if setting up the ping function to reboot will fix your issue.
Photo of Larry Benoit

Larry Benoit

  • 94 Posts
  • 25 Reply Likes
Hi Chip,

I've used a pair of Digital Loggers Inc. (DLI) Web Power Switches (version 4 and 7) for years and neither has ever been inaccessible -- not once.  An accessory AC Relay adds additional flexibility for controlling equipment, such as the remote on function for your Flex radio. There have been many positive posts on this community in regarding DLI products, including one in this thread.  

https://www.digital-loggers.com/lpc.html
http://www.digital-loggers.com/ac.html


73,
Larry KB1VFU




Photo of Michael Walker

Michael Walker, Employee

  • 1057 Posts
  • 314 Reply Likes
Hi Larry

I have one, but I am going to sell it to anyone who wants it in Canada.  I really liked it, but it was overkill and for most customers, I would not call it simple.  

I was not able to find a simple web interface to turning this on and off.  Is there one?  

I also tried the IOS app that someone wrote, but it could not find the switch.

If you can share some tips, I am interested and I might then actually install it at my remote station.

Mike
Photo of Larry Benoit

Larry Benoit

  • 94 Posts
  • 25 Reply Likes
Hi Mike,

No software required -- I just log into the DLI web interface with any browser. 



73,
Larry KB1VFU
(Edited)
Photo of Michael Walker

Michael Walker, Employee

  • 1057 Posts
  • 314 Reply Likes
Hi Larry

Yep, I saw that screen.  It doesn't work too well on an iPhone.

Don't get me wrong, it is a great device.  It is overkill for most of our new remote operators as  most struggle with that level of detail.

Mike
Photo of Larry Benoit

Larry Benoit

  • 94 Posts
  • 25 Reply Likes
Mike,

I suppose at first blush it appears to be complicated, but after initial configuration of the fixed IP address and local port number, you just plug in the equipment to the labeled outlets and turn them on and off. No Raspberry PI, no local control software -- nothing else needed. It seems fairly simple to me. 

I access my DLI switches with Firefox or Chrome on my Samsung Note 8 or Windows 10 tablets. Both work well, but the browsers will complain about security if you don't use the https protocol for remote logins.  

73,
Larry KB1VFU
Photo of Michael Walker

Michael Walker, Employee

  • 1057 Posts
  • 314 Reply Likes
Hi John

I get it... seriously.   

A  large part of customers who want to move into remote operating need super simple, so that is the perspective we are coming from.  Even handling a port forward is stressful for them as they are afraid of breaking something by logging into a router. 

For others, the Digital Logger device is awesome.  It would be nice if it had an admin interface and a user interface as well.  I have talked to Digital Logger on the phone about this and also talked with them about have a few dry contacts on this device as well to handle things like remote/soft power down and up.  Since all their relays are driven by a UN2309 (guessing at the chip number), it is an easy hack to drag a few TTL levels out and do it externally to the switch.

Mike   
Photo of Mark - WS7M

Mark - WS7M

  • 1357 Posts
  • 506 Reply Likes
It is simple if you use a Raspberry Pi to have it send commands to the DLI devices so there is no need to use that screen.

I wrote my own very simple web software for my Pi and ensured the web interface is very simple and it works very well on phone or computer:

Photo of Eduardo Carvalho - KC8R

Eduardo Carvalho - KC8R

  • 79 Posts
  • 7 Reply Likes
Mark, what are you using for secure logon to your pi remotely? Or do you access it via VPN only?

Eduardo, KC8R
Photo of Mark WS7M

Mark WS7M

  • 505 Posts
  • 153 Reply Likes
I have fairly secure login built into the web app.  Certainly it is not unbreakable but even with hackers poking at it now for close to 3 years no one has gotten in.

The key in my case is a rotating password.  It changes each and every day to something totally new based on a formula only I know.  It also changes when I log out so the next login is different.

Its an easy formula to figure out when logging in but not obvious to a hacker.  But sure it can be busted.  

Mark
Photo of Eduardo Carvalho - KC8R

Eduardo Carvalho - KC8R

  • 79 Posts
  • 7 Reply Likes
Thanks for the feedback Mark. I was looking into hosting a site but decided not to because it needed to create a bunch of security around it. Sounds like you have a slick solution.

Eduardo, KC8R
Photo of Mark WS7M

Mark WS7M

  • 505 Posts
  • 153 Reply Likes
Eduardo,  My site is written in php which makes this pretty easy to do.  When connected to the site the php code that generates the output page computes the new needed password.

The password is sent via form submit from the user back to the server.  At this point in time is probably the most vulnerable as that is free text at the moment.  But with a little work I could encrypt it or even convert the site to SSL.

Then if the password is correct at the server site a session is opened that has an expiration of  I think 60 minutes.   When that session expires or the user logs out the expiration code that is run changes the required password again.

The only time the password is seen is during the initial login.  The session data is stored in a database on the server and never sent to the client.   Commands executed first check if the requester matches the current logged in requester in the session table.  If so the command executes, otherwise the code reverts back to the login page which changes the password.

The current logged in user can continue to issue commands as their session is still value.  When they finally logout the password is changed again.

It is based a little on time and it is not an overly complex password but it changes each time to fail login and each time you logout or the session expires.
Photo of Steve - AK0M

Steve - AK0M

  • 9 Posts
  • 0 Reply Likes
I am new to Raspberry Pi as well, and setting this remote control arrangement up for the first time, using the KS0212 relay board. I'd like to package this... any suggestions for selecting an appropriate case (RPi 3)?
Got my new 6400 and SmartLink running yesterday... excited to get all this going!
Steve AK0M
Photo of Michael Walker

Michael Walker, Employee

  • 1048 Posts
  • 311 Reply Likes
Hi Steve

I was not able to find a commercial case that will fit this arrangement.   But, if someone finds one, that would be awesome.

Mike
Photo of Mike, W8BE

Mike, W8BE

  • 172 Posts
  • 38 Reply Likes
It looks to me like this case might work.  

https://www.pishop.us/product/highpi-raspberry-pi-b23-case-black/
Photo of Larry Benoit

Larry Benoit

  • 94 Posts
  • 25 Reply Likes
Another useful tool for remote station control is an Ethernet to Serial converter.  The device enables remote control of any equipment with a serial interface (RS-232) and related software.  Many remote control apps include power cycling among other functions. 

I use a USR N540 four-port Ethernet to Serial converter to remotely control an Elecraft KPA500, SteppIR SDA-100 and Green Heron RT-21.  Any remote control app that employs a serial interface will work remotely with one of these devices via port forwarding. I run DX Lab Suite, which acquires band data from my Flex 6600 via the web and supplies the data to PSTRotator and WSJT-X. 

The USR N-540 (about $120) combined with the DLI Web Power Switches provide full remote control of my station with no computer running in the shack. 


https://www.usriot.com/products/4-ports-serial-to-ethernet-converter.html

73,
Larry KB1VFU


Photo of Mike, W8BE

Mike, W8BE

  • 172 Posts
  • 38 Reply Likes
Anyone who is interested in an enclosure for the Raspberry Pi and the relay board.   This case will fit:

https://www.pishop.us/product/highpi-raspberry-pi-b23-case-black/









Photo of Michael Walker

Michael Walker, Employee

  • 1027 Posts
  • 301 Reply Likes
wow! that is awesome.
Photo of Ted  VE3TRQ

Ted VE3TRQ

  • 577 Posts
  • 205 Reply Likes
Now there's a surprise - cheaper in Canada! $6.95 (V1000 version with some lettering, but who cares?)
Photo of Mike, W8BE

Mike, W8BE

  • 172 Posts
  • 38 Reply Likes
There is on caveat.   The screws that came  with the relay board are too long.   I had to cut them down.  I installed just the 2 spacers on the opposite side of the header pin.  I installed the screws with the head at the top and just let enough of the screw to fit out the bottom of the pi,  then cut it off.  
(Edited)
Photo of Steve - AK0M

Steve - AK0M

  • 9 Posts
  • 0 Reply Likes
I have my Pi and relay board up and running but not yet wired into my station, but am already looking to the future to add more relay outputs. I am finding that Pi relay boards beyond 4 channels do not seem to be very common, and the board used in this solution is not stackable.

I came across these, which look very interesting... 8 relays per board, and stackable. Does anyone have any experience with these?:

https://www.sequentmicrosystems.com/
https://www.kickstarter.com/projects/mbeffa/raspberry-pi-mega-io-expansion-card

Or suggestions for alternate relay expansion options?

Photo of Michael Walker

Michael Walker, Employee

  • 1048 Posts
  • 311 Reply Likes
Hi Steve... you can easily expand beyond 4, but you will have to follow their wiring format on the RemoteQTH server page.  I have 16 relays and I use about 6 of them now.

Here are the relays and the GPIO ports they are tied to.

https://remoteqth.com/wiki/index.php?page=Web+relay

(Edited)
Photo of Michael Walker

Michael Walker, Employee

  • 1048 Posts
  • 311 Reply Likes
I went to go look at Sequent Microsystems manual, but it seems I am not able to get to them, even if you register.  
Photo of Mark - WS7M

Mark - WS7M

  • 1352 Posts
  • 503 Reply Likes
These boards work very well.  You simply need to buy jumper wires and wire the Pi pins to them.  You need to supply +5V/Gnd from the Pi as well.  I use two of them.

https://www.amazon.com/gp/product/B07CXQS63R/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

(Edited)
Photo of Tom W3FRG

Tom W3FRG

  • 98 Posts
  • 17 Reply Likes
Mike,

An additional source for remote controls you might like to consider is Snaptekk, http://www.snaptekk.com/

I have been using their remote 4 port antenna switch with great success.
While they have it currently rated at 1Kw, its been running full legal power here w/o issue.

Tom W3FRG
(Edited)
Photo of N5LB - Lionel B

N5LB - Lionel B

  • 224 Posts
  • 64 Reply Likes
I looked at their site this afternoon but it looked like they didn’t any products currently available for sale.
Photo of Steve - AK0M

Steve - AK0M

  • 9 Posts
  • 0 Reply Likes
What are you using to power the relays for the PI solution? 8 or more relays can drive the +5V current requirement up.... Do you have a separate +5V supply for the relays? Or do you power the whole assembly from one heavier duty supply? Recommendations for suppy?
Photo of Mark - WS7M

Mark - WS7M

  • 1352 Posts
  • 503 Reply Likes
12V to 5V 2 amp converter for the Pi and it also powers the relay boards.
Photo of Warren Merkel

Warren Merkel

  • 4 Posts
  • 4 Reply Likes
I'm currently developing a web remoteable antenna switcher based on the ESP32 processor that could be used for any number of control situations.  It will be able to run logic on various input sources including CAT and CI-V via RS-232 (two of them) and Flex API via it's WiFi interface.  

The output boards (up to 4 in series) add 16 channels each, and should be able to be separated by over 1000 feet from the controller via shielded CAT5. It has switch inputs for "front panel" operations, and will automatically relax the relays when a power sense input is dropped.  Here are a few 3D models of the current dev boards going out to fab this week.

Controller board (ESP32 processor daughter board not shown)
 

Relay output board


I do have an earlier prototype board (8 channel) up and running using serial connectivity via CAT Cables.  Oh yeah, it has support for an OLED display (for now)

I plan to kit it up as it is all through-hole so it is possible to be built with normal tools.  No time line yet.  Still lots of coding yet to do before Alpha testing.

Warren, KD4Z

Photo of Michael Walker

Michael Walker, Technologist

  • 726 Posts
  • 205 Reply Likes
That is so awesome!  I'm working (slowly) on trying to control all my devices in 1 Node-Red window instead of having 3 or 4 open.  I would be interested if a Node Red front end could also communicate with it. 

Nice job!!

Mike va3mw
Photo of Michael Walker

Michael Walker, Technologist

  • 726 Posts
  • 205 Reply Likes
test