Skip to content
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

New MagicHome RGBW controller with BL602 (RISC-V) support #1049

Open
exentio opened this issue Dec 21, 2020 · 19 comments
Open

New MagicHome RGBW controller with BL602 (RISC-V) support #1049

exentio opened this issue Dec 21, 2020 · 19 comments

Comments

@exentio
Copy link

exentio commented Dec 21, 2020

Describe the problem you have/What new integration you would like

The classic MagicHome LED controllers just switched from ESP8266 to an SoC called BL602, apparently based on RISC-V. I accidentally got one while ordering LED controllers from AliExpress, expecting to get the classic ESP one. They're probably all gonna switch to this SoC, which is also way better (supports Bluetooth). I'd be happy to help test the porting!



Please describe your use case for this integration and alternatives you've tried:

ESPhome does not support this new SoC yet, neither do Tasmota and others.

Additional context

All the info I was able to find:
https://community.openhab.org/t/risc-v-based-bl602-magichome-rgb-led-strip-controller/109704
https://www.reddit.com/r/homeassistant/comments/jwylhx/need_some_help_flashing_tasmota_to_a_new
https://forum.creationx.de/forum/index.php?thread/3098-magichome-wlan-controller-v1-2-tasmota-flashen/&postID=35506#post35506
https://www.bouffalolab.com/bl602
https://github.com/bouffalolab/bl_iot_sdk
https://github.com/bouffalolab/bl_docs
https://github.com/pine64/bl602-docs
https://github.com/spacemeowx2/blflash
https://github.com/mkroman/bouffalo-cli
https://github.com/stschake/bl60x-flash

@randybb
Copy link

randybb commented Dec 22, 2020

As @OttoWinter mentioned earlier "Not an ESP, so not for ESPHome. Sorry"

@randybb randybb closed this as completed Dec 22, 2020
@glmnet
Copy link
Member

glmnet commented Dec 22, 2020

As @OttoWinter mentioned earlier "Not an ESP, so not for ESPHome. Sorry"

Actually partially correct, the project can very well be extended for others SoC, that would make it way more difficult to maintain though. I'm not in the mood to do much research but if it works for with PlatformIO and Arduino then development is just on our side.

OFF, that SOC seems to have built in flash, that's a big advantage over classic esp8266

@randybb
Copy link

randybb commented Dec 22, 2020

Sure, theoretically it could be extended to any Arduino lib compatible devices, but this one is not compatible.
Otto denied compatibility for Seeduino Wio Terminal powered by SAMD21 that is fully compatible with Arduino libs and in this case it would not be too hard... Well, at least for SAM MCU, then we would need have support for RTL8720DN that is used for WLAN/BLE. Maybe this could be a good start for Bluetooth mesh, Thread, Zigbee, 802.15.4, ANT and 2.4 GHz proprietary stacks support.

@glmnet
Copy link
Member

glmnet commented Dec 22, 2020

#812

It's not same but is quite similar

@Citrullin
Copy link

@exentio Where did you buy it? Do you have a link?

@exentio
Copy link
Author

exentio commented Feb 11, 2021

I wasn't the one who made the order so I don't have the link, sorry

@gusman80
Copy link

gusman80 commented Mar 1, 2021

Hei i started fiddling around with this board and made a simple firmware to test around the PWM outputs.
i started out of the info provided right here: https://lupyuen.github.io/articles/book
the author's super kind, answers quickly on reddit and provides very good information.
I don't think its possible to support this completely different architecture within this project.

Still - for those who are stuck with magichome's $#%firmware - Here is the Layout of the new MagicHome >>

RGBW controller MagicHome ZJ-BWCE-IR-RGBW V1.2
PIN gpio Asset PWM-Channel
4 gpio3 Red pwm3
5 GPIO4 Green pwm4
9 ANt RF
16 gpio7 RX
17 gpio8 Boot Pin
21 gpio12 IR Pin
27 gpio16 TX
29 gpio20 WHITE pwm0
30 gpio21 BLUE pwm1

have great fun

@glmnet
Copy link
Member

glmnet commented Mar 1, 2021

Well I believe we should support the esp32 c3 which is risc v

unfortunately I don’t own one and can’t get them in my country.

I accept shipments via DHL or FedEX 🙃

@glmnet
Copy link
Member

glmnet commented Mar 1, 2021

I believe that will mean supporting risc v in general. Not sure yet I’m slow to grasp new stuff

@Citrullin
Copy link

Citrullin commented Mar 2, 2021

Well I believe we should support the esp32 c3 which is risc v

unfortunately I don’t own one and can’t get them in my country.

I accept shipments via DHL or FedEX upside_down_face

I contacted a couple of seller on Aliexpress. This seller told me that their product uses the BL602. (e: It was a lie, it doesn't uses the BL602)
Ohh shit, I just looked it up: 40 Euro to send it to Argentina. That is crazy.

@glmnet
Copy link
Member

glmnet commented Mar 2, 2021

Yeah it is

@gusman80
Copy link

gusman80 commented Mar 2, 2021

image
i ordered many different magichome layouts ... you can recognize the devices with a 50% bl602 rate by these weird octagon cornered casings
i ordered mine on ebay 283947655801

@Citrullin
Copy link

image
i ordered many different magichome layouts ... you can recognize the devices with a 50% bl602 rate by these weird octagon cornered casings
i ordered mine on ebay 283947655801

I can confirm this. My success rate 100% with it.

@lanrat
Copy link

lanrat commented Aug 3, 2021

I ordered 4 with the diagonal corners from 3 different sellers, all contained the BL602.

@RoganDawes
Copy link

I see https://github.com/pine64/ArduinoCore-bouffalo, but apparently no support yet in platformio, which is a bit of an obstacle. I note the aim to make it as compatible as possible with the ESP*, which should simplify things a bit, perhaps.
I don't really imagine that use of RiscV vs Xtensa cores should make much of a difference, that's simply down to the compiler, surely?

@normanr
Copy link

normanr commented Sep 6, 2021

fyi: I filed a bug to add support in PlatformIO: platformio/platformio-core#4046

@maxgerhardt
Copy link

maxgerhardt commented Sep 13, 2021

If anyone can help test my PlatformIO integration (platformio/platformio-core#4046 (comment)), please let me know your results. You should be able to compile + upload to a BL602 based board with the Pine64 Bouffalo Arduino core, such as the DT-BL10 or Pine64 PineCone board.

@bdraco
Copy link
Member

bdraco commented Nov 13, 2021

Well I believe we should support the esp32 c3 which is risc v

unfortunately I don’t own one and can’t get them in my country.

I accept shipments via DHL or FedEX 🙃

@glmnet

If you are still looking for some I have a few extra from testing other projects left over. Happy to ship.

Email nick at koston dot org

@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2022
@ssieb ssieb reopened this Jan 5, 2023
@esphome esphome unlocked this conversation May 17, 2023
@geoffrothman
Copy link

For anyone stumbling on this via google search later on, here's a link to opensource firmware that can add it to esphome: https://community.home-assistant.io/t/open-source-firmware-for-new-sonoff-products-or-any-other-bl602-based-iot-device-with-youtube-guide/536935

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests