Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
14.52k stars 3.11k forks source link

Matter support #2871

Open derpate1989 opened 1 year ago

derpate1989 commented 1 year ago

Hi, is a Matter Update possible? :) That would be a huge gain for Wled and various smart home systems.

Aircoookie commented 1 year ago

Matter support would definitely be great as it might just be the missing link to make WLED devices work locally with all common smart speakers. Right now I see three main issues, which I hope can be solved:

Still I am enthusiastic for the Matter standard, if only for realizing that a unified smart home standard is necessary and that mandatory device vendor clouds are a terrible idea.

derpate1989 commented 1 year ago

Thank you for this detailed explanation! I have a lot of hope in Matter and look forward to this standard. Maybe someday there will be a way for Wled and Matter :)

DoomHammer commented 1 year ago

Matter support would definitely be great as it might just be the missing link to make WLED devices work locally with all common smart speakers. Right now I see three main issues, which I hope can be solved:

  • There should be an Arduino library for it (this seems like a starting point already)
  • It requires encryption, and unless the matter specification allows self-signed certs (which I doubt), it will be a pain to have a PKI infrastructure. Also, due to memory constraints, this will rule out matter ever working on ESP8266.
  • I am not sure whether Bluetooth provisioning is optional or a core requirement of the Matter specification. Bluetooth on ESP32 is supported, but uses an extreme amount of memory and storage, which is why we steered clear of using it within WLED thus far.

Still I am enthusiastic for the Matter standard, if only for realizing that a unified smart home standard is necessary and that mandatory device vendor clouds are a terrible idea.

If it's not possible to do entirely on a device, maybe a bridge could help here?

Aircoookie commented 1 year ago

That's a nice idea, it should definitely be feasible to make some software to act as a bridge between the JSON API and Matter protocol(s), and it would even support ESP8266 units. Native support would be ideal though.

jasta commented 1 year ago
  • I am not sure whether Bluetooth provisioning is optional or a core requirement of the Matter specification. Bluetooth on ESP32 is supported, but uses an extreme amount of memory and storage, which is why we steered clear of using it within WLED thus far.

I don't believe it is. The spec says that there are 3 methods, BLE, WiFi SoftAp (which no one is using today unfortunately), but also existing DNS-SD if you're already on the local network. This last case seems perfect for WLED which is already so easy to get setup to connect to WiFi.

It seems that it just needs to register some mDNS records like _matter._udp/_tcp maybe? I'm still trying to get full access to the spec to read the details myself and start playing around with this a bit.

Chase295 commented 1 year ago

Is there any new stuff or soultion a "bridge" or any think else becous i would like to add it in the nanoleaf app for the new Nanoleaf 4D

blazoncek commented 1 year ago

Unless someone with knowledge and programming skills joins in there will be no progress.

heho0011 commented 1 year ago

Hi, maybe Matter can be implemented the same way as in tasmota for esp32? https://github.com/arendst/Tasmota/discussions/17872?sort=new

Stoffe commented 1 year ago

Seems like Espressif has a new esp32 with support? https://www.espressif.com/en/news/ESP32-C6_Available

And using Yacubane esp32 lib, you could maybe implement matter in esp32 or take ideas from... https://github.com/Yacubane/esp32-arduino-matter Here is a video of the install, https://www.youtube.com/watch?v=HpACspFygUI

might be something to look into... I would also upvote this feature for sure.

marcoscv-work commented 11 months ago

I have seen that tasmota already has support for Matter. I've been testing and works fine in homekit. it's interesting because they provide ESP8266 support by ESP32, Looks promising and a really good idea. https://tasmota.github.io/docs/Matter/

Right now all solutions to integrate WLED in homekit are pretty painful, implementing matter in some way would be awesome.

jonahnm commented 11 months ago

I will be attempting to implement this soon.

khimaros commented 11 months ago

@Aircoookie thank you for the detailed breakdown, a few questions inline:

* There should be an Arduino library for it ([this](https://github.com/jakubdybczak/esp32-arduino-matter) seems like a starting point already)

what sort of signal would you look for in this library to consider it ready for use in WLED?

i filed https://github.com/Yacubane/esp32-arduino-matter/issues/44 re: publishing to platformio registry, but i'm not sure if you consider this a blocker.

* It requires encryption, and unless the matter specification allows self-signed certs (which I doubt), it will be a pain to have a PKI infrastructure. Also, due to memory constraints, this will rule out matter ever working on ESP8266.

from what i've been able to find, there is no restriction placed on which CAs are used or any other verbiage limiting use of self-signed certificates in the spec.

if this were restricted, a workaround is to use LetsEncrypt with real domain name the user controls, or to trust/use a services such as https://sslip.io/ or https://backname.io/ to get valid certs with any IP address (including private blocks).

* I am not sure whether Bluetooth provisioning is optional or a core requirement of the Matter specification. Bluetooth on ESP32 is supported, but uses an extreme amount of memory and storage, which is why we steered clear of using it within WLED thus far.

the library you linked (https://github.com/jakubdybczak/esp32-arduino-matter) "comes with precompiled NimBLE, because default Bluedroid shipped with arduino-esp32 takes too much RAM memory", does that resolve your concern?

Still I am enthusiastic for the Matter standard, if only for realizing that a unified smart home standard is necessary and that mandatory device vendor clouds are a terrible idea.

it would be awesome for users to be able to use their existing apps and assistants to also control their WLED devices. great for spouse approval of these devices :)