comms/py-elelabs-zigbee-ezsp-utility: new port

PR:	266380
This commit is contained in:
Rozhuk Ivan 2022-09-12 03:16:27 +03:00 committed by Neel Chauhan
parent fde73a13c6
commit 7f1b354e3c
5 changed files with 106 additions and 0 deletions

View File

@ -131,6 +131,7 @@
SUBDIR += pr
SUBDIR += predict
SUBDIR += py-adafruit-ampy
SUBDIR += py-elelabs-zigbee-ezsp-utility
SUBDIR += py-esptool
SUBDIR += py-fritzconnection
SUBDIR += py-hid

View File

@ -0,0 +1,47 @@
PORTNAME= elelabs-zigbee-ezsp-utility
DISTVERSION= 20220218
CATEGORIES= comms python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= rozhuk.im@gmail.com
COMMENT= Elelabs Firmware Update Utility
WWW= https://github.com/Elelabs/elelabs-zigbee-ezsp-utility
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyserial>=3.4:comms/py-pyserial@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}xmodem>=0.4.5:comms/py-xmodem@${PY_FLAVOR}
USES= python:3.6+ shebangfix
USE_GITHUB= yes
GH_ACCOUNT= Elelabs
GH_TAGNAME= 7fc415497f7e2b3410e3350b359ac5c71043399e
USE_PYTHON= flavors
SHEBANG_FILES= Elelabs_EzspFwUtility.py
NO_ARCH= yes
NO_BUILD= yes
post-patch:
@${REINPLACE_CMD} -e "s|data/EFR32|${DATADIR}/EFR32|g" \
${WRKSRC}/Elelabs_EzspFwUtility.py
# This is to prevent Mk/Uses/python.mk do-configure target from firing.
do-configure:
@${ECHO} 'No configure'
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/Elelabs_EzspFwUtility.py ${STAGEDIR}${PREFIX}/bin/
${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/Elelabs_EzspFwUtility.py
(cd ${WRKSRC}/data && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
post-install:
# Regenerate .PLIST.pymodtemp to get all installed files from
# ${STAGEDIR}.
@${FIND} ${STAGEDIR} -type f -o -type l | \
${SORT} | ${SED} -e 's|${STAGEDIR}||' \
>> ${WRKDIR}/.PLIST.mktmp
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1662938072
SHA256 (Elelabs-elelabs-zigbee-ezsp-utility-20220218-7fc415497f7e2b3410e3350b359ac5c71043399e_GH0.tar.gz) = 412f7c5b0b7786c8a6d6f760a3063d4c0e0551d79bd023a731e7200c69324158
SIZE (Elelabs-elelabs-zigbee-ezsp-utility-20220218-7fc415497f7e2b3410e3350b359ac5c71043399e_GH0.tar.gz) = 1244999

View File

@ -0,0 +1,21 @@
The Elelabs Firmware Update Utility is a basic Python 3 script to flash
the the firmware inside a range of Elelabs Zigbee and Thread products to
a newer version.
Currently sold supported products based on Silicon Labs microcontrollers:
Elelabs Zigbee Raspberry Pi Shield ELR023 (EFR32MG13P)
Elelabs Zigbee USB Adapter ELU013 (EFR32MG13P)
Previously sold supported products based on Silicon Labs microcontrollers:
Elelabs Zigbee Raspberry Pi Shield ELR022 (EFR32MG1B)
Elelabs Zigbee USB Adapter ELU012 (EFR32MG1B)
Elelabs Zigbee Raspberry Pi Shield EZBPIS (EM357)
Elelabs Zigbee USB Adapter EZBUSBA (EM357)
Disclaimer: This utility should also work with other generic EZSP
(EmberZNet Serial Protocol) or Spinel (Openthread Serial Protocol) based
adapters and modules from other vendors, however firmwares for products
not from Elelabs are not provided here and there is no guarantees that
it will work with non-Elelabs products. Be wanted that you may void your
warranty and even brick your adapter if the firmware update is not
supported by your mnaufacturer.

View File

@ -0,0 +1,34 @@
[
{ type: install
message: <<EOM
!!! ATTENTION !!!
Make sure that you are flashing proper F/W.
There is different pinout in different images and you may loose
connection to EFR32 chip after flashing.
Extra F/W sources:
https://www.zigbee2mqtt.io/guide/adapters/
https://github.com/xsp1989/zigbeeFirmware/
https://github.com/grobasoz/zigbee-firmware
https://github.com/zha-ng/EZSP-Firmware
https://github.com/MattWestb/EFR32-FW
https://github.com/walthowd/husbzb-firmware
Please note if you are using the EZSP v8 firmware you will also have to
add the following to your configuration.yaml for the Home Assistant
ZHA integration to load successfully.
zha:
zigpy_config:
ezsp_config:
CONFIG_PACKET_BUFFER_COUNT: 64
CONFIG_MAX_END_DEVICE_CHILDREN: 32
CONFIG_SOURCE_ROUTE_TABLE_SIZE: 200
EOM
}
]