Skip to content

C4 sky_q_ip driver: hardcoded PORT=49160 with no legacy 5900 fallback #7

@malard

Description

@malard

Summary

Control4/sky_q_ip_pulse-eight/p8sky.lua hardcodes PORT = 49160 with no fallback path. This is the right port for modern Sky Q boxes (firmware v060+) and Sky+HD, but breaks on legacy Sky Q firmware < v060 which uses 5900.

Code reference

-- Pulse-Eight/drivers/Control4/sky_q_ip_pulse-eight/p8sky.lua
PORT = 49160

function P8INT:SEND_KEY(code)
    ...
    skyClient = C4:CreateTCPClient()
        :Connect(ip, PORT)
end

The wire format and splice handshake (splice = 12 → 1, string.char(4, dn|up, 0,0,0,0, math.floor(224 + (code/16)), code % 16)) match the open-source consensus and the Pulse-Eight V2IP firmware driver at libP8/remote_control/src/drivers/SkyIP/sky_ip.c. Only the port is at issue.

Impact

Probably small in practice — v060 has been out long enough that the install base is overwhelmingly modern. But a customer with an unusual / non-updated box would see a silently failing driver: TCP connect to 49160 times out, no key fires, no fallback attempted.

Suggested directions

  1. Add a 5900 fallback mirroring the pattern in V2IP firmware: try 49160 first, fall back to 5900 on connect failure, cache which port worked. (See Pulse-Eight/V2IP#309 for the firmware-side discussion of port-order strategy.)
  2. Or expose Port as a driver property with default 49160 and let the integrator override on the rare legacy install.
  3. Aligning with the firmware is the higher-value choice — both Pulse-Eight Sky-Q control surfaces (firmware + Control4) should agree on which port they prefer and whether they fall back.

Minor cosmetic

Typo at the same file's TURN_OFF log line: "Sky Q is already of, ignoring Turn Off Request"ofoff.

Cross-reference

Pulse-Eight/V2IP#309 — the firmware side of the same port-order question.

Discovered during

Customer-side review of Sky Q control behaviour across both Pulse-Eight stacks (V2IP firmware + Control4 driver). Ben (bpuk) is the C4 maintainer per Martin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions