PHPackages                             ocolin/hyconext-lite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. ocolin/hyconext-lite

ActiveLibrary[HTTP &amp; Networking](/categories/http)

ocolin/hyconext-lite
====================

PHP client for Hyconext web-GUI-only network switches, providing programmatic access to switch data via internal JSON endpoints.

v1.0.1(1mo ago)02↓100%MITPHPPHP ^8.4

Since May 9Pushed 1mo agoCompare

[ Source](https://github.com/ocolin/HyconextLite)[ Packagist](https://packagist.org/packages/ocolin/hyconext-lite)[ Docs](https://github.com/ocolin/hyconext-lite)[ RSS](/packages/ocolin-hyconext-lite/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

[![Latest Version](https://camo.githubusercontent.com/d1bf98f666dd57e935c1a21964d45b87d8bfb5a1daff01560aa0b88b9b44709b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f636f6c696e2f6879636f6e6578742d6c697465)](https://packagist.org/packages/ocolin/hyconext-lite)[![PHP Version](https://camo.githubusercontent.com/5673b8443177c50e7642ec033d0e0f266ce4261155adea50cd95a213ab6370dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6f636f6c696e2f6879636f6e6578742d6c6974652f706870)](https://packagist.org/packages/ocolin/hyconext-lite)[![Total Downloads](https://camo.githubusercontent.com/bbfa6f79ec0f3d69a4c3dcfc8264533ee07a434193cb44faf6e83d69f16c4fd5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f636f6c696e2f6879636f6e6578742d6c697465)](https://packagist.org/packages/ocolin/hyconext-lite)[![License](https://camo.githubusercontent.com/fa0e35eb872576a5833a61695062032660be8a2997aa128b8a566664e3ffece4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6f636f6c696e2f6879636f6e6578742d6c697465)](https://packagist.org/packages/ocolin/hyconext-lite)

ocolin/hyconext-lite
====================

[](#ocolinhyconext-lite)

A PHP HTTP client for Hyconext network switches that expose a web GUI only, with no documented REST API. This library reverse-engineers the device's internal JSON endpoints to provide programmatic access to switch data.

Tested on the **HC8MT2XP-UP** model.

---

Requirements
------------

[](#requirements)

- PHP ^8.4
- Guzzle ^7.1
- ocolin/global-type ^2.0

---

Installation
------------

[](#installation)

```
composer require ocolin/hyconext-lite
```

---

Configuration
-------------

[](#configuration)

Configuration can be provided directly or via environment variables.

### Environment Variables

[](#environment-variables)

VariableDescriptionDefault`HYCONEXT_LITE_HOST`IP address or hostname of device—`HYCONEXT_LITE_USERNAME`Login username—`HYCONEXT_LITE_PASSWORD`Login password—`HYCONEXT_LITE_SSL`Use HTTPS`true`> **Note:** The device enforces a 15-character maximum on passwords. This library handles the truncation automatically during authentication.

### Constructor Parameters

[](#constructor-parameters)

All parameters are optional and fall back to environment variables if not provided.

```
$config = new \Ocolin\HyconextLite\Config(
    host:     '10.0.0.1',
    username: 'admin',
    password: 'yourpassword',
    ssl:      true,
);
```

---

Usage
-----

[](#usage)

```
use Ocolin\HyconextLite\Config;
use Ocolin\HyconextLite\HyconextLite;

$client = new HyconextLite(
    config: new Config(
        host:     '10.0.0.1',
        username: 'admin',
        password: 'yourpassword',
    )
);
```

Or using environment variables:

```
$client = new HyconextLite();
```

Authentication is handled automatically on the first request. The session is reused for the lifetime of the object.

---

Methods
-------

[](#methods)

### getSystem()

[](#getsystem)

Returns general system information about the device.

```
$system = $client->getSystem();

echo $system->model;           // HC8MT2XP-UP
echo $system->serialNumber;    // NYMTFJB00020
echo $system->ipv4;            // 10.75.29.2
echo $system->firmwareVersion; // 1.0.58.58.01.40.01.02.19
echo $system->tempCelsius;     // 49.0
echo $system->uptime;          // 267 days 2 hours 40 minutes 18 seconds
```

**Returns:** `\Ocolin\HyconextLite\DTO\System`

PropertyTypeDescription`serialNumber``string`Device serial number`model``string`Device model`tempCelsius``float`Temperature in Celsius`tempFahrenheit``float`Temperature in Fahrenheit`fanVcc``float`Fan VCC voltage`fanVccp``float`Fan VCCP voltage`ipv4``string`IPv4 address`ipv6``string`IPv6 address`ipv6LinkLocal``string`IPv6 link-local address`macAddress``string`Device MAC address`firmwareVersion``string`Firmware version string`hardwareVersion``string`Hardware revision`description``string`Device description/name`uptime``string`System uptime string---

### getMacTable()

[](#getmactable)

Returns the dynamic MAC address table.

```
$entries = $client->getMacTable();

foreach( $entries as $entry ) {
    echo $entry->mac;      // 44:D9:E7:DE:71:A6
    echo $entry->port;     // 1
    echo $entry->fid;      // 100
    echo $entry->ageTimer; // 300
}
```

**Returns:** `\Ocolin\HyconextLite\DTO\MacEntry[]`

PropertyTypeDescription`id``int`Entry index`mac``string`MAC address`fid``int`Forwarding/VLAN ID`port``int`Port number`ageTimer``int`Aging timer in seconds---

### getPortSettings()

[](#getportsettings)

Returns port configuration settings including descriptions and flow control.

```
$ports = $client->getPortSettings();

foreach( $ports as $port ) {
    echo $port->id;              // 1
    echo $port->description;     // LiteAP 5AC 120
    echo $port->spdDuplexActual; // 1000Mbps Full Duplex
    echo $port->flowCtrlCfg;     // On
}
```

**Returns:** `\Ocolin\HyconextLite\DTO\PortSetting[]`

PropertyTypeDescription`id``int`Port number`status``string`Port admin status (Enabled/Disabled)`spdDuplexCfg``string`Configured speed/duplex`spdDuplexActual``string`Actual negotiated speed/duplex`flowCtrlCfg``string`Configured flow control`flowCtrlActual``string`Actual flow control state`description``string`Port description/alias---

### getPortStatus()

[](#getportstatus)

Returns real-time port statistics including packet counters and link state.

```
$ports = $client->getPortStatus();

foreach( $ports as $port ) {
    echo $port->id;         // 1
    echo $port->linkStatus; // 1000Mbps Full Duplex
    echo $port->rxGoodPkt;  // 3350574014
    echo $port->txGoodPkt;  // 3081943164
}
```

**Returns:** `\Ocolin\HyconextLite\DTO\PortStatus[]`

PropertyTypeDescription`id``int`Port number`status``string`Port admin status (Enabled/Disabled)`linkStatus``string`Current link speed and duplex`txGoodPkt``int`Transmitted good packet count`txBadPkt``int`Transmitted bad packet count`rxGoodPkt``int`Received good packet count`rxBadPkt``int`Received bad packet count---

Authentication Notes
--------------------

[](#authentication-notes)

This library authenticates against the device's internal web GUI using the same mechanism as the browser:

- Both username and password are MD5-hashed before transmission
- The device enforces a 15-character maximum password length — longer passwords are silently truncated by the device's login form
- Authentication uses a session cookie which is maintained for the lifetime of the client object
- SSL certificate verification is disabled by default since these devices use self-signed certificates

---

Known Endpoints (Not Yet Implemented)
-------------------------------------

[](#known-endpoints-not-yet-implemented)

The following endpoints have been identified on the device and are candidates for future implementation:

EndpointDescription`poe_port_setting_load.json`POE settings`port_poe_info_load.json`POE port status`qos_get_rate_limit.json`Rate limiting`port_mirror.json`Port mirroring`port_trunk_cfg.json`Link aggregation`port_custom_vlan_load.json`VLAN settings`sfp_info.json`SFP port info`fan_settings.json`Fan settingsContributions welcome.

---

Exception Handling
------------------

[](#exception-handling)

ExceptionThrown When`Ocolin\HyconextLite\Exceptions\ConfigException`Required configuration is missing`Ocolin\HyconextLite\Exceptions\AuthException`Authentication fails`Ocolin\HyconextLite\Exceptions\HyconextException`Unexpected or unparseable device response`GuzzleHttp\Exception\GuzzleException`HTTP transport error---

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance94

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

32d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e97ac0aa452b872ddc3f7f4c56c83852574a27bb74622f8c054d11ca20008fc9?d=identicon)[Ocolin](/maintainers/Ocolin)

---

Tags

http clientnetworkapi clientswitchhyconext

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ocolin-hyconext-lite/health.svg)

```
[![Health](https://phpackages.com/badges/ocolin-hyconext-lite/health.svg)](https://phpackages.com/packages/ocolin-hyconext-lite)
```

###  Alternatives

[sunchayn/nimbus

A Laravel package providing an in-browser API client with automatic schema generation, live validation, and built-in authentication with a touch of Laravel-tailored magic for effortless API testing.

29737.0k](/packages/sunchayn-nimbus)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

232.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
