Giter Site home page Giter Site logo

Comments (7)

shahpiyushv avatar shahpiyushv commented on June 24, 2024

@shaurya0406 , hap_char_update_val() indeed is sufficient to invoke event notification. However, the controller first needs to subscribe to it. Can you call the function hap_http_debug_enable() before hap_start() and see if the controller is subscribing to the events? Even without these additional debug messages, you should atleast see text like this if the controller is subscribing to the event notifications

Events Enabled for aid=1 iid=12

from esp-homekit-sdk.

shaurya0406 avatar shaurya0406 commented on June 24, 2024

Thank you for the quick reply.
I am getting these logs:
Events Enabled for aid=3 iid=9
Events Enabled for aid=4 iid=9
Events Enabled for aid=4 iid=11
Events Enabled for aid=2 iid=11
Events Enabled for aid=2 iid=14

This is for bridge accessory

from esp-homekit-sdk.

shaurya0406 avatar shaurya0406 commented on June 24, 2024

It was an error on my side.
I forgot to call hap_serv_get_char_by_uuid() in the bridge thread so I was updating to unknown characteristic.
Thank you
and I am closing this issue

from esp-homekit-sdk.

skylli avatar skylli commented on June 24, 2024

@shahpiyushv

HomeKit App still can't get the notification from outlet when run examples/smart_outlet.

I just idf.py build the examples/smart_outlet project, and burn to my esp32 board, but my homekit app still can receive any notification on my iphone.
My esp32 board can receive the http request from homekit app when i tap the button.
Here is my log:

Socket fd: 51; HTTP Request GET /characteristics?id=1.12
Generating HTTP Response
{"characteristics":[{"aid":1,"iid":12,"value":true}]}
Socket fd: 51; HTTP Request PUT /characteristics
Data Received: {"characteristics":[{"aid":1,"iid":12,"value":0}]}
I (521178) HAP outlet: Received Write. Outlet Off
_hc->format 1  val 0 old val 1
Value Changed 1
E (524548) Button:  press
Value Changed 1
Notification Sent
Socket fd: 51; Event message: {"characteristics":[{"aid":1,"iid":13,"value":false}]}
D (524558) [system, 51]: handle tap event
I (524558) HAP outlet: Outlet-In-Use triggered [0]

What am I going to do to get device notification?

from esp-homekit-sdk.

shahpiyushv avatar shahpiyushv commented on June 24, 2024

@skylli , how exactly are you checking this? You have to tap and hold the Outlet tile n the Home app, then go to Settings (gear icon on bottom right) and there you can see the outlet in use status changing. Once you press the button, it will show the value as No, and on releasing it will show Yes. Check this screen recording.

RPReplay_Final1616078167.MP4

P.S. There could be other ways of checking Outlet-In-Use, but this is where I check it.

from esp-homekit-sdk.

skylli avatar skylli commented on June 24, 2024

@shahpiyushv
Thank you for your quick reply
I didn't notice that there were no hap_serv_get_char_by_uuid(service, HAP_CHAR_UUID_ON) in this example.

from esp-homekit-sdk.

leotordo avatar leotordo commented on June 24, 2024

hap_serv_get_char_by_uuid()

Hello,
I've a similar problem with my board. I driver a led from Home app and works fine.
I've a mechanical switch to switch on/off the led that I read on a input pin of my ESP32.
Can you give me help to update the status on the iPhone?
The led turns off, but on the Home app it remains on
Thanks
Andrea

from esp-homekit-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.