Secure HTTP / HTTPS (TLS) Controller – MyURemote

Secure HTTP / HTTPS (TLS) Controller

The Network HTTPS secure controller enables MyURemote to communicate with devices that require HTTPS / TLS transport.

This controller does not define commands or device logic. It only defines a secure transport path.

1. Core principle

MyURemote does not infer transport from port numbers or URLs. Transport must always be explicit.

  • secure=false → raw TCP / plain HTTP path
  • secure=true → HTTPS/TLS path
Port 443 alone does not activate TLS. Only secure=true determines that the secure transport layer is used.

2. What securehttp.js does

The securehttp.js controller is a generic transport layer.

It:

  • builds a raw HTTP request
  • sends it through the local MyURemote proxy
  • sets secure=true
  • delegates TLS handling to the backend

It does not:

  • map commands
  • understand device APIs
  • interpret responses

3. Execution flow

  1. Frontend builds HTTP request
  2. Request is sent to localhost:9090
  3. secure=true is included
  4. Gateway selects secure transport path
  5. TLS connection is established
  6. Raw HTTP request is sent
  7. Response is returned via standard contract

The browser itself never performs the HTTPS request.

4. Request structure

{
  ip: "192.168.0.50",
  port: 443,
  command: encodeURIComponent(rawHttpRequest),
  timeout: 1000,
  keepOpen: false,
  secure: true
}

The only difference with non-secure controllers is:

secure: true

5. Raw HTTP request example

GET /api/status HTTP/1.1
Host: 192.168.0.50
Connection: close
User-Agent: MyURemote
Accept: */*

This request is sent exactly as written, but over a TLS connection.

6. Important distinction: transport vs command

A command definition like:

STATUS
["getPlayerStatus"]

is not an HTTP request.

It is a logical command value that must be transformed by:

  • a device-specific extender
  • or a mapping layer

into a full HTTP path:

/httpapi.asp?command=getPlayerStatus

Then securehttp.js wraps that into a full HTTP request.

7. Difference vs HTTP Post-Put-Get controller

post.js Plain HTTP over non-secure transport
securehttp.js Same concept, but over TLS

The payload may be identical. Only the transport layer differs.

8. When to use this controller

  • Device requires HTTPS/TLS
  • Plain HTTP fails or is rejected
  • Device uses secure local API

Typical examples:

  • modern streamers
  • home automation hubs
  • devices with self-signed certificates

9. Common mistakes

  • Using port 443 without secure=true
  • Sending plain HTTP over TLS devices
  • Expecting controller to understand command logic
  • Mixing transport logic with device logic
Always separate:
command meaning → device layer transport → controller layer

10. Summary

The HTTPS controller adds one critical capability:

  • secure transport via TLS

It does not change how commands are defined, only how they are transmitted.

In MyURemote:

command + controller + transport flag = execution path