A
A
Alexander2015-09-18 10:54:11
Electronic components
Alexander, 2015-09-18 10:54:11

How to implement Ethernet relay control system (backend)?

Hello! There is a Laurent
Ethernet relay to control some elements in the house: gates, watering devices, etc. The module is connected to the LAN and has the ability to control text commands via TCP. Connection via telnet protocol 192.168.1.2:2424 Authorization on the module:

$KE,PSW,SET,Laurent

If successful, then in response the module sends:
#PSW,SET,OK

For example, to turn on the relay, send:
$KE,REL,2,1 //turn on the second relay

Answer:
#REL OK

There is also a need to periodically check the status of sensors, for example:
$KE,RD,ALL

Answer:
#RD,000000 - there is no voltage on six incoming channels

In case of an error, the module will report the appropriate response.
It is necessary to make a site (local or hosted - it doesn't matter if the module is accessed from the network), which will have one page for managing and displaying various parameters received from the module, error handling (re-sending the command, reconnecting, pinging the module, etc.). d.). For unauthorized access, authorization on the page is required.
Can you please tell me how to implement this functionality? How to create a telnet connection, send commands and receive responses? As far as I understand, php will not help in this case. I don't speak other languages ​​at all. In which direction to dig, what to take as a basis?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question