Home/Support/Support Forum/Use Digi WR21 serial port to control a relay? (IOrelay.com)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Use Digi WR21 serial port to control a relay? (IOrelay.com)

0 votes
Using Digi WR21
R110 RS232 Relay
http://www.relaypros.com/Relay/Device/R110#.U6wzXPldWks


-I can get the relay to work using python on a PC
-I can control the relay over the web using the Digi WR21 RealPort driver.

-BUT...I CANT run python directly on the WR21 to run the relay

Anyone have experience doing this?
asked Jun 26, 2014 in Digi TransPort Cellular by jsullivangen New to the Community (0 points)

Please log in or register to answer this question.

2 Answers

0 votes
http://www.digi.com/wiki/developer/index.php/Digi_Python_Programmer's_Guide

You will likely need to check out the Digi ESP SDK as well.
answered Jul 2, 2014 by radix07 New to the Community (26 points)
0 votes
Hi

If you have configured the serial port to the correct speed you have saved all

you can open python in interpretor mode from the command line
"Python"

with these 3 lines should be able to pass data to the serial port

Serial0 = open("asy/00", "w")
Serial0.write("<text">)
Serial0.flush()

with the correct text sequence this should operate your releay

regards
answered Jul 21, 2014 by James.Wilson Veteran of the Digi Community (1,225 points)
...