Skip to content

Commit

Permalink
Pipiche38/pre stable6.1.003 (#1129)
Browse files Browse the repository at this point in the history
* update readme with Windows page
* update release date
* make it Windows compatible

Co-authored-by: Pipiche <pipiche38@users.noreply.github.com>
  • Loading branch information
pipiche38 and pipiche38 authored Apr 5, 2022
1 parent 14dcb6b commit 1d90df8
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 17 deletions.
23 changes: 14 additions & 9 deletions Classes/ZigpyTransport/zigpyThread.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

import asyncio
import binascii
import contextlib
import json
import queue
import sys
import time
import traceback
import contextlib
from typing import Any, Optional

import zigpy.device
Expand All @@ -24,26 +25,30 @@
import zigpy.zcl
import zigpy.zdo
import zigpy.zdo.types as zdo_types
from Classes.ZigpyTransport.AppBellows import App_bellows
from Classes.ZigpyTransport.AppDeconz import App_deconz
from Classes.ZigpyTransport.AppZigate import App_zigate
from Classes.ZigpyTransport.AppZnp import App_znp
from Classes.ZigpyTransport.AppDeconz import App_deconz
from Classes.ZigpyTransport.AppBellows import App_bellows
from Classes.ZigpyTransport.nativeCommands import NATIVE_COMMANDS_MAPPING, native_commands
from Classes.ZigpyTransport.nativeCommands import (NATIVE_COMMANDS_MAPPING,
native_commands)
from Classes.ZigpyTransport.plugin_encoders import (
build_plugin_0302_frame_content,
build_plugin_8009_frame_content,
build_plugin_0302_frame_content, build_plugin_8009_frame_content,
build_plugin_8011_frame_content,
build_plugin_8043_frame_list_node_descriptor,
build_plugin_8045_frame_list_controller_ep,
)
build_plugin_8045_frame_list_controller_ep)
from Classes.ZigpyTransport.tools import handle_thread_error
from zigpy.exceptions import DeliveryError, InvalidResponse
from zigpy_znp.exceptions import CommandNotRecognized, InvalidCommandResponse, InvalidFrame
from zigpy_znp.exceptions import (CommandNotRecognized, InvalidCommandResponse,
InvalidFrame)

MAX_CONCURRENT_REQUESTS_PER_DEVICE = 1
CREATE_TASK = True

def start_zigpy_thread(self):

if sys.platform == "win32" and (3, 8, 0) <= sys.version_info < (3, 9, 0):
asyncio.set_event_loop_policy( asyncio.WindowsSelectorEventLoopPolicy() )

self.zigpy_loop = get_or_create_eventloop()
self.log.logging("TransportZigpy", "Debug", "start_zigpy_thread - Starting zigpy thread")
self.zigpy_thread.start()
Expand Down
5 changes: 5 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ Release Numbering
- Odd numbers --> Stable/6
- Even numbers --> Beta/6

## 5 April 2022 - stable6.1.003

- [Technical] - Make plugin working on Windows system
- [Technical] - Rely on requirements.txt for python modules installation

## 3 April 2022 - stable6.1.002
- [Issue] - Fix potential issue around Firmware decoding, and rest-api.
- [Technical] - If plugin not started after 120s, then stop
Expand Down
18 changes: 11 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ Zigbee for Domoticz a plugin for [Domoticz home automation software](https://www

This plugin is an evolution of the mature Zigate plugin for Domoticz, which will continue to manage and handle Zigate in native mode, while Texas Instruments's will be handle through unified communication libraries from the [zigpy](https://github.com/zigpy/zigpy) project.

For __Windows users__, please check the [Plugin V6 running on Windows](<https://zigbeefordomoticz.github.io/wiki/en-eng/Plugin_Version6_on_Windows.htmPlugin> V6 running on Windows

## Pre requisities

* Domoticz 2021.1 or above
* You need Python 3.7 at least
* Zigpy layers will requires additional python3 modules to be install:

`sudo pip3 install voluptuous pycrypto aiosqlite crccheck pyusb attrs aiohttp pyserial-asyncio`
Go to the plugin Home directory ( domoticz/plugins/Domoticz-Zigate or Domoticz-Zigbee)

`sudo pip3 install -r requirements.tx`

## Plugin first installation or first time on release 6.xxx (stable6)

Expand Down Expand Up @@ -109,17 +113,17 @@ Your first place to get support is via the Forums.

In order to provide stability and also provide more recent development, Zigbee for Domoticz plugin has the following channels

* **beta6**: Current developpement branch and allow TI CCxxxx , Silicon Labs and deConz coordinators on top of ZiGate coordinators.
* **stable6**: default branch for
* __beta6__: Current developpement branch and allow TI CCxxxx , Silicon Labs and deConz coordinators on top of ZiGate coordinators.
* __stable6__: default branch for
* [ZiGate](https://zigate.fr) models knwon today,
* [Electrolama](https://electrolama.com/) models as well as the Texas Instrument CCxxx based coordinators,
* [Elelabs](https://elelabs.com/products/elelabs-usb-adapter.html) as well as the Silicon Labs based coordinators.

* Not supported
* **stable5**: Support ALL ZiGate models known today and requires Domoticz 2020.x at minima (not supported anymore)
* ***beta***: lastest version 6.0.15 - February 2022
* ***stable***: latest version 4.11. - Feb. 2021) deprecated
* ***master***: latest version 3.0. - Sept. 2018) deprecated
* __stable5__: Support ALL ZiGate models known today and requires Domoticz 2020.x at minima (not supported anymore)
* *__beta__*: lastest version 6.0.15 - February 2022
* *__stable__*: latest version 4.11. - Feb. 2021) deprecated
* *__master__*: latest version 3.0. - Sept. 2018) deprecated

## How to switch from one channel to the other

Expand Down
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ aiosqlite==0.17.0
async-timeout==4.0.2
attrs==21.4.0
charset-normalizer==2.0.10
click==8.0.4
coloredlogs==15.0.1
crccheck==1.1
frozenlist==1.2.0
multidict==5.2.0
pyserial==3.5
pyserial-asyncio==0.6
pyserial-asyncio!=0.5
pyusb==1.2.1
typing-extensions==4.0.1
voluptuous==0.12.2
yarl==1.7.2
pycryptodome==3.12.0
22 changes: 22 additions & 0 deletions symlink.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
REM This tool allows the creation of the Windows Symbolic links after a git clone

del dns
mklink /D dns external\dnspython\dns

del bellows
mklink /D bellows external\bellows\bellows

del serial
mklink /D serial external\pyserial\serial

del zigpy
mklink /D zigpy external\zigpy\zigpy

del zigpy_deconz
mklink /D zigpy_deconz external\zigpy-deconz\zigpy_deconz

del zigpy_zigate
mklink /D zigpy_zigate external\zigpy-zigate\zigpy_zigate

del zigpy_znp
mklink /D zigpy_znp external\zigpy-znp\zigpy_znp

0 comments on commit 1d90df8

Please sign in to comment.