thkl / hap-homematic

a AddOn for HomeMatic CCU3 (Raspberrymatic) that will bring HomeKit to your CCU
MIT License
221 stars 25 forks source link

Support avahi or ciao as mdns advertiser #540

Closed california444 closed 9 months ago

california444 commented 2 years ago

Is your feature request related to a problem? Please describe. The current version of the plugin uses bonjour as mdns library. Bonjour advertises only on IPv4 and causes a lot of unnecessary network traffic.

Describe the solution you'd like Recent versions for Hap-NodeJS are offering avahi or ciao as mdns advertiser. Both, avahi and ciao cause a lot less network traffic. Avahi (and probably ciao in the near future as well ) also support IPv6.

Additional context I wanted to know if there are any plans to update the plugin to a newer version of Hap-NodeJS and to offer users the option to change the mdns advertiser.

thkl commented 1 year ago

It should be possible but .. as for my knowledge, later version of hap-nodejs will require a later version of node js which is not available at the ccu3 firmware. So updating the hapnodejs version will break the add-on for ccu3 users ...

california444 commented 1 year ago

Hi @thkl, hap-node-js needs node.js >= 10.17 (https://github.com/homebridge/HAP-NodeJS/blob/master/package.json).

I'm using RaspberryMatic and my help page says it has node.js v14 installed. And it looks like that CCU3 users should have the same, but not 100% sure. IMG_3451

According to this, it should not be a problem. Would be helpful if a CCU3 user could confirm this...

ChrWi commented 9 months ago

Siehe https://github.com/thkl/hap-homematic/issues/621#issuecomment-1561420030 Die Original CCUs haben folglich nodejs kleiner 10. solange sich EQ3 hier nicht neu aufstellt, geht es also nicht

california444 commented 7 months ago

For everyone with RaspberryMatic: Updating HAP-NodeJS to version 0.11.1 and changing to ciao as advertiser worked seamless for me:

roe1974 commented 7 months ago

Hi @california444

Did you added exactly:

"advertiser": „ciao“, <- with comma ? or advertiser: „ciao“, <- with comma ?

br, Richard

thkl commented 7 months ago
 var publishInfo = {
      username: username,
      port: this.currentPortNum,
      pincode: pin,
      setupID: setupID,
      advertiser: "ciao",
      category: Accessory.Categories.BRIDGE
    }

It doesn't matter if there are quotation marks or not as keys for the object. But they must be normal quotation marks for the value so use 2 " and not one „ and “ You can also remove the deprecated mdns item

roe1974 commented 7 months ago

danke Thomas :-)

roe1974 commented 4 months ago

@thkl ... Mir ist aufgefallen dass bei "ciao" die Geräte bei einem Wechsel der Steuerzentrale (von einem ATV zu einem anderen) nicht mehr erreichbar sind. Ein reboot der HAP Instanz macht die Geräte wieder erreichbar. Bei "bonjour" ist das nicht der Fall. Woran könnte das liegen ?