Skip to content

Remove zigpy zigate support #1555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "external/zigpy-zigate"]
path = external/zigpy-zigate
url = https://github.com/zigbeefordomoticz/zigpy-zigate
5 changes: 3 additions & 2 deletions Classes/ZigpyTransport/AppGeneric.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
import zigpy.types as t
import zigpy.zdo
import zigpy.zdo.types as zdo_types
from zigpy.backups import NetworkBackup

from Classes.ZigpyTransport.instrumentation import write_capture_rx_frames
from Classes.ZigpyTransport.plugin_encoders import (
build_plugin_8002_frame_content, build_plugin_8014_frame_content,
build_plugin_8047_frame_content, build_plugin_8048_frame_content)
from zigpy.backups import NetworkBackup
from Classes.ZigpyTransport.instrumentation import write_capture_rx_frames

LOGGER = logging.getLogger(__name__)

Expand Down
1 change: 1 addition & 0 deletions Classes/ZigpyTransport/Transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import zigpy.application
import zigpy.types as t

from Classes.ZigateTransport.sqnMgmt import sqn_init_stack
from Classes.ZigpyTransport.forwarderThread import (forwarder_thread,
start_forwarder_thread,
Expand Down
1 change: 0 additions & 1 deletion external/zigpy-zigate
Submodule zigpy-zigate deleted from 77ef6f
39 changes: 7 additions & 32 deletions plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
import os
import threading
import time
from importlib.metadata import version as import_version

import z4d_certified_devices

Expand Down Expand Up @@ -141,12 +142,6 @@
from Modules.zigateConsts import CERTIFICATION, HEARTBEAT, MAX_FOR_ZIGATE_BUZY
from Modules.zigpyBackup import handle_zigpy_backup
from Zigbee.zdpCommands import zdp_get_permit_joint_status
from importlib.metadata import version as import_version

#from zigpy_zigate.config import CONF_DEVICE, CONF_DEVICE_PATH, CONFIG_SCHEMA, SCHEMA_DEVICE
#from Classes.ZigpyTransport.Transport import ZigpyTransport
#import asyncio


VERSION_FILENAME = ".hidden/VERSION"

Expand All @@ -160,8 +155,6 @@
ZNP_STARTUP_TIMEOUT_DELAY_FOR_WARNING = 110
ZNP_STARTUP_TIMEOUT_DELAY_FOR_STOP = 160

REQUIRES = ["aiohttp", "aiosqlite>=0.16.0", "crccheck", "pycryptodome", "voluptuous"]

class BasePlugin:
enabled = False

Expand Down Expand Up @@ -568,31 +561,13 @@ def onStart(self):
self.FirmwareVersion = "031c"
self.PluginHealth["Firmware Update"] = {"Progress": "75 %", "Device": "1234"}

elif self.transport == "ZigpyZiGate":
# Zigpy related modules
import zigpy

import zigpy_zigate
from Classes.ZigpyTransport.Transport import ZigpyTransport
from zigpy_zigate.config import (CONF_DEVICE, CONF_DEVICE_PATH,
CONFIG_SCHEMA, SCHEMA_DEVICE)
#self.pythonModuleVersion["zigpy"] = (zigpy.__version__)
#self.pythonModuleVersion["zigpy_zigate"] = (zigpy_zigate.__version__)
check_python_modules_version( self )
self.zigbee_communication = "zigpy"
self.pluginParameters["Zigpy"] = True
self.log.logging("Plugin", "Status", "Start Zigpy Transport on zigate")
self.ControllerLink= ZigpyTransport( self.ControllerData, self.pluginParameters, self.pluginconf, self.processFrame, self.zigpy_chk_upd_device, self.zigpy_get_device, self.zigpy_backup_available, self.log, self.statistics, self.HardwareID, "zigate", Parameters["SerialPort"])
self.ControllerLink.open_cie_connection()
self.pluginconf.pluginConf["ControllerInRawMode"] = True

elif self.transport == "ZigpyZNP":
import zigpy
import zigpy_znp
from zigpy.config import (CONF_DEVICE, CONF_DEVICE_PATH, CONFIG_SCHEMA, SCHEMA_DEVICE)

from Classes.ZigpyTransport.Transport import ZigpyTransport
from zigpy_zigate.config import (CONF_DEVICE, CONF_DEVICE_PATH,
CONFIG_SCHEMA, SCHEMA_DEVICE)

#self.pythonModuleVersion["zigpy"] = (zigpy.__version__)
# https://github.com/zigpy/zigpy-znp/issues/205
#self.pythonModuleVersion["zigpy_znp"] = import_version( 'zigpy-znp' )
Expand All @@ -609,10 +584,10 @@ def onStart(self):
elif self.transport == "ZigpydeCONZ":
import zigpy
import zigpy_deconz
from zigpy.config import (CONF_DEVICE, CONF_DEVICE_PATH, CONFIG_SCHEMA, SCHEMA_DEVICE)

from Classes.ZigpyTransport.Transport import ZigpyTransport
from zigpy_zigate.config import (CONF_DEVICE, CONF_DEVICE_PATH,
CONFIG_SCHEMA, SCHEMA_DEVICE)

#self.pythonModuleVersion["zigpy"] = (zigpy.__version__)
#self.pythonModuleVersion["zigpy_deconz"] = (zigpy_deconz.__version__)
check_python_modules_version( self )
Expand All @@ -625,10 +600,10 @@ def onStart(self):
elif self.transport == "ZigpyEZSP":
import bellows
import zigpy
from zigpy.config import (CONF_DEVICE, CONF_DEVICE_PATH, CONFIG_SCHEMA, SCHEMA_DEVICE)

from Classes.ZigpyTransport.Transport import ZigpyTransport
from zigpy_zigate.config import (CONF_DEVICE, CONF_DEVICE_PATH,
CONFIG_SCHEMA, SCHEMA_DEVICE)

#self.pythonModuleVersion["zigpy"] = (zigpy.__version__)
#self.pythonModuleVersion["zigpy_ezsp"] = (bellows.__version__)
check_python_modules_version( self )
Expand Down
1 change: 0 additions & 1 deletion zigpy_zigate

This file was deleted.