MattWestb / IKEA-TRADFRI-ICC-A-1-Module

Loading EZSP (EmberZNet Serial Protocol) on IKEA TRÅDFRI ICC-A-1 Modul
GNU General Public License v3.0
40 stars 6 forks source link

Zigbee router firmware image for the IKEA Tradfri ICC-A-1 Modules and more !! #6

Open Hedda opened 3 years ago

Hedda commented 3 years ago

What do you think about also providing a pre-configured Zigbee router firmware image for the IKEA Trådfri ICC-A-1 Module?

Checkout Ikea Tradfri Zigbee Repeater Umbau project with Zigbee router firmware for IKEA Tradfri ICC-A-1 Modules:

https://forum.smartapfel.de/forum/thread/3820-ikea-tradfri-zigbee-repeater-umbau/

That important part is that DIY router can beat the performance of the popular CC2530/CC2531 based (ZHA 1.2) DIY routers:

https://www.zigbee2mqtt.io/how_tos/how_to_create_a_cc2530_router.html

Especially if use those EFR32MG21/ based IKEA Trådfri Modules that you found in newer IKEA Trådfri "Markus" products.

MattWestb commented 3 years ago

Some of the german user have very good and deep radio knowledge and knowing how to using it !!! And the result looks good IF using one very good external antenna (no chinese 2 € ones). As explained is the original PCB antenna is one of the best (more then likely better than the new silabs module is having) and its good places in the casing. The controlled outlets its one good alternative but is having 2 drawbacks 1: Its have one large condensator behind the antenna (in the lobe of the antenna) that is making ground plane in the antenna being cutted and the lobe is cutted in some angles and 2: its nearly impossible opening without destroying it and its high voltage not isolated inside = to dangerus = no go.

The signal repeater is OK as one router (I dont having it but its one normal IKEA modul) for extending the mesh but its have problems not being correctly configured in all open zigbee systems for helping the controlled blinds (IKEA is setting up the group the remote and blindes is bonded to with touch link commands that is not possible doing with normal classical joining). Updating the firmware and modded with external antenna can making it one very good range extender in Zigbee network for 100% !!

The last finding of Adminiuga and company with the old bugs in the EZSP its better trying getting some devs doing one router / range extender firmware with latest 6.7.7 or perhaps 6.9.x for eliminating the nasty bugs. The IKEA modul its easy flashing one new bootloader with SWD and then serial upload the firmware that is not the case with the new module if not having one real J-Link probe that most users dont have. And the extra flash and ram is not used for one simple router firmware = waysted resources. Both modules have good transmitting power and receiving sensitivity and its much better than the old TI CC-253X and the firmware is up to date that the TI not (its discontinued and its to underpowered also for somthing like simple router.) Plus it can being that EZSP is doing strange things then running on the second gen EFR32 but its not 110% verified yet but its too much problems with SonOff in ZHA for the moment.

Perhaps I must going one first trip to IKEA Nord then its opening after the 3d shutdown here for buying one signal repeater (the new RGBW / CWS is not released here) :-)))

Hedda commented 3 years ago

More discussion about IKEA Trådfri module based DIY routers here https://community.home-assistant.io/t/sonoff-zbbridge-sonoff-zigbee-bridge-from-itead/187346/88

MattWestb commented 3 years ago

The CC-2530 with or without PA is one old / obsolete concept but some users have getting routes on it to working very good with external antennas.

I think the IKEA signal repeater is one on the best for the price on the market then its having one good chip with more enough flash and ram and one good radio with integrated PA that is good tunes for its purposes and the the PCB antenna its better then the normal "F-type" normally used on small modules.

I have buying some LIDL devices and they is also having very good LQI and is making good connection to all possible routes in the mesh. I dont knowing which version of EZSP stack they is using but its more then likely newer that most IKEA is using but also still having the very bad bugs that our Adminiuga was triggering with bruteforce.

chaisaeng commented 3 years ago

I have an IKEA bulb exploded a few days ago and incidentally I found this repository so I give it a try. I successfully flash the ICCA1 module with icc-a-1-bootloader-combined.s37 and also be able to upload NCP_USW_115k2_F256_678_PB14-PB15-PA0.gbl via xmodem on to the module but I can not get it to work on my test home assistant instance. any idea what went wrong ?

upload gbl file Bellows output IMG_0133

MattWestb commented 3 years ago

I have not getting one exploding device but i have distorting some sheep WW bulbs for getting the module out off them.

Your SWD flashing looks OK and you can booting the bootloader and its reacting OK. Also the bootloader is flashing the uploaded firmware so it shall being OK.

If you is having the terminal connected and power on / resetting the module you shall getting some hexa caters being sent (is how its looks is depending of the terminal you is using) then the NCP is sending one initiating frame but after that is not sending any thing then you is trying sending to it (if you is not sending "real EZSP commands". It shall looking like this but the charters can being different ▒▒�~.

I have not trying using bellows command on one local port only with serial over Ethernet but that is working OK.

If i getting response in the terminal i knowing the TX and RX is OK and then adding it in ZHA and its working.

If you is in Windows host (its not looking that you is dong) is local comport not working under docker and you must using on Linux or RPI for accessing it. But you have using the terminal for the bootloader so the same host shall working with local comports.

chaisaeng commented 3 years ago

Thanks for reply. I tested in minicom by disconnect and reconnect the vdd to the module while my ftdi serial adapter still connected and I got a few characters (unreadable) on the screen every time I reconnect the power to the module which mean that it should be ok. I fire up home assistant container for testing then install ZHA integration some how it will not work as expected. eventually I manage to make it work without knowing what is the real problem. I remap the usb ftdi device in docker container from /dev/ttyUSB0:/dev/ttyUSB0 to /dev/ttyUSB0:/dev/ttyACM0 then take down the container with docker-compose down the redeploy with docker-compose up -d then test again and it magically working but bellows still give me the same error message.

MattWestb commented 3 years ago

If i have ZHA working and need using bellows CLI i going in the config of HA and editing the file \.storage\core.config_entries and the parameter for the comport ("path"): (example with network port but its the same with local com ports as you can see i have putting one X in the end so its not one valid path )

            {
                "entry_id": "1509216dc5c6aac3464ac35895885f7b",
                "version": 2,
                "domain": "zha",
                "title": "socket://192.168.2.127:6638 (LIDL LED NCP)",
                "data": {
                    "device": {
                        "baudrate": 115200,
                        "flow_control": "software",
                        "path": "socket://192.168.2.127:6638x"
                    },
                    "radio_type": "ezsp"
                },

And restarting HA => HA is starting but not ZHA then it cant find the coordinator. Then I opening one CLI in portainer or docker desktop (in Win) in the HA container and can using bellows commands without problems with the same comport that ZHA is using in HA. I newer getting bellows working in native windows so its my workaround. Restore the comport in the config and restarting HA and you is having ZHA working OK if you not have doing some bad things in the CLI.

If you is in Linux you need deactivating / deleting modem manager and RPI needs some patching.

Great that you is up and running with ZHA !!!

MattWestb commented 3 years ago

Is you using Linux as host and can running bellows in one virtual environment so not having docker making problems with accessing the comport ? Also looking that the user running ZAH / bellows is in the dialout group for having access to the comport.

MattWestb commented 3 years ago

One more thing in ZHA you need putting in 115200 as baud rate then the default is for EM35X and not working with new EFR32 chips (if not cooking the firmware with the old parameters).

chaisaeng commented 3 years ago

I running docker in a pc running Debian Linux. also on the machine I have python and install bellows with pip install bellows just for testing. home assistant container can access the serial port connected to the module but it need to map to ttyACM0 otherwise it will not work. btw. thanks for you info, I may not need to use bellows for getting the information from the module as my HA is working fine with the module with ZHA integration.

Hedda commented 3 years ago

@chaisaeng You are quite a bit off-topic for this discussion about Zigbee "router" so please open separate new issue for your issue:

https://github.com/MattWestb/IKEA-TRADFRI-ICC-A-1-Module/issues

Maybe also start a new discussion on your project here too -> https://github.com/zigpy/zigpy/discussions as zigpy/bellows devs, tube0013 and MattWestb who all have experience with using Zigbee serial modules usually reads most new threads posted there.

You might specifically also want to check out and read through these other existing threads/discussions there that might be related:

https://github.com/zigpy/zigpy/discussions/743

https://github.com/zigpy/zigpy/discussions/584

As well as check out Tube's ESP32 based gateway project with ESPHome firmware that could be used with such a ICC-A-1 module:

https://github.com/tube0013/tube_gateways

https://community.home-assistant.io/t/zigbee-3-0-to-ethernet-bridge-gateway-wired-not-wifi-inexpensive-diy-project-for-zha/257020

https://community.home-assistant.io/t/tubes-zb-coordinators-and-routers-was-zigbee-router-on-steroids/280896

MattWestb commented 3 years ago

I dont finding it off topic then this git is about the IKEA ICC-A-1 module and hi have using the information given and putting some back and have getting one Billy EZSP working in ZHA.

For my its not so important holding strick on the topic as long is around the central thing of the git and for the moment its My git repro.

By the way i posting your requested firmware here 2 so you can finding it in the future. ZigbeeBillyRouter.zip

Router firmware with pins for E1743 remote (paring / reset button = pairing button and also BLB if using my bootlooader).

Hedda commented 3 years ago

By the way i posting your requested firmware here 2 so you can finding it in the future. ZigbeeBillyRouter.zip

Router firmware with pins for E1743 remote (paring / reset button = pairing button and also BLB if using my bootlooader).

Nice! Thanks!

I dont finding it off topic then this git is about the IKEA ICC-A-1 module

I meant no offence, I only wanted to inform that how issues are meant to work people should just start a "new issue" for each new specific subject topic of discussion related to the git repo -> https://github.com/MattWestb/IKEA-TRADFRI-ICC-A-1-Module/issues

Yes your git repository here for IKEA ICC-A-1 module but issue https://github.com/MattWestb/IKEA-TRADFRI-ICC-A-1-Module/issues/6 (issue ticket number 6) that I created is specifically about "router".

Yes I know it is your it repo and you can choose to allow anything you like but to not to threadjack is just a basic rule in netiquette.

https://en.wiktionary.org/wiki/threadjack

threadjack = To take over a discussion thread with a subject unrelated to the original posting.

Simply discussing anything other related to ICC-A-1 modules does not make it on-topic in the discussion about "router" firmware.

So, I am only saying that best not to high-jack this specific issue https://github.com/MattWestb/IKEA-TRADFRI-ICC-A-1-Module/issues/6 (issue ticket number 6) with an off-topic discussion that is specifically not related to Zigbee router firmware and instead just started a "new issue" for each new specific subject topic of discussion so that each and every issue ticket can preferably be about only one subject topic if possible -> https://github.com/MattWestb/IKEA-TRADFRI-ICC-A-1-Module/issues

MEME: image

chaisaeng commented 3 years ago

I'm sorry that my post causing problem in this thread. It's my fault that I misinterpret the title that says Zigbee router firmware and project for IKEA Tradfri ICC-A-1 Modules as I thought I'm working on a project for IKEA Tradfri ICC-A-1 Modules as well and it'd related in this thread not knowing that this is mot meant to be related to my project for IKEA Tradfri ICC-A-1 Modules. there for I have to apologize for that my action offend you.

Best regardfs,

MattWestb commented 3 years ago

@chaisaeng You dont need being sorry i have enjoining helping you and what other think and doing is not counting in my git pages. For my you have putting one question in my git and its more then OK.

Hope you dont have blowing more IKEA lights for getting more modules for flashing !!

I have baying the "family pack" with one E27 WW bulb and one E1743 remote for 10€ and killing the bulb for getting the module and its working great only little work for getting the glue away so cang getting inside without destroying the electronic.

Also the E1743 can easy being flashed then its having all the pads you is needing without distorting it and you can flashing back the original firmware if you have dumping it or i can sharing one bin file if you need it :-)) E1743

Its good for testing but not for high power application then its not shielded but its have one nice format and you can using the case as protection so you dont getting shortcuts.

You can finding the pins in the the git pages and ask is you need more information.

chaisaeng commented 3 years ago

@chaisaeng You dont need being sorry i have enjoining helping you and what other think and doing is not counting in my git pages. For my you have putting one question in my git and its more then OK.

Hope you dont have blowing more IKEA lights for getting more modules for flashing !!

I have baying the "family pack" with one E27 WW bulb and one E1743 remote for 10€ and killing the bulb for getting the module and its working great only little work for getting the glue away so cang getting inside without destroying the electronic.

Also the E1743 can easy being flashed then its having all the pads you is needing without distorting it and you can flashing back the original firmware if you have dumping it or i can sharing one bin file if you need it :-)) E1743

Its good for testing but not for high power application then its not shielded but its have one nice format and you can using the case as protection so you dont getting shortcuts.

You can finding the pins in the the git pages and ask is you need more information. @MattWestb Thank you for your kind really appreciate your attention on my question. I have bought 4 set of the family pack with include E1743 and E27 WW bulb (one bulb already exploded) I may take one of the E1743 to flash custom zigbee firmware on it some time. Thanks for you information of how to access the pads for programming. Best regards BTW. I planning to use the module with http://www.hi-flying.com/eport-pro-ep20 and openwrt on that module to build a zigbee coordinator.

MattWestb commented 3 years ago

Dump the firmware (memory aria 0 = the main standard firmware) and user data (memory aria 1 = custom setting for the device like model name and extra settings) before flashing and you can flashing it back and getting it working. J-Link flash tool and also GDB is working OK for doing it.

The Hi-flying Eport Pro-EP20 module looks great its very small and wold being one better Eth module then what @tube0013 (ESP332 mmudul) and tuya is using !! Only missing 5V power so can using one USB power supply but one small buck converter can fitting easy over or under the module.

If you like having one more powerful NCP its possible using the new module from Silabs that IKEA have staring using, its one EFR32MG21. Its in all third gen devices and also in the E2000/2001 remote N2 and i also having nice pads for flashing and its not protected so can dumping the flash and restoring it if needed. IMG_20210503_113654

I have not made one NCP firmware for it but its no problems to do it if you like then i have baying one WSTK and have licence for EZSP stack. For the moment running one tuya / LIDL LED strip controller with the same chip as coordinator on one test network and it working OK.

Hedda commented 3 years ago

I'm sorry that my post causing problem in this thread. It's my fault that I misinterpret the title that says Zigbee router firmware and project for IKEA Tradfri ICC-A-1 Modules as I thought I'm working on a project for IKEA Tradfri ICC-A-1 Modules as well and it'd related in this thread not knowing that this is mot meant to be related to my project for IKEA Tradfri ICC-A-1 Modules. there for I have to apologize for that my action offend you.

No offence taken, just request you to start a "new issue" -> https://github.com/MattWestb/IKEA-TRADFRI-ICC-A-1-Module/issues

My point was that I meant for this specific thread to specifically be about "router" firmware and not about everything else.

The "and project" in the topic is referring to https://forum.smartapfel.de/forum/thread/3820-ikea-tradfri-zigbee-repeater-umbau/ so that is still on the main topic about "router", so I am sorry if that topic was confusing, (will change to make topic subject clearer).

Again, I do not mean to offend either. I just think it makes it easier to discuss read if each issue topic is about one subject.