free-your-silvercrest
Freeing the Silvercrest (Lidl/Tuya) Smart Home Gateway from the cloud
A collection of scripts/programs for freeing your Silvercrest Gateway from the cloud.
More information available here:
Freeing the Silvercrest (Lidl/Tuya) Smart Home Gateway from the cloud
A collection of scripts/programs for freeing your Silvercrest Gateway from the cloud.
More information available here:
Hello,
After doing all the steps i try to add a new user, but get read only system, then try change the password, i get sucess, but then after reboot, cannot login with the new password or the one the i retrive from the script.
The gateway appear to work normally but cannot login via console or ssh..
Thanks
From /tmp (that being deleted after reboot and not saved in the flash).
dd if=/dev/mtd0 of=/tmp/dmtd0.bin
for mtd0 - mtd4
Install tftpd64.464 and confing your eth network.
tftp -l /tmp/dmtd0.bin -r dmtd0.bin -p 192.168.2.10
For dmtd0.bin - dmtd4.bin
The tftp is one busybox version and have lesser parameters and dont printing command errors so well but looks working OK.
I have 5 bin files that looks good but i have not verifying if they is 100% OK.
Some like trying verifying that is working ???
ZHA is working great but my docker under windows is making strange things so cant testing so much.
Great work done !!
Based on this thread, we managed to get custom firmware running on the EFR32 Zigbee chip in the Lidl Gateway.
I have made a script to perform the upgrade, and a guide on how to use it. It also includes sx
compiled for the Realtek SoC on the device. This is needed for uploading the firmware with xmodem.
Since a lot of useful information is already in this repo, I guess it makes sense to use it as a base for further development. Feel free to provide feedback if you have any!
After not being able to connect to port 8888 after a reboot, I tried to start serialgateway manually:
# /bin/sh /tuya/serialgateway
/tuya/serialgateway: line 1: syntax error: "(" unexpected
Could it be that there's an error in the provided prebuilt serialgateway.bin?
Hello, I have a problem assigning any channel other than 25 to TYGWZ-01 coordinator.
I've used this gateway with my old network at channel 25. Now I try to build a new network with it in the neighboring room, while all old devices vere deleted from the ZHA configuration for this coordinator, the configuration was deleted also, and the coordinator is moved to brand new raspberry pi.
Just installed fresh container image for HA and try to add the coordinator to ZHA. But no metter what I try it keeps assigning channel 25 to it!
How do I make it run channel 23 then?
My config:
zha:
zigpy_config:
network:
channel: 23 # What channel the radio should try to use.
channels: [21, 22, 23] # Channel mask
I found your website and followed everything to the letter. I managed to get the password, login, put serialgateway in the /tuya/ dir and execute the script. I get a new tuya_start.original.sh, and anew tuya_start.sh. When I use cat to check the new files I think the output is correct:
But: After reboot I can't reach the unit through home assistant, and i am still able to SSH to port 2333. SO something is not completely working. Do you have a hint for me to take me to the next and last step?
Thanks!
Hi,
can someone post the content of the original tuya_start.sh? The if clause got ignored while restoring back to factory and thus it has been overwritten :(
From the article to Gaining access to the device
Quote
"3) We replaced the /etc/passwd symlink with a passwd file we created with a known root password."
Question: the password file to be put in the unsquashfs filesystem structure, is it need to be format as shardow passwd file or just plain text format like in the old-time linux passwd file. where should it be located in the file system i.e. in root directory and change the symlink to /etc/passwd
Quote
"6) Finally we TFTP'd the newroot.bin file to the device and used the bootloader command FLW to write it to flash."
Can you outline the process to in the Quote (step 6 in the article)
Currently I have a dump of the device from your dump_flash.py and unsquashfs it into my virtualbox debian vm
I got the directory contains all the files from the SquashFS dumped. as I'm not very familiar with the process of flashing the device with tftp I need more detail on how to do that on my device.
I got device but can not get the root password fron the process you mentioned in the article so the alternative is to reflash it with modified SquashFS flash image to gain initial access to the device.
I hope this will also help other that fail to get root password of the device as I am.
Thanks very much.
Hi there
I follow the procedure to get the root passwd however the passwd I got doesn't work. Not sure if I missed something .
I did as follow:
SO I got stuck here for now.
Can you help?
first of all, thank you for the article. Just a ticket to warn. I had the bad idea to make an ssh-copy-id ... I'm not going to be able to access ssh anymore :'(
From version 3.10 on, python module(s) that use the # variant when parsing arguments need to have a #define PY_SSIZE_T_CLEAN before including Python.h. This is not done in pycrypto library and unfortunately this library is archived.
This patch fixes a SystemError when creating the AES cipher instance in the decode script by switching to cryptography library, a more popular and active python library than pycrypto.
After a successful retrieval of the password for Gateway1 (I have 2 of these), I got a login prompt and tried to login with root/password obtained via the serial connection. Don't know what exactly happened next, but currently the gateway seems to loop. I'm still able to retrieve the keys after using
The loop looks like
Booting...
Booting...
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ @ chip__no chip__id mfr___id dev___id cap___id size_sft dev_size chipSize @ 0000000h 0c84018h 00000c8h 0000040h 0000018h 0000000h 0000018h 1000000h @ blk_size blk__cnt sec_size sec__cnt pageSize page_cnt chip_clk chipName @ 0010000h 0000100h 0001000h 0001000h 0000100h 0000010h 000004eh GD25Q128 @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ DDR1:32MB
---RealTek(RTL8196E)at 2021.01.21-19:59+0800 v3.4T-pre2 16bit P0phymode=01, embedded phy check_image_header return_addr:05010000 bank_offset:00000000 no sys signature at 00010000! P0phymode=01, embedded phy
SPI flash(GD25Q128) was found at CS0, size 0x1000000 boot+cfg offset=0x0 size=0x20000 erasesize=0x10000 linux offset=0x20000 size=0x1e0000 erasesize=0x10000 rootfs offset=0x200000 size=0x200000 erasesize=0x10000 tuya-label offset=0x400000 size=0x20000 erasesize=0x10000 jffs2-fs offset=0x420000 size=0xbe0000 erasesize=0x10000 5 rtkxxpart partitions found on MTD device flash_bank_1 Creating 5 MTD partitions on "flash_bank_1": 0x000000000000-0x000000020000 : "boot+cfg" 0x000000020000-0x000000200000 : "linux" 0x000000200000-0x000000400000 : "rootfs" 0x000000400000-0x000000420000 : "tuya-label" 0x000000420000-0x000001000000 : "jffs2-fs" PPP generic driver version 2.4.2 nf_conntrack version 0.5.0 (432 buckets, 1728 max) ip_tables: (C) 2000-2006 Netfilter Core Team TCP: cubic registered NET: Registered protocol family 17 l2tp_core: L2TP core driver, V2.0 8021q: 802.1Q VLAN Support v1.8 Realtek FastPath:v1.03
Probing RTL819X NIC-kenel stack size order[1]... eth0 added. vid=9 Member port 0x10f... eth1 added. vid=8 Member port 0x10...
Booting...
Thanks for your time and effort in this project! I've 2 MOES branded Zigbee bridges that are internally the same as you use.
Let's start that I was able to obtain the root password from bridge nummer 1 (in another post I will come back to that one). Following thw same procedure I'm able to get both KEK/AUSKEY, but when re-using the script to decrypt the root password, I run into a problem:
root# python3 lidl_auskey_decode.py
Enter KEK hex string line>5A5AA5A5 401A4000 8F7B238C 001AD582
Encoded aus-key as hex string line 1>13F436F6 E44A50B4 5AF2F409 7AE9D394
Encoded aus-key as hex string line 2>8E335DD1 C67C31D9 63B3EBD5 2C7C790A
Traceback (most recent call last):
File "lidl_auskey_decode.py", line 64, in
Any ideas ?
When I try to read an attribute (e.g. app_version from Aqara Weather sensor)
I constantly get the following error in Home Assistant log:
Logger: homeassistant.components.websocket_api.http.connection
Source: components/zha/api.py:679
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 9:19:53 AM (4 occurrences)
Last logged: 9:26:11 AM
[547770400288] Error handling message: Unknown error
[547681024800] Error handling message: Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/zha/api.py", line 679, in websocket_read_zigbee_cluster_attributes
success, failure = await cluster.read_attributes(
File "/usr/local/lib/python3.9/site-packages/zigpy/zcl/__init__.py", line 297, in read_attributes
result = await self.read_attributes_raw(to_read, manufacturer=manufacturer)
File "/usr/local/lib/python3.9/site-packages/zigpy/device.py", line 287, in request
raise zigpy.exceptions.DeliveryError(
zigpy.exceptions.DeliveryError: [0x2513:1:0x0000]: Message send failure
Don't know if it is a problem in HA, in ZBGW or what... 😃
Hi Paul,
Amazing project! I already have a lidl silver crest gateway up and running which I wish to integrate with Home Assistant.
Would appreciate a step by step n00b proof guide
.
Thanks
Cheers,
Pictures of Tuya TYGWZ-01 / TuyaGo TYGWZ01 and links to official product page is missing project website:
https://paulbanks.org/projects/lidl-zigbee/
Suggest mention "Tuya TYGWZ-01 (also known as TuyaGo TYGWZ01)" as well as add links plus one or a few images:
Product dimensions:90x90x23mm (Package dimensions:1000x1000x50mm)
https://go.tuya.com/en/productDetail?code=83jt6kkktau3
https://zigbeealliance.org/zigbee_products/tuya-smart-gateway/
The obvious advantage of the original TYGWZ-01 (non-Lidl/Silvercrest) gateway is its availability outside of Europe.
Such wide availability should benefit all people and project whose goal it is to hack it for other purposes than its intended use.
It is also sold under different rebranded names such as Lonsonho, Moes, BENEXMART, Kstyhome, Moniclern, OWSOO, Zemismart, as well as in combination with Zigbee devices:
https://www.amazon.com/Zigbee-Switch-standard-Control-gateway/dp/B082B2FT6V
https://www.amazon.com/Gateway-Control-Temperature-humidity-gateway/dp/B083PRPYQ8/
https://www.amazon.com/OWSOO-Gateway-Wireless-Control-Compatible/dp/B08YNG15XQ
https://www.amazon.com/Moniclern-Powered-Gateway-Connection-Products/dp/B08HV1BNLG
https://www.amazon.com/Kstyhome-Powered-Gateway-Connection-Products/dp/B08XY37L49/
https://www.amazon.com/OWSOO-Powered-Gateway-Connection-Products/dp/B08768DMJJ/
https://www.amazon.com/OWSOO-Temperature-Humidity-Automation-Security/dp/B0868QJ1NV/
https://www.amazon.com/OWSOO-Temperature-Humidity-Automation-Security/dp/B0868NZHJZ/
As you all probably already know TYGWZ01 is also available in online stores in the European Union and the United Kingdom:
https://www.amazon.de/ZigBee-Gateway-zentraler-Controller-Hub-ZigBee-Ger%C3%A4te/dp/B083584M99/
https://www.amazon.co.uk/Zigbee-Gateway-Central-Controller-Devices/dp/B083584M99/
https://www.amazon.co.uk/TYGWZ-01-Gateway-Central-Controller-Devices/dp/B07N65MXD4/
https://www.amazon.de/BENEXMART-PIR-Sensor-Temperatur-Feuchtigkeitssensor-Combination/dp/B07SCXNG14/
https://www.amazon.co.uk/BENEXMART-PIR-Sensor-Temperatur-Feuchtigkeitssensor-Combination/dp/B07SCXNG14/
It can of course be ordered from Chinese stores like BangGood, Gearbest, or Aliexpress, but shipping from China is slow now.
https://www.gearbest.com/other-car-gadgets/pp_3008504694819915.html?wid=2000001
https://www.banggood.com/Zemismart-Tuya-ZB-Gateway-Hub-Smart-Home-Bridge-Smart-Life-APP-Wireless-Remote-Controller-Works-with-Alexa-Google-Home-p-1837198.html
https://www.aliexpress.com/item/1005002441359324.html
https://www.aliexpress.com/item/4000071525839.html
https://www.aliexpress.com/item/1005002340919938.html
https://www.aliexpress.com/item/1005002007026244.html
https://www.aliexpress.com/item/1005002341316609.html
https://www.aliexpress.com/item/4001263689776.html
https://www.aliexpress.com/item/4001263868157.html
https://www.aliexpress.com/item/1005002545821613.html
You just have to do a little research before placing an order to really get the Ethernet ("wired") version and not the WiFi version.
Added ability to remote upgrade NCP firmware by allowing remote control of serial port's hardware flow control.
Source code(tar.gz)Added option to specify Serial Port device.
Start with -d/dev/ttyS0
Source code(tar.gz)MIPS(LX) compiled binary(s) for this release.
Source code(tar.gz)esp32-keyble-homeassistant Use an esp32 as gateway for the Eqiva Bluetooth smart lock to integrate it in Home Assistant as MQTT lock Based on the grea
Tuya IoTOS Embedded Wi-Fi and BLE SDK for BK7231T 中文版 | English Overview Developed independently by Tuya Smart, Tuya IoTOS is the world's only IoT ope
ZigStar LAN Gateway - Firmware This firmware delevoped to use with ZigStar LAN Gateway Functions Zigbee UART port forwarding using socket LAN connecti
16 Channel Current Meter to MQTT Gateway This sketch runs on an ESP8266 and reads data from 16 Channel Current Measurement Module over RS485 Modbus an
Eevee A free, offline Pokémon Home alternative for Switch! Features currently available: Bank Cloning Editing Features planned: Editing LGPE support O
hoermann_door Control Hörmann doors drives directly via MQTT from Home Assistant
Now get your alerts & updates about home, wherever you are, with an SMS on your mobile! All with a simple NodeMCU project!
home-assistant-barometer-display A mini Home Assistant display to show pressure & temperature readings (and made to look pretty with 'freeform pcb' br
Hyelicht is an IoT/embedded project for home decoration/automation. Its software allows you to do colorful painting and animations on a LED-b
EOSIO Payout Engine Anyone who built automated payments on an EOSIO blockchain knows the problem well: the payments may fail for a number of reasons,
iot-smart-sensory-weighing Iot smart weighting concept code - Coded in C language [ Hardware assembly code ] - Module for Arduino In this project we h
EOSIO - The Most Powerful Infrastructure for Decentralized Applications Welcome to the EOSIO source code repository! This software enables businesses
Welcome! The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design
Easy automated syncing between your computers and your MEGA Cloud Drive
Tuya MCU SDK Arduino Library is developed based on the Tuya Wi-Fi general integration solution. The device's MCU is connected to a Wi-Fi module through a serial port to implement a network connection. The development is based on general firmware, which supports the adaptative 9600 and115200 baud rate
esp32-keyble-homeassistant Use an esp32 as gateway for the Eqiva Bluetooth smart lock to integrate it in Home Assistant as MQTT lock Based on the grea
Firebase Arduino Client Library for ESP8266 and ESP32 Google's Firebase Arduino Client Library for ESP8266 and ESP32 v 2.0.3 This library supports ESP
Calido - Open Smart Thermostat and Smart Home Controller based on a Nordic Semiconductor Thingy:91 Project can be found here (Electromaker.io). A Make
LIDAR(Livox Horizon) point cloud preprocessing, including point cloud filtering and point cloud feature extraction (edge points and plane points)
Welcome to GUI-lite The smallest header-only GUI library (4 KLOC) for all platforms. 中文 Lightweight ✂️ Small: 4,000+ lines of C++ code, zero dependenc
Tuya IoTOS Embedded Wi-Fi and BLE SDK for BK7231T 中文版 | English Overview Developed independently by Tuya Smart, Tuya IoTOS is the world's only IoT ope
Introduction Arm IoT Total Solutions provides a complete solution designed for specific use-cases, leaving developers to focus on what really matters
CNDP - Cloud Native Data Plane Overview Cloud Native Data Plane (CNDP) is a collection of userspace libraries for accelerating packet processing for c
nntpit This is a simple reddit2nntp gateway server that lets you use a newsreader to follow discussions on reddit. The intention is for you to run it
OpenZ3Gateway An open source Zstack3 gateway powered by ESP8266 and CC2652P modules. One costs less than 60 CNY in China. This repository includes Alt
ZigStar LAN Gateway - Firmware This firmware delevoped to use with ZigStar LAN Gateway Functions Zigbee UART port forwarding using socket LAN connecti
M17 Analog Hotspot Gateway Project How to Make digital voice radio (M17 Digital Voice) analog gateway yourself over the internet width ESP32 NodeMCU/D
Phantom remote control Bluetooth gateway An ESP3232 firmware for the gateway of Phantom remote control, which can push the temperature and humidity data of Phantom remote control through LAN, and also support to control Phantom remote control to send and receive IR data through LAN.
16 Channel Current Meter to MQTT Gateway This sketch runs on an ESP8266 and reads data from 16 Channel Current Measurement Module over RS485 Modbus an