-
Notifications
You must be signed in to change notification settings - Fork 41
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
Updated EM357 NCP firmware "IKEA battery draining fix" #12
Comments
Do you know off hand if the legacy bootloader on the EM3581 accepts s37 xmodem transfers? Verified the pinout looks good, and tried to transfer the file via |
My experience from EFR32 first generation is no :-(( I pinging gary hi have little more experience of EM35X chips. @grobasoz Wath files can the old Ember bootloader flashing ?? |
If the S37 file is OK then the command Simplicity commander you can download for different platforms at https://www.silabs.com/mcu/programming-options Edit: And for converting to one GBL file: |
Was testing converting and its looks working but i cant testing the file then i dont have the hardware.
Attached the 2 converted file in one zip file. |
@MattWestb - I have put the ebl files into my repository. Unfortunately I couldn't get your ebl to flash correctly on my test system :( |
Thanks Gary and as you knowing Cimplicity Commander is not one friend of my but i think its little bad its was writing the operation was OK. I keeping one eye on the progress and reporting back the the original ZHA EM357 user if all is going well. And I also hoping walthhowd is getting one working 6.7.8.0 update for his EM3581 stick :-)) As normal one big thanks for sharing your knowledge and efforts to the community ! ! Mvh Mattias Edit: Was not silabs putting the EM35X USB-serial support out of app builder (but living the code tree) in some earlier 6.7.X release ? |
No dice.
Regular upload works fine --
|
So EM357 firmware not working on EM3581(from bootloader version). :-( The bootloader is sending back its menu then it have backing out the x-modem download. Have you trying with terminal like minicom ? |
Perhaps its one bootloader problem (I dont have reading the release notes of the EBL) that is not compatible. Do you think this firmware its working for users that is having real EM357 devices ? And is it mutch users having the EM357 or is all having the newer EM3581 ? |
I pinged my one EM357 tester to see if he's willing to try it out. . . |
I have added EM358x NCP firmware to my repository. |
Great thanks for getting updated firmware for our device !!! Hope you get time to sleep little between your deep diving in the hard and software jungle. Mvh Mattias |
I've succesfully upload NCP_USW_ETRX3_USB_678-57k6.ebl firmware on my Telegesis ETRX357USB adapter. I've also pairing again my Ikea ON/OFF switch to test battery draining. |
@macfly92 Great work done !!! After adding and changing binding of your IKEA E1743 do one "reconfigure this device" from the device card so its being sure the pull control setting is being OK in the remote (dont forgetting waking it up before executing the command). If its not helping the battery draining you have getting one newest possible firmware with many bad bugs fixed and i think you is getting one more stabile system. You is one of our most brave users trying one nearly untested (not recommended) firmware on you adapter but i like it !!! Report back if its going well or getting problem here so the devs can putting the firmware on the recommended list or if its bad on the blacklist. Mvh Mattias W |
@grobasoz Im vers sorry that my former countryman @Hedda is keeping you busy and i was thinking hi was busy by hunting ice beers in the north !! And one more time thanks for the great cooking of firmwares for our adapters. 3 is up and running (Tasmota, IKEA Billy and EM357) on one more need being confirmed :-)) And I hope you getting enough time for getting Z2M working with EZSP compatible adapters (i think only protocol version 8 is enough then nearly all adapters is getting new updated firmware) so the users can have more choices on the host system side and its good for the development of the HA community (but bad for commercial deCONZ). Now is only waiting for good or bad new for the EM358X firmware and then its up to the devs to recommending the 6.7.8.0 or not. Have one great time and grating to the tequila drunk penguins on the beach ! Mvh Mattias |
Ok I will do reconfigure right now. Can I somewhere check if it is correctly configured ? Again thanks a lot. |
If you was waking it up shor before sending the commands you dont getting any warning / errors in the log = OK. If its was sleeping you getting errors / warning in the logs (if i remember right !!). Its great to knowing its working with the upgrade so can recommending to other users and not braking their favorite hardware and making the user very sad ! So you is being the only one with one most up to date EM357 around in the community :-))) |
Ok, I have done the reconfigure but without debug on the ZHA log. I will check the battery drain, and if it is not good, I will dig more.
Ahah, great ! I hope I will not be the only one, but the first one for sure ;) |
I just flashed the file |
@igalarzab - if you're not getting a response from the stick, you could try recovery instructions in the readme. |
@sreknob thanks! Yes, I saw the instructions but I don't think I have the right tools for it (also, they seem to be a bit out of my low-level knowledge :D) Also, out of curiosity... what would have been the right firmware to patch? |
You can pop open the case and recover with just a paperclip shorting the two shown points or a set of tweezers. Correct firmware is here: |
Thanks for the help @walthowd, I appreciate it I used a paperclip to touch both TP17 and GND and I can see this in the dmesg output:
Now the problem is that I'm not very sure how to follow... sorry if my questions seem a bit stupid :) I've tried using minicom to upload the ebl file but I must be doing something wrong as I can only see
What are exactly the steps after shorting TP17 and GND? Again, thanks for the help, and sorry for hijacking this issue! 😓 |
You should see a bootloader menu in minicom first -- Select upload ebl (option 1, I believe) and then send your file. Connect minicom to the /dev/ttyUSB1 (115200 no flow, 8/n/1) -- pull stick, short TP17 to GND, plug stick back in, unshort TP17, hit enter a few times on keyboard, see if you get to the menu. If not, repeat. |
amazing, it works... thank you very much, really!! 🎉 🎉 I created a PR with some detailed instructions just in case it's useful to someone in my same situation :) Also, going back to the initial matter of this ticket... I flashed the wrong image (v6.7.8) trying to fix the battery drain of the Ikea lights. I guess there is no firmware with the fix for this specific device released yet, am I right? |
Here is the correct file for EM3581/Nortek GoControl users to test: https://github.com/grobasoz/zigbee-firmware/blob/master/EM358x/NCP_USW_EM358x_678_57k6.ebl Let me know your results -- You will need to reconfigure your end devices (ikea) after installing to reconfigure polling mode. |
So it looks its one good and easy way changing the speed in ZHA without destroying the device stetted up then changing firmware. @walthowd Shall we putting that in the Zigpy Wiki so user can using it and not doing bad things and loosing there devices ?? |
@MattWestb thanks for pointing out that I can't read. I totally just skipped over the bellows options and just looked at the commands. Anyway, as you could see from my many edits, I eventually got there :-) And back to the original issue point of WHY to upgrade (not just because we can -- thanks to @grobasoz), I just reconfigured all my Ikea remotes to see if batteries drain improves. Good timing as I'm down to just one spare CR2032 battery from my last pack of 8 I opened a couple weeks ago! Thanks to everyone here for making this happen! I will keep running my production HA with it at 115200 and let everyone here if any issues crop up. So far, so good, though. |
Im very impressed of the users of EM35X devices that is helping the devs to moving things forward then most "normal" users is only sitting and dot do nothing (or perhaps complaining). Gary is have doing all possible and impossible firmware for the Silabs community (the first and famous was the "free" Sonoff Zigbee Bridge) and hi is always helping then hi cam. For the original problem (battery draining) I have not have time to do more tests (One very close friend of my was having on hart attack on Monday night. . .) but if you is doing the "reconfigure" trick the device is pulling its parent every 5 seconds and is reporting batteries (then sending commands) and getting the online status in ZHA updated every 60 minutes. I think the "hard draining" is only hitting EFR32 second gen (Sonoff ZBB) that the 6.7.8.0 shall fixing it but i cant verifying that then i dont have any Sonoff ZBB (Stephan H is saying its working OK in tasmota). Its still some bugs in all devices that is running older Zigbee stacks then the 6.7.8.0 that must being fixed in there firmware (I need writing IKEA one more time) but i hope its being better but i do not expecting all problems i away but many other is fixed in the NCP firmware that is great that also the EM35X is having getting it for making ZHA more stable for all users. I dont like hijacking this issue and shall continue trying getting one "new free" firmware on my tuya ZBGW. Keep being brave and reporting back so our devs can getting our systems working better !! |
@grobasoz I've added your 6.7.8 firmware to this repository. Let me know if you'd like be credited it for it, or not, or keep it hosted just on your repo. I know it gets sticky with the Emberznet legal language, though it does not seem to be currently enforced as the images are all over github. FWIW, I've been running 6.7.8 in test and a ZHA dev has been running it as well in production, all so far with good results. |
Great that its working well ! Shall I putting it as recommended firmware version on the Zigpy Wiki ? |
Just to follow up, I've had no issues at all with the 115k2 version here! Thanks! |
I updating the Zigpy Wiki with your latest status and closing this issue then its looks all "Gary" firmware is up and running on EM35X devices without any issues. I think the one part or the "battery draining" is eliminated but its 2 more parts that is not related to the NCP firmware but its better having the discussion in the original ZHA issue. @igalarzab Do you have trying if you can loading the updated version for your stick that the devs have getting up and running ?? @walthowd Do you like recommending 115k2 or 57k6 for using in ZHA ?? Im sorry for i have abusing Gary (not the first time) but hi is one of the few that can cooking one working firmware for the EM35X devices with newer SDK then is officially supported by Silabs. One more great thanks to all brave EM35X users, walthowd and @grobasoz for all time and knowledge spendeed on this issue and making it working. All the best for all brave users !! |
I patched the 57k6 (as I’m not very sure which is the correct 115k2) image and it works perfectly. Thanks a lot!! :))) |
Great !! The 115k2 shall being this one and 57k6 this one that is working. If you is trying out the 115k2 you need "patching" you ZHA config with the new baudrate for getting it working. #12 (comment). Thanks for testing it out !! |
@MattWestb I'd probably leave the recommendation for 57600 currently for the average user. ZHA only currently probes EZSP at 56K so users would have to manually enter serial path, radio type and baud rate. Elelabs users already have to do that (as the EFR32 there only does 115200) but it does seem to trip a lot of people up and confuse them. I'll include the 115200 fw image in the repository and add a note for advanced users. |
I like getting all adapter working with the same speed if its possible so it working with the default in ZHA. If also EM357 is working OK I can doing one PR in ZHA for changing the default to 115k2 and its being less confusing for "normal users". |
@MattWestb The best approach would be to PR to ZHA to auto probe 115K in addition to 56K. Currently it probes EZSP at 56k, then zigpy-znp, deconz, on all serial ports -- if all fail the user is thrown to the manual configuration mode. If it auto probed EZSP at 56K and 115K it would work "out of the box" with non-upgraded HUSBZB-1 adapters and Elelab adapters and upgraded HUSBZB-1 adapters. |
Should I putting one request in ZHA to adding 115k2 for probing or if they dont like doing it changing the default to 115k2 ? You can also asking Alexei wot hi is thinking and in the end hi have the last word. I like the approach to having the doors open and not closing them then its not nervelessly. You is the person that getting the most problems if user having problems and im only on more crazy user. PS: My "IKEA Billy EZSP" have never being auto probed of ZHA and its the same with most EFR32 adapters to day. |
+1 Great if first probe 115200 and then that fail salso try 57600, but believe it's bellows and not ZHA that contains the probe code: https://github.com/zigpy/bellows/blob/dev/bellows/ezsp/__init__.py https://github.com/zigpy/bellows/blob/dev/bellows/config/__init__.py FYI, EZSP probe method was initially added as a feature to bellows by Adminiuga in pull request zigpy/bellows#223 By the way, bellows test code looks to use 115200 by default -> https://github.com/zigpy/bellows/blob/dev/tests/test_ezsp.py |
ZHA automaticly probing all serial ports could make initial installation config flow super user-friendly if a smart implementation could be coded for it to check if any adapter is not already in use by other applications/integrations running on the same computer. One possible issue of conclict I could otherwise see with ZHA automatically probing all serial ports is if the user already have a other more than one Zigbee coordinator adapter installed and one of them is already used by a other application or integration such as deCONZ, or XBee, Zigbee2MQTT, or ZiGate (now obsolete custom component but could still be in use): https://www.home-assistant.io/integrations/deconz/ |
I finding implanting one config parameter that defining network ports that ZHA is using then probing like in config: |
Automatically discovering of network-attatched Zigbee bridge devices is something that belongs in ZHA / Home Assistant Core. I think optimally would be if both the ZHA integration and Zigbee bridge firmware could use SSDP automatic discovery method: https://www.home-assistant.io/integrations/discovery/ https://www.home-assistant.io/integrations/ssdp/ https://www.home-assistant.io/integrations/zeroconf/ ZiGate Gateway firmware feature it and old ZiGate integration supported Zeroconf SSDP (Simple Service Discovery Protocol): https://github.com/doudz/zigate/blob/master/zigate/transport.py#L385 The only thing that needs discovering is IP, port, and the radio type in the case of the ZHA integration and Zigbee bridge firmware. |
If parsing the parameters to bellows environment then pyserial is handle it like one "normal local com port" and ist working without the serial host have some special configuration only the right network port is open. |
My coding sucks too so posted seperate requests/discussion for those ideas here zigpy/bellows#396 and here zigpy/zigpy#667 |
Not completely true then some users is using the bellows CLI for doing things like rebooting in bootloadermode and so on, then its good its working / reading the same "settings" and if its coming from HA. ZHA, Zigpy or Bellows is one more architecture dials that i letting "some" more competent person to take the decision how it shall being implanted. If its going well it can being possible doing NCP upgrading true bellows CLI with only adding xmodem from pip and some command line parameters. (like is being done in the Linux terminal on tuya ZBGW). Edit: |
@sreknob -- I upgraded to the latest firmware and my 5 button Ikea remote still died in 2 days. I had forgotten to reconfigure the remote, is it as simple as hitting reconfigure on the device in GUI? Has the Ikea issue been fixed on your end? Thanks |
Did you hit re-configure in HA UI? Did the next battery last longer? I just updated to 6.7.8 and reconfigured my two Ikea On/Off Switches and my Philipps dimmer switch. I just hit reconfigure in the UI while turning the switch on and off, to keep it awake. But not sure how to validate this is correct. Is it better to drop and re-pair after going to 6.7.8? |
ZHA is still setting up the long pull interval to 6 seconds but you can patching that to the default 4.88 minutes zigpy/zigpy#604 (comment) you dont need reconfigure then you end device is OK reconfigured and its only updating the long pull interval after check in is made (every 55 minutes). If you is repairing or doing one new binding the attribute reporting is being broken and is only reporting one time in 24 hour and is most time flagged off line, reconfigured is reporting every 3 hour and last seen is updated every hour = online. Also good if the end device is connected to routers and and not direct to the coordinator. |
Decided to do the zhaquirk tweak of line 93. I know you mention there is some Zigbee 3 disadvantages but i like that it only impacts the Ikea 2 button switch. |
So, it didn’t help.... and I actually ran out of batteries and haven’t had time to grab more yet. So they have been shelved for the moment. Looks like there are some other good ideas here to change the polling, which, when I have some fresh batteries, I will try out! |
Only for reference the old Can being good to have in the future if Silabs is taking it off line. |
ZHA is having problems with IKEA controllers is draining there batteries and wasn't finding the problem for that but its looks being Sonoff Zigbee bridge that is triggering it most (EFR32 second gen).
Tasmoat devs have disabled attribute reporting for all IKEA controllers for trying going around the problems. Last week is also reported that Philips HUE dimmer switch is making the same => disabling attribute reporting in tasmota.
Also deCOZ is having problems with Samsung and IKEA controllers is draining batteries and have pinpointing that the pull control is not being setted up OK and making the devices staying in short pull mode for infinity so they is redoing the pull control for this devises.
Then having finding the silabs NCP bug in the 6.7.8.0 release i have getting one firmware update for Sonoff zigbee bridge (unsigned then the we dont thwe the cert for signing it) and my "IKEA Billy EZSP". Both firmware is tested by our cooker but not verified to working from the user base but should being OK.
Then its one ZHA user with EM357 stick that is also having the battery draining problems that we cant explaining :-((
So i have asking the cooker if hi can doing one new firmware for that chip also and hi have done it.
Its not tested on the specific hardware then hi dont have time for doing it for the moment.
So i asking can some of the experien EM3XX user trying it out if its working and if OK adding it in this repro and if not then we is deleting the files then its bad if they is circulating and crashing / making problems for users.
Link to the firmware: https://github.com/grobasoz/zigbee-firmware/tree/master/EM357
2 things: USB serial was disabled by Silabs in app bilder but is still in the code base so little tricky to get it working. Its one EZSP protocol version 8 and not backward compatible with lower protocols !!
Pleas informing us if its working or not !!
Mvh Mattias
The text was updated successfully, but these errors were encountered: