Skip to main content

A NetBox plugin for tracking Z-Wave devices and networks

Project description

NetBox Z-Wave Plugin

A NetBox plugin for tracking Z-Wave devices and networks. This plugin allows you to manage Z-Wave networks, devices, command classes, and associations within your NetBox instance.

Features

  • Z-Wave Networks: Track Z-Wave networks with Home ID, Network ID, and security settings
  • Z-Wave Devices: Manage individual Z-Wave devices with detailed product information
  • Command Classes: Track supported command classes for each device
  • Associations: Manage device associations and routing relationships
  • REST API: Full REST API support for all models
  • Web Interface: Integrated web interface with NetBox's UI

Installation

  1. Install the plugin package:

    pip install netbox-zwave
    
  2. Add the plugin to your NetBox configuration:

    PLUGINS = [
        'netbox_zwave',
    ]
    
  3. Run database migrations:

    python manage.py migrate
    
  4. Restart NetBox:

    sudo systemctl restart netbox
    

Configuration

The plugin supports the following configuration options in your NetBox configuration:

PLUGINS_CONFIG = {
    'netbox_zwave': {
        'enable_auto_discovery': False,  # Enable automatic device discovery
        'default_network_id': 1,         # Default network ID for new devices
        'device_timeout': 30,            # Device timeout in seconds
    }
}

Models

Z-Wave Network

  • Network ID (1-255)
  • Home ID (hexadecimal)
  • Status (Active, Inactive, Maintenance)
  • Security settings (S0, S2)
  • Controller node ID

Z-Wave Device

  • Node ID (1-232)
  • Device type (Controller, Router, End Device, Sleeping End Device)
  • Product information (Manufacturer ID, Product Type, Product ID)
  • Firmware and hardware versions
  • Capabilities (Security, Routing, Beaming, etc.)
  • Status information (Battery level, Signal strength, Last seen)

Command Class

  • Command Class ID and name
  • Version support
  • Security and control capabilities

Association

  • Source and target devices
  • Association group ID
  • Relationship descriptions

API Endpoints

The plugin provides REST API endpoints for all models:

  • /api/plugins/netbox-zwave/networks/
  • /api/plugins/netbox-zwave/devices/
  • /api/plugins/netbox-zwave/command-classes/
  • /api/plugins/netbox-zwave/associations/

Development

Setup Development Environment

  1. Clone the repository:

    git clone https://gitlab.clockworx.org/dawsonra/netbox-zwave.git
    cd netbox-zwave
    
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install development dependencies:

    pip install -e ".[dev]"
    

Running Tests

pytest

Code Style

The project uses Black for code formatting and flake8 for linting:

black .
flake8 .

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Support

For support and questions:

  • Create an issue on GitLab
  • Check the NetBox documentation for plugin development
  • Review the Z-Wave specification for device details

Changelog

0.1.5

  • Fixed ChoiceSet classes by adding missing CHOICES attributes
  • Resolved Django model import errors during NetBox startup
  • Fixed ZwaveNetworkStatusChoices, ZwaveDeviceStatusChoices, and ZwaveDeviceTypeChoices

0.1.4

  • Removed NetBox dependency (NetBox is not distributed via PyPI)
  • Added Django dependency for plugin compatibility
  • Fixed installation issues by removing non-existent NetBox package dependency

0.1.3

  • Fixed NetBox dependency constraint to be more specific (>=4.0.0,<5.0.0)
  • Resolved dependency conflicts during installation

0.1.2

  • Fixed repository URLs to point to correct GitLab repository
  • Updated homepage, repository, documentation, and bug tracker links
  • Corrected development setup instructions

0.1.0

  • Initial release
  • Basic Z-Wave network and device management
  • Command class and association tracking
  • REST API support
  • Web interface integration

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netbox_zwave-0.1.10.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netbox_zwave-0.1.10-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file netbox_zwave-0.1.10.tar.gz.

File metadata

  • Download URL: netbox_zwave-0.1.10.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for netbox_zwave-0.1.10.tar.gz
Algorithm Hash digest
SHA256 b07f417434b45b3046c53e9f2991370d30b6c36690279a1d42854d481cdea6ff
MD5 552be22d0bc255f7403329ec2da0597a
BLAKE2b-256 84aa7d8dd675a733415c81459821f114fb9e017932957393ec70775557951742

See more details on using hashes here.

File details

Details for the file netbox_zwave-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: netbox_zwave-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for netbox_zwave-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 55e2a9d897eb68980e9c8b0f2f6a51a70a3ab2b203b8c9638d4a018ce159fe55
MD5 caea28a147d4784673fb9cdfb0f00566
BLAKE2b-256 52036df3e26d2c09e5073e6907eee71498d2348c2bb00f359b6dbb2fce720068

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page