Comments (15)
For comparison, here's the log output in Homebridge v1.5.9:
[12/14/2022, 10:41:28 PM] [HB Supervisor] Restarting Homebridge...
[12/14/2022, 10:41:28 PM] [HB Supervisor] Starting Homebridge with extra flags: -P /volume1/homebridge/node_modules -D --strict-plugin-resolution
[12/14/2022, 10:41:28 PM] [HB Supervisor] Starting Homebridge with custom env: {"DEBUG":"HAP-NodeJS:Advertiser","NODE_OPTIONS":"--trace-warnings"}
[12/14/2022, 10:41:28 PM] [HB Supervisor] Started Homebridge v1.5.1 with PID: 27264
2022-12-14T21:41:29.027Z HAP-NodeJS:Advertiser Initializing HAP-NodeJS v0.10.4 ...
[12/14/2022, 10:41:29 PM] Loaded config.json with 0 accessories and 1 platforms.
[12/14/2022, 10:41:29 PM] Loaded 0 cached accessories from cachedAccessories.
[12/14/2022, 10:41:29 PM] ---
[12/14/2022, 10:41:29 PM] No plugins found.
[12/14/2022, 10:41:29 PM] Loading 1 platforms...
[12/14/2022, 10:41:29 PM] Publishing bridge accessory (name: ds2, publishInfo: {
username: 'CC:22:3D:E3:C7:3D',
port: 51826,
pincode: '***-**-***',
category: 2,
bind: undefined,
mdns: undefined,
addIdentifyingMaterial: true,
advertiser: 'avahi'
}).
Setup Payload:
X-HM://00253QFZSWX86
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
┌────────────┐
│ 987-65-432 │
└────────────┘
[12/14/2022, 10:41:29 PM] Homebridge v1.5.1 (HAP v0.10.4) (ds2) is running on port 51826.
2022-12-14T21:41:29.317Z HAP-NodeJS:Advertiser Detected Avahi over DBus interface running version 'avahi 0.7'.
2022-12-14T21:41:29.320Z HAP-NodeJS:Advertiser Preparing Advertiser for 'ds2 0BBB' using Avahi backend!
2022-12-14T21:41:29.326Z HAP-NodeJS:Advertiser Starting to advertise 'ds2 0BBB' using Avahi backend!
from hap-nodejs.
Reading the logs there are two important lines here:
2022-12-14T21:39:21.484Z HAP-NodeJS:Advertiser Detected Avahi over DBus interface running version 'avahi 0.7'.
[...]
Could not create mDNS advertisement. The HAP-Server won't be discoverable: Error: No such interface found
The last line refers to a feature failing introduced with PR #970 which registers to the Server.StateChanged interface to be notified about avahi server restarts.
Secondly, you/Synology are/is running avahi version 0.7 a 6 year old release of avahi. My test environment runs avahi 0.8 so I assume there is some issues with the exposed dbus interface that was updated in the avahi 0.8 release.
Within hap-nodejs, we are using the legacy org.freedesktop.Avahi.Server
instead of the org.freedesktop.Avahi.Server2
interface that got introduced with 0.8. So I'm not sure if there are changes within the "legacy" interface that weren't properly communicated.
That's my currently analysis of the problem. I will investigate further. One possibility is to just gracefully continue if the dbus interface is not found, see:
HAP-NodeJS/src/lib/Advertiser.ts
Lines 416 to 417 in e39faf0
But ideally we find a solution that enables restart detection also for < avahi 0.8 daemons.
Thanks for reporting this issue 🚀
from hap-nodejs.
Looking at the diff between 0.7 and 0.8, there are now changes in regard to the dbus interface used: avahi/avahi@v0.7...v0.8#diff-cda9c20b8570353458c309abfcddcac2c9be7b6fca607ef7b702a7d489ed1648
from hap-nodejs.
Your test in the PR also uses avahi 0.7? See #970 (comment)
from hap-nodejs.
You are indeed right. I was probably still running ubuntu 20.04 back then.
Is there anyway to replicate the synology environment, is there a docker image or something?
from hap-nodejs.
For reference, the error comes from here within dbus-native:
https://github.com/homebridge/dbus-native/blob/fc1a5bf07b448f473923a64e707110e48f0272f6/lib/introspect.js#L33
It is called by introspectBus
which is called by DBusService.getInterface(...)
from hap-nodejs.
You could try to manually debug, by adding a console.log(result);
before that line, maybe (file node_modules/@homebridge/dbus-native/lib/introspect.ts
).
from hap-nodejs.
I think Synology supports multiple DSM installations on the same DiskStation through virtualisation, but I never looked into that. I doubt DSM will run on non-Synology hardware.
In my experience, Synology tends to modify standard software, e.g. they run their own build of nut
.
So “interface” in the error message refers to the dbus
endpoint, not to the network interface.
from hap-nodejs.
So “interface” in the error message refers to the dbus endpoint, not to the network interface.
Exactly. And the issue also only evolves around the org.freedesktop.Avahi.Server
interface of the org.freedesktop.Avahi
service. We use that to subscribe to the StateChanged
signal.
For our other commands we use the org.freedesktop.Avahi.Server
(to check the version and create a new entry group) and org.freedesktop.Avahi.EntryGroup
(adding the mDNS service and advertising it) interfaces. Though, in those instances we only do a request-response style of communication (in hap-nodejs this is implemented in AvahiAdvertiser.avahiInvoke
). The StateChanged
signal is the only occurrence where we actually subscribe to signals of an interface (implemented via AvahiAdvertiser.avahiInterface
.
from hap-nodejs.
The result is just a newline. The xml reads:
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
</node>
from hap-nodejs.
Hm. I mean, we could incorporate a workaround where we just don't care about hooking the StateChanged
listener, maybe printing a little warning if we can't explaining that we won't be able to detect restarts.
But I would really interested why this doesn't work on Synology.
It's not about dbus itself is it (idk difference in version etc)? Maybe there is some issue within dbus-native? But the response is completely empty, so something must be going wrong even before that.
from hap-nodejs.
$ dbus-daemon --version
D-Bus Message Bus Daemon 1.12.16
Copyright (C) 2002, 2003 Red Hat, Inc., CodeFactory AB, and others
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
That's an old one, my Raspberry Pi servers running bullseye report 1.12.24 (with the same 2002, 2003 copyright message).
$ avahi-daemon --version
avahi-daemon 0.7
Nothing here that we didn't already know.
from hap-nodejs.
ping @adriancable, any ideas on this?
from hap-nodejs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from hap-nodejs.
I installed a workaround in the latest beta release of hap-nodejs 0.11.1 and homebridhe 1.6.1.
See #1003.
from hap-nodejs.
Related Issues (20)
- Accessories states in Home App does not update when controlled manually HOT 12
- handleSnapshotRequest reason sometimes passed in as "undefined" HOT 2
- allow to specify a different IP in mDSN advertisement HOT 2
- Special Characters in Name HOT 6
- Node 16 to 18 update - Alpine - Docker - Synology
- node.js update HOT 1
- Node.js Update HOT 1
- Minimum Current Ambient Light Level warning HOT 1
- Lot of mDNS queries HOT 7
- Test permissions on "persist" storage location before publish
- `updateCharacteristic` won't work after `Client connection closed` HOT 11
- "ControllerStorage for accessory XXX was already initialized!" HOT 1
- How to run HAP-NodeJS inside Docker container HOT 5
- How to update the device status HOT 5
- TypeError: crypto_1.default.getCiphers is not a function at Object../node_modules/hap-nodejs/dist/lib/util/hapCrypto.js HOT 6
- VOC Density characteristic incorrectly set as a float and limited to 1000 HOT 4
- Setting Characteristic minValue via setProps results in debug error if the current value is lower than the new minValue HOT 6
- TypeScript plugins do not build with noImplicitAny: true in 1.6.0 HOT 11
- Interpreting Siri Commands HOT 7
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 hap-nodejs.