Coder Social home page Coder Social logo

devbis / z03mmc Goto Github PK

View Code? Open in Web Editor NEW
801.0 36.0 37.0 1.04 MB

Xiaomi LYWSD03MMC Zigbee Firmware

License: GNU General Public License v3.0

CMake 5.59% C 76.70% Python 14.19% JavaScript 3.52%
humidity-sensor lcd-display lywsd03mmc temperature-sensor zigbee ota

z03mmc's Issues

B1.5 Hardware LCD Support

Thank you for this project, good job!

I have a 1.5 hardware version, everything works fine except the screen. Is it possible to make support for version 1.5? Write if you need any help.

And it would be cool if they showed the time, as in ATC firmware.

OTA upgrade to new version doesn't work

I see a new version has been released (1.0.2)
Is it possible to upgrade via OTA 1.0.1 -> 1.0.2?

Currently, it doesn't work in z2mqtt.

Zigbee2MQTT:info 2023-10-22 14:59:41: MQTT publish: topic 'zigbee2mqtt/bridge/response/device/ota_update/check', payload '{"data":{"id":"0xaxxx"},"error":"Failed to check if update available for '0xaxxx' (Device didn't respond to OTA request)","status":"error","transaction":"co4wv-10"}' Zigbee2MQTT:error 2023-10-22 14:59:41: Failed to check if update available for '0xaxxx' (Device didn't respond to OTA request) Zigbee2MQTT:debug 2023-10-22 14:59:41: Error: Device didn't respond to OTA request

OTA Update

Is it possible to update the firmware via Zigbee2MQTT? If so, please add instructions.

I currently have version 1.0.2, but I would like to upgrade to 1.0.3


Возможно обновить прошивку по Zigbee? Если да, то просьба добавить инструкции.

Сейчас у меня 1.0.2, хочу обновиться до 1.0.3

Датчики отваливаются

У меня два перепрошитых датчика (был еще третий, но я его вернул на BLE).
Выясняется, что через несколько часов работы (точно не скажу - несколько часов, но не более суток) оба датчика "отваливаются" от Zigbee2MQTT. В списке устройств напротив них высвечивается красная надпись "Оффлайн".
Помогает передергивание батарейки, но с учетом конструктивных особенностей корпусов этих датчиков, да еще приклеенных на стену, передергивание батарейки превращается в сложную задачу.
Что можно предпринять, чтобы не было отвалов?

OTA update issues with Zigbee2MQTT

Имеется 7 датчиков (5 с ревизией 1.4 и 2 с 1.7).
Никак не могу их обновить по ОТА, используя соответствующую возможность Z2M.
Пробовал и локальное обновление (файл .zigbee в папке с данными), и через Интернет.
Лишь один раз (по-моему, это было обновление с 1004 на 1005) два датчика (один 1.4 и один 1.7) успешно обновились. При этом процедура обновления заняла тогда около 25 минут у каждого датчика.
Попытки обновить другие датчики неудачны: сначала запрос обновления. Обновление есть. Затем запуск обновления. Где-то только через минуту появляется серый прогресс-бар. Начинается обновление. Прогнозируемое время - может быть 20 минут, может быть 50 минут, а может быть и несколько часов. Обновление идет ужасно медленно и дойдя до некоторого значения (бывало 2% , бывало 17%) обрывается. Датчик при этом остается рабочим и продолжает сообщать старую версию прошивки и наличие обновления. В некоторых случаях обновление просто останавливается, прогресс не нарастает. Прогнозируемое время обновления меняется на "N/A". Перезагрузка Z2M (в том числе, и рестартом сервиса) не помогает - после перезагрузки рядом с проблемным датчиком все также высвечивается пара процентов обновления и "Оставшееся время N/A".
P.S. Обновление датчиков делаю по очереди. Одновременно пытаюсь обновить только один датчик.
P.P.S. Только что попытался прошить один датчик. Прогресс дошел до 6,95% (и оставшееся время было около 15 минут), постоял в таком положении минут 5 и откатился на 0% и время N/A. И так стоит уже минут 5.

Support for Conbee II?

Is there any chance that I can pair the xiaomi sensor through conbee gateway?

Thanks.

Add setting to change TX antenna power

Can you add ability to change antenna power in Z2M?

I have one sensor at a fairly large distance from the Zigbee stick and some data loosing. It would be a good idea to manually control the TX antenna power within reasonable limits

After firmware flashing finished the sensor is down off

Hi!

Guys, I think it's more a question than issue, but anyway I will ask, maybe someone got some solutions for my case... :-D

Thanks for zigbee firmware btw 👍

I tested several of my sensors, one was flashed and is already working in my zigbee network, the second sensor, after the firmware was completed, stopped showing signs of life, it simply turned off, replacing the battery or closing the contacts produce any results. Is there any chance of restoring work through UART, maybe someone can tell me the way? Thanks.

Not receiving data in ZHA

Hello,

I flashed my LYWSD03MMC hw2.0 using an UART. After that, I reset the device and I could configure it using the ZHA integration. ZHA read received data first time, but after that there have been no more updates. Are there any configuration that I should consider?

не могу подключится к другому шлюзу.

Привет. После прошивки - один раз подключился к SLS-шлюзу. А теперь не могу перекинуть датчик на дугой шлюз. Напиши правильную последовательность перехода. В режим сопряжения. (Батарейку вытаскивал минут на 5)

How to do OTA?

I have aded and flashed device on 1.0.4 and now 1.0.5 is out.
How to do ota?
Bluetooth is not working as expected.
And in zigbee2mqtt OTA doesnt register any update.

installed_version: 268709889
latest_version: 268709889

Update available: false

Firmware version: 3001-1004
Screenshot 2023-10-30 at 23 28 00
Screenshot 2023-10-30 at 23 27 46

Thanks :)

Two-stage firmware?

If the size of the fw bin file is less than 128 kilobytes, then two-stage firmware from the original (MiHome) is not required. It is necessary to enter the code in the cold start to move the fw to the required area of flash memory. There is an example in the firmware for MJWSD05MMC.
TelinkMiFlasher and some custom firmware already support advanced OTA for writing files larger than 128 kilobytes to the 0x40000 area.
Zigbee also has the ability to restore the original (original from MiHome) firmware via OTA.

Если размер файла fw bin меньше 128 килобайт, то двухэтапная прошивка из оригинала (MiHome) не требуется. Необходимо вписать код в холодный запуск для перемещения fw в требуемую область флэш-памяти. В прошивке для MJWSD05MMC есть пример.
TelinkMiFlasher и некоторые пользовательские прошивки уже поддерживают расширенный OTA для записи файлов размером более 128 килобайт в область 0x40000.
Zigbee также имеет возможность восстановить исходную (оригинал от MiHome) прошивку через OTA.

How to flash firmware with USB to UART for MJWSD05MMC?

Hi,

I am trying to flash via USB for MJWSD05MMC but have been unsuccessful. Based on the PCB connection diagram, I connected the adapter Txd with 1k ohm to the rxd of MJWSD05MMC. Still no luck. Any pointers?

Thanks
Wei

Zigbee2MQTT Reporting time

Why is the set time in the Zigbee2MQTT Reporting panel not taken into account. I set it to 180 and the actual reporting time is random up to 7 minutes. Has anyone encountered this?

Slow down the internal timer

I suggest slowing down the internal timer by a factor of six. Personally, it won't make much of a difference for me whether the screen refreshes every 10 seconds or every minute. I don't experience sharp temperature fluctuations, and as a short practice has shown, the sensors don't react that quickly either. The benefits of this approach are much greater: fewer sensor queries, fewer value calculations, screen updates, and, as a result, reduced energy consumption.

I've assembled a test version for myself, and while I only have limited statistics for half a day, the battery consumption graph already looks more optimistic than it did before the changes.

Предлагаю замедлить внутренний таймер в шесть раз. Лично для меня не большая разница будет экран обновляться раз в 10 секунд или раз в минуту, таких резких перепадов температуры у меня нет, да и как показала недолгая практика сами датчики так быстро не реагируют. А пользы от такого решения намного больше, меньше опросов датчиков, меньше расчетов значений, обновлений экрана, как следствие меньше потребление энергии.
Я собрал себе тестовую версию, статистики пока мало всего пол суток, но график потребления батареи уже выглядит более оптимистично, чем было до изменений.
image
image

My report settings are as follows
image

Very inconsistent reporting behaviour

Flashed 2 Xiaomi with latest version (as of today, 1.06)

On one I got some temperature and humidity readings the first time I connected it, but none after. More than 30 min have passed and nothing. The other seems to be reporting humidity, but no temperature. Both devices are withing 2m of the hub, so it should not be a connection issue.

image.

After reseting HA and re-pairing both devices, I get a similar behavior. They update once or twice and then they stop.

Edit: both are using quality batteries with less than a week on. Both report 100% battery. If I restart HA values get updated but then one stops and the other is inconsistent (sometimes every 10 min, 5, 7..)

新版固件不支持

9:36:09: Searching for devices
09:36:16: Connecting to: LYWSD03MMC
09:36:16: Hardware Revision String: B1.6
09:36:16: Software Revision String: 0159
09:36:16: Firmware Revision String: 2.1.1_0159
09:36:16: Detected Mi device
09:36:16: (!) Version: 2.1.1_0159 is temporarily not supported (!)

ZHA OTA?

Hi!
Help me pls
I tried to OTA update the device via ZHA
I just put z03mmc.bin in otau_directory and turned on debug log
As I understand it linked z03mmc.bin and LYWSD03MMC device.
But OTA update doesn't start

2023-10-22 18:48:04.297 DEBUG (MainThread) [zigpy.zcl] [0xF3D3:1:0x0019] OTA query_next_image handler for 'Xiaomi LYWSD03MMC': field_control=0, manufacturer_id=4417, image_type=515, current_file_version=268513281, hardware_version=None, model='LYWSD03MMC'
2023-10-22 18:48:04.298 DEBUG (MainThread) [zigpy.zcl] [0xF3D3:1:0x0019] No OTA image is available

May be I have to rename the file?

Battery not working

Hi,
first, very nice work, you are my hero :)
my first self compiled zigbee device, i hope i can help soon a little bit

i have set :

#define VOLTAGE_DETECT_ENABLE 1

but i get 0% in home-assistant.

EZSP support

Some users report that it doesn't work with EZSP coordinators. Need to investigate

Not (yet) supported in zigbee2mqtt

Great project! Just successfully flashed this firmware and paired it with zigbee2mqtt. Would be nice if it will be supported by zigbee2mqtt in the future. Is there already an external converter available?

LYWSD03MMC

Size firmware is more 131072 bytes!

Hello!

I follow step by step and here
Next "Select Firmware", choose file with custom bluetooth firmware ATC_ota_400000, click "Start Flashing"

I'm getting that the Size firmware is more 131072 bytes! And can't proceed. Can you advise what is wrong?

here's the log

3:57:54 PM: Searching for devices
3:58:05 PM: Connecting to: LYWSD03MMC
3:58:11 PM: Hardware Revision String: B1.6
3:58:11 PM: Software Revision String: 0130
3:58:11 PM: Firmware Revision String: 1.0.0_0130
3:58:11 PM: Detected Mi device
3:58:11 PM: Connected
3:58:25 PM: Activating now, please wait...
3:58:29 PM: Registration successful
3:58:29 PM: Send Login, please wait...
3:58:29 PM: Received device infos are correct
3:58:29 PM: Login successful
3:58:47 PM: File: ATC_ota_40000.bin
3:58:47 PM: Size firmware is more 131072 bytes!

Comfort Value in Automation

Hello. Thank you for your efforts. I would like to use the comfort value (face on thermostat) in my automation. Is it possible to retrieve its value?

Display MAC address on boot

Could some features from the custom BLE firmware be ported?
For example, the BLE custom firmware displayed the last part of the MAC address upon boot - nice feature to rapidly identify the device.
Could this be added to the zigbee version?
Or ability to disable the "smiley" indicator and alternating the humidity and battery level on LCD...

How to upgrade to new release

My sensors have ZB firmware 1.0.1 now.
How can I upgrade these sensors to new release (1.0.2) without using the invasive method of soldering wires, UART connection etc.

OTA Error: NotSupportedError: GATT operation failed for unknown reason.

everything is ok from step 1-4
but after step 4 , flash firmware ATC_ota_400000
when i reboot device ,reflash website
connect shows:
21:50:33: Reconnect 5 from 5
21:50:33: Hardware Revision String: B1.7
21:50:33: Software Revision String: V4.4
21:50:33: Firmware Revision String: github.com/pvvx
21:50:33: Detected Mi device
21:50:33: NotSupportedError: GATT operation failed for unknown reason.
21:50:33: Something went wrong, too many reconnects

the displayer is still work

Zigbee2MQTT Sonoff dongle-e v2 не работает

После смены на Sonoff zigbee dongle-E v2 "product":8,"revision":"6.10.3.0 build 297"},"type":"EZSP v8" на последней прошивке устройство не регистрируется. По логам оно как будто вообще ничего не шлет. На dongle-P все работает. Прошивал через OTA на dongle-P. Рядом датчик Xiaomi на dongle-E регистрируется без проблем. Батарейку вынимал. Контакты GND и reset замыкал.

SyntaxError during build in file make_ota.py

This happens both in latest from git following the build instructions from the readme and using the 1.0.6 release. System is Ubuntu 20.04 with Python 3.8.10 and cmake 3.16.3

The error:

Scanning dependencies of target z03mmc.bin
Firmware patched!
[100%] Built target z03mmc.bin
Scanning dependencies of target z03mmc.zigbee
  File "z03mmc-1.0.6/tools/make_ota.py", line 14
    with (open(args.input_file, 'rb') as bin_file):
                                      ^
SyntaxError: invalid syntax
make[3]: *** [src/CMakeFiles/z03mmc.zigbee.dir/build.make:57: src/CMakeFiles/z03mmc.zigbee] Error 1
make[2]: *** [CMakeFiles/Makefile2:96: src/CMakeFiles/z03mmc.zigbee.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:103: src/CMakeFiles/z03mmc.zigbee.dir/rule] Error 2
make: *** [Makefile:118: z03mmc.zigbee] Error 2

Ошибка при прошивке z03mmc.bin после промежуточной

Промежуточной прошивается нормально, вытаскиваю батарею, обновляю страницу. Подключаюсь повторно для прошивки zigbee после нажатия на Start Flashing, начинается прошивка, статус 0% и почти сразу дисконет.
Пробовал на двух датчиках, результат одинаков.

20:41:47: Searching for devices
20:42:18: Connecting to: ATC_BA09F9
20:42:21: Hardware Revision String: B1.5
20:42:21: Software Revision String: V4.4
20:42:21: Firmware Revision String: github.com/pvvx
20:42:21: Detected custom Firmware
20:42:21: Hardware Version: LYWSD03MMC B1.5, Software Version: 4.4, Sensor: SHTC3 (SHTV3)
20:42:21: Custom config HEX string: 55051000002804a931318ab4
20:42:43: File: z03mmc.bin
20:42:43: File size: 129316 bytes
20:42:43: Count: 8083
20:42:47: Start DFU
20:42:53: Update error: NotSupportedError: GATT operation failed for unknown reason.
20:42:53: Disconnected.

2023-10-24_21-01-23

An alternative version flash the Zigbee firmware from a side project (pvvx) in Xiaomi LYWSD03MMC in TelinkMiFlasher from version 6.7.

An alternative version flash the Zigbee firmware in Xiaomi LYWSD03MMC in TelinkMiFlasher from version 6.7.

To flash the Zigbee firmware, use a Google Chrome, Microsoft Edge or Opera Browser.
1. Go to the Over-the-air Webupdater Page TelinkMiFlasher.html
2. If using Android, Windows, Linux: Ensure you enabled "experimental web platform features". Therefore copy the according link (i.e. chrome://flags/#enable-experimental-web-platform-features for Chrome), open a new browser tab, paste the copied URL. Now sten the Experimental Web Platform features flag to Enabled. Then restart the browser.
3. In the Telink Flasher Page: Press Connect:. The browser should open a popup with visible Bluetooth devices. Choose the according target device (i.e. LYWSD03MMC) to pair.
4. After connection is established a Do Acivation button appears. Press this button to start the decryption key process.
5. Now you can press the Zigbee Firmware button to directly flash the Zigbee Firmware:
image
Alternatively you can choose a specific firmware binary (i.e. the original firmware) via the file chooser
7. Press Start Flashing. Wait for the firmware to finish.
8. The device should now show up in your Zigbee bridge (If joining is enabled, of course). If it doesn't, reinsert the battery and/or short the RESET and GND contacts on the board for 3 seconds.

A brief description of the installed version of the Zigbee firmware is in this repo.
In the future, you can update the Zigbee firmware to the version from devbis.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.