maximkulkin / esp-homekit

Apple HomeKit accessory server library for ESP-OPEN-RTOS
MIT License
1.1k stars 169 forks source link

Display status information #70

Closed GermanSheepDog closed 5 years ago

GermanSheepDog commented 5 years ago

Hello, I need some status information for my OLED-display:

I like functions like this:

bool homekit_server_paired();
bool homekit_server_pairing();
char* homekit_server_accessory_id();

Is it possible to get the new procedures?

peros550 commented 5 years ago

@RavenSystem @GermanSheepDog

In regards to the pairing status, I have made a proposal in this issue. You may check if the proposed code changes are good enough or not and comment.

https://github.com/maximkulkin/esp-homekit/issues/54

GermanSheepDog commented 5 years ago

@peros550

I have made a very similar change and it worked fine.

My challenges are:

peros550 commented 5 years ago

@peros550

  • Every time a updated github I lost my changes.

I have the same issue. Wondering how could that be overcome if Maxim decides not to implement the proposed changes in server.c file

maximkulkin commented 5 years ago

I have added support for events to esp-homekit. Currently these events are supported:

Also, I've added function to get paired status (if there are any pairings) and function to query accessory ID.

Check out led_status example for usage example.

peros550 commented 5 years ago

@maximkulkin Many thanks for taking the time to implement those additions. Is there any callback/event for wifi disconnection?

maximkulkin commented 5 years ago

No, there is no callback for WiFi, since HomeKit framework does not manage WiFi. On ESP32 ESP-IDF SDK allows you to specify callback for WiFi changes, but on ESP_OPEN_RTOS you need to poll WiFi status manually.

Also, some HomeKit examples use esp-wifi-config library for which I also plan to add support for events (similar to ESP-IDF).

peros550 commented 5 years ago

thanks for the feedback! Have a nice day!

GermanSheepDog commented 5 years ago

@maximkulkin: Many tanks for this new home kit functions. The new functions worked great in my environment.

There is a new issue at led_status example.