Df To External Devices


svego

Recommended Posts

Hi,

 

On few remote site I have modbus TCP slave device. It is connected to Internet with 3G router. Problem is to read values from it because DF in Device configuration support only IP address but NOT dyndns name like site.dyndns.org..

 

I know you will say that it is not secure...here I have only to read values like meteo data etc, I dont have relays...Permanent IP address, VPN are too expensive for that application.

 

Entering actual IP address it works OK, but it last 2-3 days...

 

Is there any solution how to fix it?

 

THX

Link to comment
Share on other sites

Dynamic DNS won't work anyway because DAQFactory creates and maintains the socket.  If the IP changes out from under it, it won't automatically reconnect, even using the URL.  

 

My suggestion, is to use the http.get() function to do a web service call to your dynamic dns service to retrieve the address, then update the address in the device:

 

device.mydevice.address = newIP

device.mydevice.initComm()

 

I don't know about your dynamic dns service, so can't give you the script for that part.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.