Skip to content

Commit

Permalink
Remove zigbee code
Browse files Browse the repository at this point in the history
Moved to zigpy
  • Loading branch information
rcloran committed Feb 5, 2018
1 parent 4cf1237 commit dc9c00f
Show file tree
Hide file tree
Showing 43 changed files with 81 additions and 5,310 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Expand Up @@ -41,10 +41,9 @@ htmlcov/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -3,8 +3,8 @@
[![Build Status](https://travis-ci.org/rcloran/bellows.svg?branch=master)](https://travis-ci.org/rcloran/bellows)
[![Coverage](https://coveralls.io/repos/github/rcloran/bellows/badge.svg?branch=master)](https://coveralls.io/github/rcloran/bellows?branch=master)

`bellows` is a Python 3 project to implement ZigBee support for EmberZNet
devices using the EZSP protocol.
`bellows` is a Python 3 project to implement support for EmberZNet devices
using the EZSP protocol.

The goal is to use this project to add support for the ZigBee Network
Coprocessor (NCP) in devices like the [Linear/Nortek/GoControl HubZ/QuickStick
Expand Down
4 changes: 2 additions & 2 deletions bellows/cli/application.py
Expand Up @@ -7,7 +7,7 @@

import bellows.ezsp
import bellows.zigbee.application
import bellows.zigbee.endpoint
import zigpy.endpoint
from . import opts
from . import util
from .main import main
Expand Down Expand Up @@ -100,7 +100,7 @@ def print_clusters(title, clusters):
for epid, ep in dev.endpoints.items():
if epid == 0:
continue
if ep.status == bellows.zigbee.endpoint.Status.NEW:
if ep.status == zigpy.endpoint.Status.NEW:
click.echo(" %s: Uninitialized")
else:
click.echo(
Expand Down
21 changes: 0 additions & 21 deletions bellows/types/basic.py
@@ -1,6 +1,3 @@
import struct


class int_t(int): # noqa: N801
_signed = True

Expand Down Expand Up @@ -83,24 +80,6 @@ class uint64_t(uint_t): # noqa: N801
_size = 8


class Single(float):
def serialize(self):
return struct.pack('<f', self)

@classmethod
def deserialize(cls, data):
return struct.unpack('<f', data)[0], data[4:]


class Double(float):
def serialize(self):
return struct.pack('<d', self)

@classmethod
def deserialize(cls, data):
return struct.unpack('<d', data)[0], data[8:]


class LVBytes(bytes):
def serialize(self):
return bytes([
Expand Down
23 changes: 5 additions & 18 deletions bellows/types/named.py
@@ -1,8 +1,13 @@
import enum

import zigpy.types as ztypes

from . import basic


EmberEUI64 = ztypes.EUI64


class NcpResetCode(basic.uint8_t, enum.Enum):
# Reset and Error Codes for NCP
RESET_UNKNOWN_REASON = 0x00
Expand Down Expand Up @@ -46,24 +51,6 @@ class EmberMulticastId(basic.uint16_t):
pass


class EmberEUI64(basic.fixed_list(8, basic.uint8_t)):
# EUI 64-bit ID (an IEEE address).
@classmethod
def deserialize(cls, data):
r, data = super().deserialize(data)
return cls(r[::-1]), data

def serialize(self):
assert self._length == len(self)
return b''.join([i.serialize() for i in self[::-1]])

def __repr__(self):
return ':'.join('%02x' % i for i in self)

def __hash__(self):
return hash(repr(self))


class EmberLibraryStatus(basic.uint8_t):
# The presence and status of the Ember library.
pass
Expand Down
223 changes: 0 additions & 223 deletions bellows/zigbee/appdb.py

This file was deleted.

0 comments on commit dc9c00f

Please sign in to comment.