npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

homebridge-smartika

v1.0.1

Published

Homebridge plugin for Smartika smart lighting hub with 100% local control (no cloud required). Supports lights, fans, and smart plugs.

Downloads

199

Readme

Homebridge Smartika

npm npm License: MIT

A Homebridge plugin for Smartika (Artika) smart home devices with 100% local control — no cloud required!

Features

  • 🏠 100% Local Control — All communication stays on your local network
  • Auto-Discovery — Automatically finds your Smartika hub on the network
  • �💡 Lights — On/off, brightness, and color temperature control
  • 🌀 Ceiling Fans — On/off and speed control
  • 🔌 Smart Plugs — On/off control
  • 🔄 Real-time Updates — Device status polling keeps HomeKit in sync
  • 🔐 Secure — AES-128-CBC encrypted communication with your hub
  • 🛠️ CLI Tool — Command-line interface for debugging and direct control

Supported Devices

| Category | Devices | | --------------- | --------------------------------------------------------------------------------------------------------------------- | | Lights | Champagne Track, Mini Wall Washer, Glowbox, Recessed Lighting, Pendants (1-5), Smart Bulb, Spotlight, Sandwich Lights | | Fans | Ceiling Fan | | Plugs | Smart Plug | | Thermostats | Thermostat, Smart Heater (coming soon) |

Requirements

  • Homebridge v1.8.0 or later
  • Node.js v18.20.4, v20.16.0, or v22.5.1+
  • Smartika Hub on your local network

Installation

Using Homebridge Config UI X (Recommended)

  1. Search for "Smartika" in the Plugins tab
  2. Click Install
  3. Configure the plugin with your hub's IP address

Manual Installation

sudo npm install -g homebridge-smartika

Configuration

Auto-Discovery (Recommended)

The plugin can automatically discover your Smartika hub on the network — no manual configuration needed! Simply install the plugin and restart Homebridge.

The hub broadcasts its presence on UDP port 4156 every ~10 seconds. If auto-discovery doesn't work (e.g., due to network segmentation or firewall rules), you can configure the hub IP manually.

Finding Your Hub IP Address (Manual)

If auto-discovery doesn't work, find your hub's IP address by:

  1. Checking your router's DHCP client list
  2. Using a network scanner app
  3. Looking for a device with MAC address starting with 00:12:4B

Using Homebridge Config UI X

  1. Go to the Plugins tab
  2. Find Homebridge Smartika and click Settings
  3. Enter your hub's IP address
  4. Click Save

Manual Configuration

Add the following to your config.json:

{
    "platforms": [
        {
            "platform": "Smartika",
            "name": "Smartika Hub"
        }
    ]
}

With manual hub IP (if auto-discovery doesn't work):

{
    "platforms": [
        {
            "platform": "Smartika",
            "name": "Smartika Hub",
            "hubHost": "10.0.0.122"
        }
    ]
}

With all options:

Configuration Options

| Option | Required | Default | Description | | ----------------- | -------- | ---------------- | ------------------------------------------------------------ | | platform | ✅ | — | Must be "Smartika" | | name | ❌ | "Smartika Hub" | Display name in Homebridge logs | | hubHost | ❌ | Auto-discover | IP address of your Smartika hub (auto-discovered if not set) | | hubPort | ❌ | 1234 | TCP port for hub communication | | pollingInterval | ❌ | 5000 | Status polling interval in milliseconds | | debug | ❌ | false | Enable verbose debug logging |

CLI Tool

This plugin includes a powerful command-line interface for direct hub control and debugging.

Installation

The CLI is installed automatically with the plugin:

# If installed globally
smartika-cli --help

# Or run directly
npx smartika-cli --help

Usage

# Discover hubs on the network (no IP needed)
smartika-cli hub-discover

# Run commands on a specific hub
smartika-cli <hub-ip> <command> [arguments...]

Examples

# Discover Smartika hubs on your network
smartika-cli hub-discover

# Get hub information (ID, MAC, firmware, encryption key)
smartika-cli 10.0.0.122 hub-info

# Get status of all devices
smartika-cli 10.0.0.122 status

# Turn on a device
smartika-cli 10.0.0.122 on 0x28cf

# Set brightness to 50%
smartika-cli 10.0.0.122 dim 50% 0x28cf

# Set color temperature (0=warm, 255=cool)
smartika-cli 10.0.0.122 temp 128 0x28cf

# List registered devices
smartika-cli 10.0.0.122 list

# Get firmware version
smartika-cli 10.0.0.122 firmware

# Preview what devices will appear in HomeKit
smartika-cli 10.0.0.122 homekit-preview

# Interactive pairing wizard for new devices
smartika-cli 10.0.0.122 pair

Available Commands

| Category | Command | Description | | ----------------- | -------------- | ----------------------------------------- | | Hub Discovery | hub-discover | Find hubs on the network (no IP needed) | | System | hub-info | Get hub ID, MAC, firmware, encryption key | | | ping | Send keep-alive ping | | | firmware | Get hub firmware version | | | join-enable | Enable device pairing mode | | | join-disable | Disable device pairing mode | | Device | discover | Discover active devices | | | status | Get device status | | | on | Turn device(s) on | | | off | Turn device(s) off | | | dim | Set light brightness | | | temp | Set color temperature | | | fan | Set fan speed | | Database | list | List registered devices | | | db-add | Add device(s) to database | | | db-remove | Remove device(s) from database | | Groups | groups | List all groups | | | group-read | Read group members | | | group-create | Create a new group | | | group-update | Update group members | | | group-delete | Delete group(s) | | HomeKit | homekit-preview | Preview HomeKit accessories | | Pairing | pair | Interactive wizard to pair new devices |

Troubleshooting

Auto-Discovery Not Working

  1. macOS firewall — On macOS, you may need to allow Node.js to receive incoming connections:
    • Open System SettingsNetworkFirewallOptions
    • Add Node.js (run which node to find the path) and set to Allow incoming connections
    • Or run the CLI with sudo to bypass the firewall temporarily
  2. Check firewall — Ensure UDP port 4156 is not blocked
  3. Same network — Hub and Homebridge must be on the same subnet
  4. Use CLI to test — Verify discovery works:
    # May need sudo on macOS if firewall blocks UDP
    sudo smartika-cli hub-discover
  5. Fallback to manual — Configure hubHost manually if discovery fails

Hub Not Connecting

  1. Verify the IP address — Make sure your hub's IP hasn't changed (consider setting a DHCP reservation)
  2. Check network connectivity — Ensure Homebridge can reach the hub: ping 10.0.0.122
  3. Test with CLI — Use the CLI tool to verify connectivity:
    smartika-cli 10.0.0.122 ping
  4. Check firewall — Ensure port 1234 (TCP) is not blocked

Devices Not Appearing

  1. Check device registration — Devices must be registered in the hub's database:
    smartika-cli 10.0.0.122 list
  2. Pair new devices — Use the interactive pairing wizard:
    smartika-cli 10.0.0.122 pair
    Or manually discover and add:
    smartika-cli 10.0.0.122 discover
    smartika-cli 10.0.0.122 db-add 0x28cf
  3. Preview HomeKit accessories — Check what will appear in HomeKit:
    smartika-cli 10.0.0.122 homekit-preview
  4. Restart Homebridge — After adding devices, restart Homebridge to re-discover

Status Not Updating

  1. Increase polling frequency — Reduce pollingInterval to 2000-3000ms
  2. Enable debug logging — Set "debug": true to see communication details
  3. Check for errors — Look for error messages in Homebridge logs

Debug Mode

Enable debug logging to see detailed communication:

{
    "platform": "Smartika",
    "hubHost": "10.0.0.122",
    "debug": true
}

This will log:

  • Connection status
  • Request/response packets (hex)
  • Device status updates
  • Error details

Technical Details

Protocol

The plugin communicates with the Smartika hub using:

  • Transport: TCP on port 1234
  • Encryption: AES-128-CBC with key derived from hub MAC address
  • Protocol: Custom binary protocol with XOR checksum

Security

  • The encryption key is derived from your hub's unique MAC address using 8-pass AES-ECB
  • All commands are encrypted before transmission
  • No data is sent to external servers

Architecture

┌─────────────────┐     ┌──────────────────┐     ┌─────────────┐
│   Apple Home    │────▶│    Homebridge    │────▶│  Smartika   │
│     (iOS)       │◀────│    Plugin        │◀────│    Hub      │
└─────────────────┘     └──────────────────┘     └─────────────┘
        HomeKit              TCP/AES-CBC           Local Network

Development

Project Structure

smartika-homebridge/
├── src/
│   ├── index.js                 # Plugin entry point
│   ├── settings.js              # Plugin constants
│   ├── SmartikaPlatform.js      # Main platform class
│   ├── SmartikaHubConnection.js # Hub communication
│   ├── SmartikaCrypto.js        # AES encryption
│   ├── SmartikaProtocol.js      # Binary protocol
│   └── accessories/
│       ├── SmartikaLightAccessory.js
│       ├── SmartikaFanAccessory.js
│       └── SmartikaPlugAccessory.js
├── tools/
│   └── smartika-cli.js          # CLI tool
├── test/
│   ├── test-protocol.js
│   └── test-crypto.js
├── config.schema.json           # Homebridge UI schema
└── package.json

Building & Testing

# Clone the repository
git clone https://github.com/pblondin/smartika-homebridge.git
cd smartika-homebridge

# Install dependencies
npm install

# Run tests
npm test
npm run test:crypto

# Lint code
npm run lint

# Link for local development
npm link

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests and linting
  5. Submit a pull request

License

MIT License — see LICENSE for details.

Acknowledgments

  • Homebridge team for the amazing platform
  • Smartika/Artika for the hardware

Note: This plugin is not officially affiliated with or endorsed by Smartika or Artika. Use at your own risk.