-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Motion sensor example for Zigee #10684
Comments
Hi @ilker-aktuna, there is currently no PIR endpoint available in the Zigbee library. |
ok. what is the correct path for creating my own implementation ? |
Here you can find the tempSensor EP source file. If you will have any working example + sources for the EP PIR sensor, feel free to open a pull request with this addition. I will be glad to help on that to make it available for everyone :) |
ok thank you. |
There is no default config for PIR motion sensor in esp-zigbee-sdk. You may need to create your own "default config", which means declaring the clusters it should contain. To be honest it's not that simple to do a new EP type with all the stuff around. Maybe you can keep this feature request open and I will take a look into it and add the implementation in future updates. I am planning to add a Common sensor device type, where you will be able to add any clusters into it easily. So you will be able to create a single/multi sensor device. |
ok. good. |
Hi @ilker-aktuna, you can check the PR I linked. I have added the PIR motion sensor (occupancy) endpoint. |
sorry for hijacking :-)) -> could you add environmental sensors too? CO2, VOC sensor? |
In progress right now :) almost done with the CO2. |
I could get the example from the PR but I also need the updated core library to test this. |
@P-R-O-C-H-Y |
@ilker-aktuna Please follow the Manual installation part of documentation. You can use the branch you downloaded instead of cloning :) https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#windows-manual-installation |
@P-R-O-C-H-Y |
@ilker-aktuna If you go to the Arduino IDE Tools menu -> Board: |
ok. now I compiled and trying with my Hubitat hub. The device starts , then I start pairing on my Hub. On the device, I see that it is rebooting while tryign to connect to Zigbee network:
|
if I put the log level to "verbose" , I get this line before reboot:
I see in the code:
but I don'T understand why it goes into that. Hub is still in pairing mode when it does that. |
This If you want to investigate this further, you will need to sniff the Zigbee network and send us a pcap file from the WireShark. Do sou have another C6/H2 devkit available? |
@P-R-O-C-H-Y |
@ilker-aktuna please follow this comment: #10601 (comment) |
@P-R-O-C-H-Y |
@P-R-O-C-H-Y |
I followed the tutorial and did everything.
on COM19 , I have the esp32-c6 with esp_ot_rcp binary I have the key "5A:69:67:42:65:65:41:6C:6C:69:61:6E:63:65:30:39" on pre-configured keys list Wireshark protocol zigbee. then what is missing ? |
The |
I am closing this issue as it's solved by #10720. But let's continue here with the "debugging" on the Hubitat. |
@P-R-O-C-H-Y |
@ilker-aktuna I don't know honestly what may be wrong. I assume you set up everything correctly by following the manual. |
@P-R-O-C-H-Y |
@ilker-aktuna Sharing a binaries for Zigbee (OpenThread) sniffer for both C6 and H2. |
@P-R-O-C-H-Y |
@P-R-O-C-H-Y |
Its hard to tell as I did not experienced that issue. |
@P-R-O-C-H-Y I got the log on idf monitor:
|
It looks OK, so its booting fine. |
I will try on a Raspberry PI now. First I have to install wireshark and pyspinel |
I am sorry but you will have to find out. Try searching it as you know what OS and RPi you are running. |
@P-R-O-C-H-Y no errors So I tried 2 different Windows installations, 1 raspberry pi installation None of these scenarios received a packet. I assume there is something wrong, or that I do miss. Btw, today I tried the occupancy sensor on my friend's home assistant setup with a zigbee dongle. How else can I troubleshoot ? |
@P-R-O-C-H-Y I have tried to burn ESP32C6 with your bin files (Sniffer), but do not get any output. |
@P-R-O-C-H-Y , @michapr |
If you can folks install the ESP-IDF v5.3 and build/flash it on your own by using idf.py command. The main difference I there might be is a Board you are using and idk yours, but I sm using a UART port on the H2 Espressifs devkit. Can you tell me your setup? |
I already compiled myself and flashed using idf.py before you shared the binaries. I had the same result. |
@P-R-O-C-H-Y So I got the attached traces showing the issue on my zigbee network. So the first file is capture when my hub has already paired and shows a motion sensor. Btw, do you have any idea on how I can use sniffer on esp32-c6 zero which has no UART port ? |
Is this something that is already on the horizon, or to complex for a quickshot? Im currently failing on adapting TempSensor example and registering a cluster for an object speed measuring sensor. Basically I only need one float attribute speed but had yet no luck on figuring out the co working with esp zigbee SDK. https://docs.espressif.com/projects/esp-zigbee-sdk/en/latest/esp32/user-guide/zcl_custom.html |
@P-R-O-C-H-Y |
Related area
Zigbee , ZHA
Hardware specification
Support for motion sensor
Is your feature request related to a problem?
I am working on a motion sensor. Is the motion sensor feature available in Zigbee stack ?
if yes, where can I find an example code ?
Describe the solution you'd like
motion sensor zigbee example
Describe alternatives you've considered
No response
Additional context
No response
I have checked existing list of Feature requests and the Contribution Guide
The text was updated successfully, but these errors were encountered: