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

Indicator matter #24

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Timo614
Copy link

@Timo614 Timo614 commented Aug 29, 2023

Adds "indicator_matter" which is a version of indicator_basis with support for matter provisioning and some basic features requested via the call for help project page.

Primarily:

  • Adds temperature and humidity devices for tracking via matter (co2 and voc didn't fit well with 1.0 devices unfortunately)
  • Adds 3 other devices (2 dimmers and a door lock) to show off the capabilities associated with custom lvgl buttons and elements triggering matter based automations
  • Logic handles callbacks from matter for updating the existing state as well

Just pushing up for now as part of the project deliverables (will link this PR from the project request page).

https://photos.google.com/share/AF1QipNSgP0x3VHC4D1SGsiRcTuWa9qzAcE7PdVfn3XSmnu2Wm38uMu8VvHdaM1O17W-fw?key=d1VPV3JkRlVyd3M4MzFmd1dpb1dvdEsxOGN1c3RR

@Timo614
Copy link
Author

Timo614 commented Aug 29, 2023

I pushed up an additional commit to clean up the logic a bit further. I shouldn't need to touch it again just was removing some earlier iteration elements and combining a view event loop to reduce the memory usage a bit further.

@Timo614
Copy link
Author

Timo614 commented Sep 1, 2023

Going to close this out, apologies here, the approach taken here was to create devices and then trigger automation based on that but the desired state is to have the matter app handle controlling other matter devices directly via the binding logic. Given this doesn't do that and I'm not sure of a way to do it on Google Home or Apple closing in favor of letting another developer with more experience grab the underlying issue.

@Timo614 Timo614 closed this Sep 1, 2023
@Timo614 Timo614 deleted the timo614-indicator-matter branch September 1, 2023 11:36
@Timo614 Timo614 restored the timo614-indicator-matter branch September 1, 2023 13:04
@Timo614 Timo614 reopened this Sep 2, 2023
@alistair23
Copy link

What's the status here? The documentation states that this is supported

@Timo614
Copy link
Author

Timo614 commented Apr 1, 2024

Worked for me without issue -- the reviewer was having some issues connecting with their home assistant device at the time. Matter support in the environment was fairly new at the time I had worked on this so it was in a bit of a flux from a home assistant support perspective. I imagine various home assistant support for Matter is much better now though if they want to take another look.

I have a little time in a day or so and can confirm if things still work from a fresh install / environment.

@Timo614
Copy link
Author

Timo614 commented Apr 3, 2024

I took a look into the repository and the underlying ESP version (5.0.1) that was used here for the indicator at the time is now broken because of some incompatibility. They patched that with a commit but only to the release branch for 5.0 versus the individual versions.

That said it looks like this repo has been updated since this PR to move away from the need to use the patch and it should be able for us to use a more recent ESP IDF version as a result. I'll take a look at updating this PR time permitting to work with the latest versions and update the demo to reflect some of the more recent updates made to the merged examples over the next week or so.

@Timo614
Copy link
Author

Timo614 commented Apr 11, 2024

I made a few modifications to the branch and added the experimental env var. I'm able to connect and still operate the demo on my end with esp idf's 5.1 version. Let me know if anyone runs into any issues.

@alistair23
Copy link

Tested against IDF 5.3 and I can add the device to a Matter network.

I'm looking at customising it a bit to show different information. Any hints on where to start to display information from Home Assistant and to send custom information?

@Love4yzp
Copy link
Collaborator

Any hints on where to start to display information from Home Assistant and to send custom information?

To works with it, as there is no integration, so we could use API. I just used MQTT, RESTful and websocket.

@Timo614
Copy link
Author

Timo614 commented May 2, 2024

For the matter related stuff in particular:

The callbacks from the controller: https://github.com/Timo614/SenseCAP_Indicator_ESP32/blob/timo614-indicator-matter/examples/indicator_matter/main/model/indicator_matter.cpp#L181
Here I took the value, stored it, and triggered an event related to the dashboard data being updated.

The endpoints are configured here: https://github.com/Timo614/SenseCAP_Indicator_ESP32/blob/timo614-indicator-matter/examples/indicator_matter/main/model/indicator_matter.cpp#L465

And it's handling the view events here: https://github.com/Timo614/SenseCAP_Indicator_ESP32/blob/timo614-indicator-matter/examples/indicator_matter/main/model/indicator_matter.cpp#L357

So with the Home Assistant setup for Matter it can provision whatever endpoints are connected to the device and then add it to a dashboard etc. There are standard device types out there which make it easier to connect to various systems and some clients restrict features / devices. I found the esp-idf way of handling Matter a lot more intuitive than the zaptool personally.

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

Successfully merging this pull request may close these issues.

4 participants