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

Sending updated value question. #63

Open
efeion opened this issue Oct 24, 2016 · 1 comment
Open

Sending updated value question. #63

efeion opened this issue Oct 24, 2016 · 1 comment

Comments

@efeion
Copy link

efeion commented Oct 24, 2016

Hello, I have had good success so far with getting an accessory setup. Initial values are displayed and controls sent from my iPhone are working. The thing I am now stuck on is how to notify that there was an update on the accessory? It does not seem like the home app polls for it at any regular interval so the values do not update on their own. I see there is a updateValueFromDeviceEnd() function which sounded promising, but that does not seem to cause any update on my iPhone. Is there a proper way to handle when the accessory has an updated value?

@etwmc
Copy link
Owner

etwmc commented Nov 14, 2016

  1. Maybe you need to uncomment line 199 in PHKNetwork.cpp (I have no idea how it runs now, so it becomes a brute force hacking again)
  2. It's a push notification, so it require server end to notify
  3. in ideal world, you just call updateValueFromDeviceEnd() when the value change, and the notification will push it to all connected clients, but if PHKNetwork.cpp has an encryption problem, iOS will drop the packet and start reconnect.
    (Sorry for taking so long, currently focusing on job hunting)

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

No branches or pull requests

2 participants