I have an arduino uno equipped with an ethernet shield.
I want to connect an arduino to a Siemens PLC S7-1200 using the internet.
The PLC acts as a webserver which displays a webpage where a user can view/change outputs of the PLC.
Instead of a person, I want the arduino to control the outputs of the PLC using the build-in webserver of the Siemens PLC.
The problem is that the webpage is password protected (this can't be changed) and I don't know how to log-in using an arduino.
The website is plain HTML (see the attachment).
Also I have no clue how to tell the arduino to "press a button" (change an output from 0->1)on the website of the PLC.
Is this possible ? And could somebody give me some example code how to do this?
It seem PLC S7-1200 use form authentication, which require preserve cookie between login url and protection url. The arduino by alone is hard to preserve cookie if not impossible.
One work around;-
Add proxy code which run at PC/web server, which does preserve cookie between login url and protection url.
arduino ---> proxy server ---> PLC S7-1200
if u still need some type of authentication, then u have 2 plans
sonnyyu:
It seem PLC S7-1200 use form authentication, which require preserve cookie between login url and protection url. The arduino by alone is hard to preserve cookie if not impossible.
The cookie is sent in the HTTP header, for example: