So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Jan du Preez
#68815 Hi There all,

I have a general question and would like a few pointers. I am not a programmer but usually manage to find simple solutions by reading tutorials and doing minimal coding.

I use a localhost server based SCADA program to collect data using the many Arduino modbus library protocols. I have successfully setup the SCADA using via serial, Ethernet and wifi.

Recently I developed a machine, which is to be placed remotely. The machine is controlled by an Arduino Uno with a ESP8266 with std firmaware. I can use the clients WIFI to connect no problem.

What I intend doing is to do all communication and datalogging from my PC from anywhere, i.e. my PC is the master and the ESP8266 would be the slave.

My question is how to go about structuring the hardware (and code) to accomplish this? The Modbus protocol can be setup using TCP/IP. I can setup a tunnel TCP socket using NGROK (SO I dont need to fiddle with DNS and port forwarding) and have successfully polled this IP from my desktop. Now how can I facilitate data transfer from the remotely connected ESP8266 to the TCP socket in order to get the data onto my pc and SCADA? I may be slightly confused but I simply dont know where to start.

I hope to get some responses from you and thank you in advance.

Regards
Jan
User avatar
By gbafamily1
#68845 I do not know anything about SCADA or modbus. But I once used ngrok.

As far as I recall when ngrok runs on your master computer (for example, "ngrok 80") ngrok tells you the hostname remote clients must use such as "asdfasdfasdfasdf.ngrok.io". So for the remote ESP8266 to connect to your master computer it must connect to http://asdfasdfasdfasdf.ngrok.io. If you are using some other port number adjust as needed. If using TLS, things get more complicated. I would try non-TLS first.