Skip to content

Cloud Service

Urs P. Stettler edited this page Feb 24, 2017 · 1 revision

Thanks to anakhaema for sharing this with us. Original issue #2.

When operational, the relay attempts to establish a standard HTTP connection to the server (default connect.tutuuu.com, port 80) with a standard SYN request. Once a connection is made, the relay dumps TCP data immediately in the form:

POST /SyncServiceImpl.svc/ReportStatus HTTP/1.1
User-Agent: SR-201W/M96Y
Content-Type: application/json
Host: connect.tutuuu.com
Content-Length: 30

"F0123456789ABCXXXXXX00000000"

The first 13 characters after 'F' is the device serial (all hex), followed by the 6-digit password (numerical, plain text) and then the 8-digit current relay state.

There is then a 60 second TTL for the response, which should be of the form:

HTTP/1.1 200 OK
Date: Mon, 01 Jan 1980 00:00:00 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Length: 3

"A"

This is the constant-state response - simply indicating that both endpoints are live and ready.

(As with standard HTTP, all lines must terminate with the windows style newline "\r\n")

To change the relay states, the final line must change from "A" to any of the standard port commands, until the change is acknowledged in the subsequent "pings".

Eg. "A11" to switch relay 1 on, etc.

Clone this wiki locally