Home AMX User Forum NetLinx Studio

Read/Write file from PC

Is it possible to read/write data from client to server, and vice versa? I would like to update a text file that will be hosted on a server.

Comments

  • AMXJeffAMXJeff Posts: 450
    mjones2620 wrote: »
    Is it possible to read/write data from client to server, and vice versa? I would like to update a text file that will be hosted on a server.

    Of course... the most used method is to have a simple web server on the server and have your AMX system perform HTTP Get and Posts to the webserver.

    In your example you AMX controller would perform a "HTTP Get" to download the text file.

    // String to the Open Socket of the webserver.
    "'GET /somepath/textfile.txt HTTP/1.1',13,10
    "'Host: 192.168.100.20',13,10"
    "13,10"

    Then to upload the text file you would perform a HTTP Post with the payload being the text file content.

    "'POST /somepath/somewebpage.aspx HTTP/1.1',13,10"
    "'Host: 192.168.100.20',13,10"
    "'Content-Type: text/plain',13,10"
    "'Content-Length: 46',13,10"
    "13,10"
    'This is the text that was inside the text file'
  • AMXJeff wrote: »
    Of course... the most used method is to have a simple web server on the server and have your AMX system perform HTTP Get and Posts to the webserver.

    In your example you AMX controller would perform a "HTTP Get" to download the text file.

    // String to the Open Socket of the webserver.
    "'GET /somepath/textfile.txt HTTP/1.1',13,10
    "'Host: 192.168.100.20',13,10"
    "13,10"

    Then to upload the text file you would perform a HTTP Post with the payload being the text file content.

    "'POST /somepath/somewebpage.aspx HTTP/1.1',13,10"
    "'Host: 192.168.100.20',13,10"
    "'Content-Type: text/plain',13,10"
    "'Content-Length: 46',13,10"
    "13,10"
    'This is the text that was inside the text file'

    Jeff,

    Thank you very much. My team an I have been looking into deploying RMS, but are running into issues with them not having API's that work with our 3rd party scheduling system. We use a web service that stores meeting information on SQL Server. In a nutshell, we would like to create meetings from a touch panel, which then will update SQL Server somehow. My database programmer isn't skilled in writing webservices, so I was trying to make it as simple as possible. He wanted to find out if the AMX Master has the ability to read/write information from other PCs/Servers on the same network. Any thoughts?

    Thanks,
    Matt
  • cmasoncmason Posts: 123
    mjones2620 wrote: »
    Jeff,

    Thank you very much. My team an I have been looking into deploying RMS, but are running into issues with them not having API's that work with our 3rd party scheduling system. We use a web service that stores meeting information on SQL Server. In a nutshell, we would like to create meetings from a touch panel, which then will update SQL Server somehow. My database programmer isn't skilled in writing webservices, so I was trying to make it as simple as possible. He wanted to find out if the AMX Master has the ability to read/write information from other PCs/Servers on the same network. Any thoughts?

    Thanks,
    Matt

    You could write to a text file on the master's flash and the server could download it via FTP.

    Or you could open an IP client connection to the server and pass strings.
  • viningvining Posts: 4,368
    I used to run filezilla server on my PC, change its root directory to a location I wanted and put my files in that directory. I would then use a modified version on !FTP _??? on my master and periodically queried the dtmf or something like that to get the files modification time stamp. If the time stamp was different from what my master had I would ftp transfer it to the master and read it. You can modify it and write it back the the PC if you want if I recall. I haven't played with it in a long time but it used to work fine as long as the PC was on and the filezilla server was running.
  • AMXJeffAMXJeff Posts: 450
    mjones2620 wrote: »
    but are running into issues with them not having API's that work with our 3rd party scheduling system.

    RMS Enterprise v4 has a external RESTFul API that allows you to create middleware to link to any external scheduling system. I have personally implemented two, EMS & Asure RS. In order to use the API your must purchase the Scheduling License.

    http://www.amx.com/assets/whitePapers/RMSEnterpriseSchedulingAPIGuide.Whitepaper.pdf


    You can also use Database Plus... It is a tool set that was created years ago, that allows you to access any ODBC compatible database using System DSN. I believe SQL is compatible.

    http://www.amx.com/products/i!-DatabasePlus.asp
Sign In or Register to comment.