Comments (6)
Hi
Yes, homekit_setup_mdns() uses name of the first accessory only. It is considered to be "the main" accessory and thus it's category and name is used. This is the case for accessory bridges: the bridge accessory goes first, then all other accessories. Thus, overall the advertised name of the accessory and it's category is derived from accessories[0]. esp-homekit does not support running multiple servers on the same device.
All IDs are automatically assigned if you did not assign them manually. It traverses the accessory-service-characteristic graph in order the are defined and assigns IDs sequentially unless it encounters non-zero ID in which case it will keep it and continue to assign IDs from the next ID. This is done to support controlling IDs in case some accessory/service/characteristic was removed in new firmware, but you want to keep all other accessory/service/characteristic IDs unchanged (and this is the advised way of doing it in HomeKit spec).
Regarding your code, I have found one problem. When you allocate characteristics array with size depending on whether it is dimmer or not, you're off by one: you need an extra element for the NULL pointer at the end. I also would recommend just having array of size 4, it does not hurt and it is less error prone.
from esp-homekit.
Regarding your code, I have found one problem. When you allocate characteristics array with size depending on whether it is dimmer or not, you're off by one: you need an extra element for the NULL pointer at the end. I also would recommend just having array of size 4, it does not hurt and it is less error prone.
Nice catch! I doubt this is what is causing my issue though...? Or maybe it is..?
Can you think of anything that would be causing my accessories that are separated to intermittently go 'No Response'?
from esp-homekit.
When you say "both accessories will go No Response", "both" means configured accessories within one physical device, right? Did you check console logs? Does it crash?
from esp-homekit.
Correct. Single/physical ESP controller, but with the separate_accessories
flag set, so I can place them in different rooms.
I changed it to characteristics[4]
, but the issue remains.
I do not think they are crashing; the status LED flashes for 10 seconds after a reboot, and I haven't noticed this. I will double-check and revert back.
from esp-homekit.
Should I be creating a separate Accessory with category homekit_accessory_category_bridge
? And then add each homekit_accessory_category_lightbulb
as separate accessories after that? It does seem strange that one light has 'Bridge >' in its settings, which links back to the other light.
I want to add some Custom Characteristics to log number of restarts. But; I do not want to add it to all lights, or even just one light. Can you add Custom Characteristics to the 'Bridge' accessory? So something like this;
Accessories
Bridge Accessory
Accessory Information Service
Name Characteristic
Firmware Characteristic
**Custom Characteristic**
Lightbulb Accessory (1)
Accessory Information Service
Name Characteristic
Firmware Characteristic
Lightbulb Service
On Characteristic
Brightness Characteristic
Lightbulb Accessory (2)
Accessory Information Service
Name Characteristic
Firmware Characteristic
Lightbulb Service
On Characteristic
Brightness Characteristic
Normally I add the custom characteristic to the main service (I added some to a HEATER_COOLER
), and it shows up in the Eve App.
Looking at your code, I don't see anything specific to Bridge Accesories. Homebridge and Espressif's HomeKit SDK both set some kind of is_bridge
flag for the first Accessory..
from esp-homekit.
I have added the Custom Characteristic that tracks number of restarts, and last restart reason. After seeing the device go 'No Response' for a few minutes and come back, I checked the Characteristic in Eve, and found that it had not restarted. So something else is happening.
Any other thoughts?
from esp-homekit.
Related Issues (20)
- Cannot find device after removing it. HOT 1
- QUESTION : Dynamic "name" after init_accessory - without esp restart HOT 3
- Server limited to 25 characteristics HOT 4
- How to use ESP8266 as AccessPoint
- 'Hidden' Flag Doesn't Work?
- Performance on iOS 16 beta HOT 1
- HOMEKIT_SERVICE_DOORBELL not found
- Can this be used as a proxy for the Level Lock? HOT 1
- Request pairing on demand by variable HOT 3
- Failed to dump SPR public key (code -199) HOT 3
- How to install in ESPhome running on Home Assistant HOT 1
- HOMEKIT_SERVICE_HUMIDIFIER_DEHUMIDIFIER
- wifi:bcn_timeout,ap_probe_send_start HOT 2
- Question: arduino as esp-idf component HOT 1
- Question: esp-idf v5.0
- Reason using PORT 5556 HOT 3
- ESP8266 not reachable after MDNS restart HOT 7
- ESP8266 Accessory No Response HOT 2
- I can't name the switch with different name in same accessory HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-homekit.