-
Notifications
You must be signed in to change notification settings - Fork 174
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
Fan matter device (CON-1519) #1250
Comments
Hi @herculesp17 , I have tested the fan device before, you can refer to my example: https://github.com/Jerry-ESP/esp-matter/tree/add_fan_example_test/examples/fan, this is a simple fan without any features, the only point you need to focus on is the fan mode should be correspond to the percent. You can add your fan driver in this function: app_driver_fan_set_percent() |
For the detail function of the fan, you can refer to this document: Matter 1.4 Application Cluster Specification https://csa-iot.org/developer-resource/specifications-download-request/ |
@Jerry-ESP Thanks for the help :) I will try it out this weekend! |
@Jerry-ESP Hey i tried your example and i configured everything as i need. I dont have a percentage slider in home assistant. do you know what I'm missing to get that? |
Can you share your code and the screenshot for home assistant? |
sure, I just updated the repo. A picture of homeassistant is in the README. It says the the device is not available, because it wasn't on when i took the picture, but it looks exactly the same when connected. |
Describe the question/query that you have
I want to create a Matter device with two fan endpoints. The fans I have are each controlled by one single PWM pin. First, I created a device with two dimmable light endpoints, which I got working after a while. With the slider in the Home Assistant app, I can control the two endpoints and change the brightness of the LEDs. Then I wanted to do the same for a fan device, but it seems to be more complicated. I first tried the all device example provided and commissioned it with Home Assistant. In there, I had an on/off toggle button and a percentage scaling similar to the dimmable light. When I created my own fan device though, I only have some kind of an on/off switch and a button where I can set the fan mode in my app, but no percentage settings and no on/off toggle button as I have it in my dimmable light app. Also, when I turn on the fan in the app, it automatically turns off again and no pins are triggered. I thought when I initialize the fan endpoint like below, all the clusters are initialized as well. I did the initializing as below:
From the esp_matter_endpoint.h i found the following section for the fan:
In the esp_matter_clusters.h I found the following information:
Unfortunately, it did not work as expected. And I tried to add cluster like described here, but this didn't change anything either. I also tried to adjust main app_driver.cpp to update the attributes but that didn't work as expected either:
I have also another issue like described in #1074 where I wanted to change the names in the Home Assistant app for the different endpoints, but the name stays the same (Fan (1) and Fan (2)) although I did the following:
Additional context
idf version: ESP-IDF v5.4
dimmable light repo
fan repo
So in the end I want my device to work as my dimmable light example. If I have to have fan modes definded this is not a problem and I also want the product label and or node label to be visable in the homeassistant app after commissioning. I hope someone can help me. I really like the esp matter idf and i want to develop some products, but my programming skills are just growing as of now.
The text was updated successfully, but these errors were encountered: