Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

EmailRelay Response is -3 "Cannot Connect to Kone"


SteveA Mar 5, 2018 04:25 PM

Hi,

I'm new to the EmailRelay function.  I'm attempting to get an email sent to myself when a variable goes over a certain value.  The response I get from the EmailRelay function when it is triggered is a value of -3 with the message "Cannot connect to Kone".  I believe I've enabled DNS (but I'm also pretty new to IP/networking/IT stuff, so I may not have those settings correct).  I'm wondering if anyone has any tips for me.  My setup is detailed below (except I altered the email address:

CR6 OS: CR6.Std.07

Modem: RV50

The CR6 is connected to the RV50 through the RS232/CPI port on the CR6 to the serial port of the RV50.

Under the CS I/O IP tab in the DevCon Utility for the CR6 I have the DNS Server 1 and 2 as the same IP addresses as what were used in the RV50 modem.

Here is my code:

 

'Declare Variables and Units
Const ToAddr="user@domainname.com"
Const Subject="Email Message Test"
Const Message="Test Message......."

Public BattV
Public PTemp_C
Public SW12State As Boolean
Public SW12State_2 As Boolean
Public SW12_2Count
Public EmailSuccess
Public ServerResponse As String

Units BattV=Volts
Units PTemp_C=Deg C

'Define Data Tables
DataTable(Hist_1Hr,True,-1)
	DataInterval(0,60,Min,10)
	Minimum(1,BattV,FP2,False,False)
	Average(1,PTemp_C,FP2,False)
EndTable

DataTable(Hist_1Day,True,-1)
	DataInterval(0,1440,Min,10)
	Minimum(1,BattV,FP2,False,False)
EndTable

SequentialMode 

'Main Program
BeginProg
	'Main Scan
	Scan(1,Sec,1,0)
		'Default CR6 Datalogger Battery Voltage measurement 'BattV'
		Battery(BattV)
		'Default CR6 Datalogger Wiring Panel Temperature measurement 'PTemp_C'
		PanelTemp(PTemp_C,60)
		'SW12 Timed Control
		'Turn ON SW12 between 0700 hours and 1900 hours
		If TimeIsBetween(420,1140,1440,Min) Then
			SW12State=True
		'Turn OFF SW12 only if time runs out and ComRS232 is not active
		ElseIf (ComPortIsActive(ComRS232)=False) Then
			SW12State=False
		EndIf
		'Always turn OFF SW12 if battery drops below 11.5 volts
		If BattV<11.5 Then SW12State=False
		'Set SW12-1 to the state of 'SW12State' variable
		SW12(1,SW12State,0)
		'SW12 Timed Control
		'Turn On SW12-2 for 0.5 s, then turn OFF SW12-2.  Increment switch count by 1
		If SW12State_2 = True Then		
		  SW12(2,SW12State_2,0)
		  Delay (1,500,mSec)
		  SW12State_2 = False
		  SW12(2,SW12State_2,0)
		  SW12_2Count = SW12_2Count + 1
		EndIf

		'Call Data Tables and Store Data
		CallTable Hist_1Hr
		CallTable Hist_1Day
	NextScan
	
	SlowSequence
	Scan(1,sec,1,0)
	  If SW12_2Count > 2 Then
		  EmailSuccess = EmailRelay(ToAddr,Subject,Message,ServerResponse)
		  SW12_2Count = 0
		EndIf
	NextScan
EndProg

 

Any help or ideas is appreciated!


JDavis Mar 5, 2018 04:32 PM

Is your datalogger configured to use the modem in PPP mode?

Not being in PPP mode is the most common reason people can't send emails with dataloggers connected to cell modems.


SteveA Mar 5, 2018 05:24 PM

Well that's probably my problem, since it was inactive.  Now I just need to figure out what the correct settings are for PPP.  Is the IP Address just the address for the Modem?  Thanks for the amazingly quick reply!

Steve


JDavis Mar 5, 2018 05:54 PM

Step 6 of the RV50 quick deploy guide has the PPP settings you should use on the datalogger.


SteveA Mar 5, 2018 10:56 PM

Great, thanks for the quick help.  It's up and working now!

Steve

Log in or register to post/reply in the forum.