Skip to content

v2.6.4b2 - CC2 Client ID Format Fix (Beta 2)

Pre-release
Pre-release

Choose a tag to compare

@danielcherubini danielcherubini released this 09 Feb 10:00

Beta 2 - Critical CC2 Client ID Format Fix

This beta fixes a potential issue with CC2 client ID format that may be causing registration timeouts.

What's Fixed

CC2 Client ID Format Correction:

  • Changed from custom format 1_HA_<8 hex chars> to protocol spec format 1_PC_<4 digits>
  • Example: 1_HA_3a02e4f11_PC_4521
  • This matches the documented CC2 protocol and official Elegoo slicer format
  • May fix registration timeouts if printer firmware is strict about client ID format

Enhanced Debug Logging:

  • Added comprehensive logging throughout CC2 connection and registration
  • Logs client_id/request_id generation
  • Logs MQTT connection parameters
  • Logs registration request/response details
  • Detailed timeout messages with possible causes
  • Will help diagnose any remaining issues

Why This Might Fix Registration Issues

The CC2 protocol documentation specifies client IDs should be 1_PC_<4 digits> format. If the printer firmware strictly validates this format, our previous 1_HA_<hex> format would be rejected during registration, causing the timeout.

Testing Instructions for JoBanJo

Please test with debug logging enabled:

  1. Remove existing Elegoo printer integration
  2. Add debug logging to configuration.yaml:
    logger:
      default: info
      logs:
        custom_components.elegoo_printer: debug
  3. Restart Home Assistant
  4. Install v2.6.4b2 from HACS (enable beta versions)
  5. Try adding printer again (manual IP entry)
  6. Share the logs from config/home-assistant.log

The enhanced logging will show:

  • Generated client_id (now in 1_PC_XXXX format)
  • MQTT connection success/failure
  • Registration request being sent
  • Whether registration response is received
  • Detailed timeout information if it fails

Expected Log Output

You should see something like:

Generated CC2 client identifiers: client_id=1_PC_4521, request_id=1_PC_4521_req
Creating MQTT client: hostname=10.0.0.217, port=1883, username=elegoo, client_id=1_PC_4521
MQTT connection established successfully
Starting CC2 registration: client_id=1_PC_4521, request_id=1_PC_4521_req
Received registration response on topic elegoo/F012X80AKZLB3NW/1_PC_4521_req/register_response: {"error": "ok"}

Changes from v2.6.4b1:

  • Fixed CC2 client_id format to match protocol spec
  • Added comprehensive debug logging for diagnostics

Related PR: #332
Related Issue: #329