Yurik72 / ESPHap

ESP32/ESP8266 Arduino library for native Apple Homekit Accessory Protocol (HAP)
MIT License
265 stars 60 forks source link

Only 7 services? #56

Closed judepereira closed 3 years ago

judepereira commented 3 years ago

In homeintegration.c, the following is defined: #define MAX_HAP_SERVICES 7

However, at the top of the file, MAX_SERVICES is defined as 20.

What’s the difference between these two?

Yurik72 commented 3 years ago

I will check and provide answers in next few days , currently not have access to my PC, as well please describe your wondering an targets

Sent from my iPhone

On 21 Feb 2021, at 06:17, Jude Pereira notifications@github.com wrote:

 In homeintegration.c, the following is defined:

define MAX_HAP_SERVICES 7

However, at the top of the file, MAX_SERVICES is defined as 20.

What’s the difference between these two?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

judepereira commented 3 years ago

My use case is building a hub to which other ESPs will connect to, via ESP NOW. I’ve got it all working (battery powered motion sensors, temp/humidity sensors) to my main hub, but wondering whether I’ll need to use more than one hub to support 10 services (each sensor is one service).

Cheers, Jude On 21 Feb 2021, 17:51 +0100, Yurik72 notifications@github.com, wrote:

I will check and provide answers in next few days , currently not have access to my PC, as well please describe your wondering an targets

Sent from my iPhone

On 21 Feb 2021, at 06:17, Jude Pereira notifications@github.com wrote:

In homeintegration.c, the following is defined:

define MAX_HAP_SERVICES 7

However, at the top of the file, MAX_SERVICES is defined as 20.

What’s the difference between these two?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Yurik72 commented 3 years ago

Ok, MAX_SERVICES is outdated declaration I will remove thjem from the code MAX_HAP_SERVICES is actual and used, 7 is not limited, you can change and use 10 as well, nex version i will make it more configurable or dynamic

judepereira commented 3 years ago

So on the ESP8266, running over 8 accessories with 4 services in each accessory leads to a mem issue. I'm going to test more than 20 accessories on the ESP32 (it's on its way).

Yurik72 commented 3 years ago

Yes, could be memory issue on ESP8266

Any way you can use latest commits, there are a lot of memory optimization and could be better

On ESP32 I need one commit more after full test within 8266 there are some memory leaks, I know how to fix and will be done in the next few days

However for initial test should be OK, there is impact on the long usage and reliabilty

From: Jude Pereira notifications@github.com Sent: Saturday, February 27, 2021 5:05 PM To: Yurik72/ESPHap ESPHap@noreply.github.com Cc: Yurik72 yurik.kovalenko@gmail.com; State change state_change@noreply.github.com Subject: Re: [Yurik72/ESPHap] Only 7 services? (#56)

So on the ESP8266, running over 8 accessories with 4 services in each accessory leads to a mem issue. I'm going to test more than 20 accessories on the ESP32 (it's on its way).

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Yurik72/ESPHap/issues/56#issuecomment-787085675 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDREXIJPCC3FRNOPYHBHG3TBEC2JANCNFSM4X6SFUHA . https://github.com/notifications/beacon/AKDREXNS4XL4QMBVOJBRKSDTBEC2JA5CNFSM4X6SFUHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF3U7S2Y.gif

judepereira commented 3 years ago

Got it. I opened #62 btw. I couldn't find contribution notes anywhere, so just opened a PR :)