Homebridge is running on port 51826.
/home/android/.nvm/versions/node/v4.2.2/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:56
dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
^
Error: dns service error: unknown
at Error (native)
at new Advertisement (/home/android/.nvm/versions/node/v4.2.2/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:56:10)
at Object.create [as createAdvertisement] (/home/android/.nvm/versions/node/v4.2.2/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:64:10)
at Advertiser.startAdvertising (/home/android/.nvm/versions/node/v4.2.2/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Advertiser.js:43:30)
at Bridge.Accessory._onListening (/home/android/.nvm/versions/node/v4.2.2/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:352:20)
at emitNone (events.js:67:13)
at HAPServer.emit (events.js:166:7)
at HAPServer._onListening (/home/android/.nvm/versions/node/v4.2.2/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:153:8)
at emitNone (events.js:67:13)
at EventedHTTPServer.emit (events.js:166:7)
android@localhost:~$ sudo avahi-daemon --debug
Found user 'avahi' (UID 103) and group 'avahi' (GID 105).
Successfully dropped root privileges.
avahi-daemon 0.6.31 starting up.
Successfully called chroot().
Successfully dropped remaining capabilities.
No service file found in /etc/avahi/services.
socket() failed: Permission denied
socket() failed: Permission denied
Failed to create server: No suitable network protocol available
avahi-daemon 0.6.31 exiting.
Some idea ?
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate http://domo-attitude.fr
I have a spare raspberry pi lying about so I decided to install homebridge onto that. Managed to get it running however when I use eve or any another app to connect it finds homebridge but it will not pair. I did notice the undefined on the terminal console:-
[Domoticz] Loaded services for Sky Remote Switch
[Domoticz] Initializing platform accessory 'Skybox F5S Remote'...
[Domoticz] Loaded services for Skybox F5S Remote
[Domoticz] Initializing platform accessory 'Xbox Remote'...
[Domoticz] Loaded services for Xbox Remote
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
┌────────────┐
│ undefined │
└────────────┘
Homebridge is running on port 51826.
I noticed in my config.json file there is no mention of pin code like in the sample. I just have domoticz part in it. I will attempt to add that and see what happens.
Well I managed to get it working for 2 mins. I got one of the switches to turn on then off again, only once using Siri. Now Siri says it can't do that. When I load Eve all the devices I added are "unreachable"
Does this happen to everyone else? I remember having this trouble 6 months ago with iOS 8 and assumed this issue was fixed with iOS 9. Can anyone shed any light on this?
Cheers
Update:- Well its hit and miss at the moment. Are all domoticz switches sent as light switches? I have some curtains that i'd like to open using the open and close command but siri says it can't find any blinds at this time.
lukeredpath wrote:
Ok I'm with you now, so the problem is not setting the level but that the level is not being reported correctly in the other direction? It's possible there's a similar bug, I will take a look.
I still think it's a bug on the Domoticz side that it accepts levels between 1-16 if it's max dim level is 15 though.
Yes, that's is correct. As a result of the level not reported correctly to Siri, it only will send limited levels back as a command.
You are right that 1-16 as command values for a MaxdimLevel of 15 is questionable, although this is as described I the WiKi
Ok, I just tested things by changing Domoticz.js in the platforms directory.
I have changed line 329:
designedMaxValue: this.MaxDimLevel
to:
designedMaxValue: 100
Now Siri sees a maximum level of 100%. If I ask Siri to dim back to 50% it sends a level 8 to Domoticz (50% * 15 rounded upwards to 8. 49% results in level 7). That now works perfect!
Funnily enough I was just looking into this again and trying the same fix. I've upgraded my Homebridge installation to the latest version which now uses Node plugins.
I will test this a bit more and if it works I will submit a pull request to get this fixed. What I can't see is where its getting the current power/dimmer state from or how often it updates itself.
Now there is only still one bug: Domoticz reports back a MaxDimLevel of 15 but needs values between 1 - 16. Also if you send e.g. 8 as a command in JSON you get back a level 7!
Bikey wrote:Ok, I have also solved the other issue being that Domticz expects for RFXCOM-based (KaKu) dimmers values between 1-16, even if it reports MaxDimLevel 15 in the API.
I have changed the following in the Domoticz.js file in the platforms subdirectory:
I have changed:
return Math.round((value / 100.0) * this.MaxDimLevel)
to:
return Math.round(((value / 100.0) * this.MaxDimLevel)+1)
Now finally I can get my dimmers back to 100%! And the other values % SIRI reports now more closely match the values as being reported in the GUI of Domoticz.
I'm not sure if this also is needed for other non-RFXCOM/KaKu dimmer-devices that work with values instead of % in the API. Are there others that work this way?
Perhaps others can check if that works for your configuration as well?
Unfortunately this isn't a viable permanent fix as it would then break devices that work correctly with the current code.
I think I'm going to look into re-writing the Domoticz plugin and trying to get it moved into a standalone Node plugin.
The underlaying HAP framework that this is based on has a much better high level API for defining accessories and characteristics (compare the code in the Nest plugin to the Domoticz one for example: https://github.com/KraigM/homebridge-ne ... r/index.js). Not only that, but characteristics can have callbacks associated with them that are called when HomeKit requests an accessory's state so I should be able to get HomeKit to accurately show the current state as it is in Domoticz.
lukeredpath wrote:I think I'm going to look into re-writing the Domoticz plugin and trying to get it moved into a standalone Node plugin.
The underlaying HAP framework that this is based on has a much better high level API for defining accessories and characteristics (compare the code in the Nest plugin to the Domoticz one for example: https://github.com/KraigM/homebridge-ne ... r/index.js). Not only that, but characteristics can have callbacks associated with them that are called when HomeKit requests an accessory's state so I should be able to get HomeKit to accurately show the current state as it is in Domoticz.
Good luck with that! Looking forward to see how you get on
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
┌────────────┐
│ 031-45-154 │
└────────────┘
Homebridge is running on port 51826.
events.js:141
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::51826
at Object.exports._errnoException (util.js:837:11)
at exports._exceptionWithHostPort (util.js:860:20)
at Server._listen2 (net.js:1231:14)
at listen (net.js:1267:10)
at Server.listen (net.js:1363:5)
at EventedHTTPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:58:19)
at HAPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:132:20)
at Bridge.Accessory.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:347:16)
at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:50:16)
at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:220:14)
Bikey wrote:Ok, I have also solved the other issue being that Domticz expects for RFXCOM-based (KaKu) dimmers values between 1-16, even if it reports MaxDimLevel 15 in the API.
I have changed the following in the Domoticz.js file in the platforms subdirectory:
I have changed:
return Math.round((value / 100.0) * this.MaxDimLevel)
to:
return Math.round(((value / 100.0) * this.MaxDimLevel)+1)
Now finally I can get my dimmers back to 100%! And the other values % SIRI reports now more closely match the values as being reported in the GUI of Domoticz.
I'm not sure if this also is needed for other non-RFXCOM/KaKu dimmer-devices that work with values instead of % in the API. Are there others that work this way?
Perhaps others can check if that works for your configuration as well?
Unfortunately this isn't a viable permanent fix as it would then break devices that work correctly with the current code.
This needs to be fixed on the Domoticz side.
I agree, but it looks like that is not going to happen (soon): GizmoGuz explained in this bug report I opened that that would require changing the GUI-code, which he does not want to do...
What devices do not work correctly anymore with the proposed fix? Perhaps the code could check first on the device type ?
lukeredpath wrote:I think I'm going to look into re-writing the Domoticz plugin and trying to get it moved into a standalone Node plugin.
The underlaying HAP framework that this is based on has a much better high level API for defining accessories and characteristics (compare the code in the Nest plugin to the Domoticz one for example: https://github.com/KraigM/homebridge-ne ... r/index.js). Not only that, but characteristics can have callbacks associated with them that are called when HomeKit requests an accessory's state so I should be able to get HomeKit to accurately show the current state as it is in Domoticz.
That would be great, as it would also solve that currently Homebridge does not report the status of the Domoticz devices back to Siri.
Getting it to report the current status as reflected in domoticz would be the ultimate plugin, domoticz is way better with scenes and events than HomeKit probably ever will be but you can't really have both right now as Siri doesn't know the current status if an event fires. I love domoticz for the events and scenes but also equally have love for Siri and the ease of use it brings, combined properly they would blow anything else around out of the water
I am really looking forward to this if it can be done.
Cheers
Sorry of this has been discussed, but having an issue with Lightwaverf dimmers and domoiticz.js and like others am seeing the issue of 16 v 100% value. Been messing around with JSON and when I send the
I see lukeredpath commented that domoticz.sj was fixed for lightwaverf devices but it is still a problem. Is there anyway I can code this into Domoticz.js for Lightwaverf devices?
That is interesting, I wonder what the MaxDimLevel as reported with JSON? With KaKu RFXCOM dimmers it is 16, but you have to set a 17 to get a 100% light level.
I cannot get full brightness from EVE for a lightwaverf lamp - when I make the lamp as bright as possible - the slider reaches max (slides all the way to the right) - but says thats 32% - and the lamp is correspondingly "dim".
I cannot get full brightness from EVE for a lightwaverf lamp - when I make the lamp as bright as possible - the slider reaches max (slides all the way to the right) - but says thats 32% - and the lamp is correspondingly "dim".
That is a bug I also ran into. Homebridge reports the MaxDimLevel to Homekit, instead of 100% as I found earlier, see my post about it.
You have to change line 329 in the Domoticz.js file in the platforms directory.:
designedMaxValue: this.MaxDimLevel
to:
designedMaxValue: 100
Had been testing with Insteon+ showing 100% and Domoticz shows the light at anything from 6% through to 30%. Tested with Eve and the HE-108 Lights are now working perfectly. LightwaveRF is also working now.....very strange!
I cannot get full brightness from EVE for a lightwaverf lamp - when I make the lamp as bright as possible - the slider reaches max (slides all the way to the right) - but says thats 32% - and the lamp is correspondingly "dim".
That is a bug I also ran into. Homebridge reports the MaxDimLevel to Homekit, instead of 100% as I found earlier, see my post about it.
You have to change line 329 in the Domoticz.js file in the platforms directory.:
designedMaxValue: this.MaxDimLevel
to:
designedMaxValue: 100
Thanks - that works for me - this fix works for my limited setup/testing.