Page 37 of 86

Re: homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 21:35
by rich710
Thanks for your help!
Now it looks like something has happened, just a little bit more, now It says It can't connect to Domoticz, something wrong with credentials
or ip-number?

[9/19/2016, 9:31:09 PM] Loaded plugin: homebridge-edomoticz
[9/19/2016, 9:31:10 PM] Registering accessory 'homebridge-edomoticz.eDomoticz'
[9/19/2016, 9:31:10 PM] Registering platform 'homebridge-edomoticz.eDomoticz'
[9/19/2016, 9:31:10 PM] ---
[9/19/2016, 9:31:10 PM] Loaded config.json with 0 accessories and 1 platforms.
[9/19/2016, 9:31:10 PM] ---
[9/19/2016, 9:31:10 PM] Loading 1 platforms...
[9/19/2016, 9:31:10 PM] [eDomoticz] Initializing eDomoticz platform...
[9/19/2016, 9:31:10 PM] [eDomoticz] Fetching Domoticz lights and switches...
[9/19/2016, 9:31:10 PM] Loading 0 accessories...
[9/19/2016, 9:31:10 PM] [eDomoticz] There was a problem connecting to Domoticz.

My config.json is under /home/pi/.homebridge/config.json

{
"bridge": {
"name": "Homebridge",
"username": "CC:21:3E:E4:DE:33",
"port": 51826,
"pin": "031-45-154"
},
"description": "Configuration file for (e)xtended Domoticz platform.",
"platforms": [
{
"platform": "eDomoticz",
"name": "eDomoticz",
"server": "rich710:[email protected]",
"port": "8080",
"ssl": 0,
"roomid": 0
}
],
"accessories": []




Marci wrote:Looks like it hasn't installed then.

Code: Select all

sudo npm install -g homebridge-edomoticz 

Re: homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 21:39
by simon_rb
TheRamon wrote:Alright, I think I have tackled the dimmer problem now. Only sends the "double" on command upon turning ON the switch now. Otherwise just dims the thingy.
Can anyone test this on the mqtt-integration branch?
Just updated and my dimmers behave the same :(
If I ask Siri to set brightness of my wall lights they start going through there dimming phase. If my lights are on and I ask it to set the brightness to 50% (currently set to 80%) then they start the dimming phase. This happens when an on command is sent while they are already on.

If I ask siri to reduce or increase the brightness while lights are on it does just that. If the lights are off and I ask Siri to set the living room wall lights to 80% then the lights will turn on then a second later set them to 80%. So it looks like when you ask to set the brightness its still sending an on command first..

Hope that makes sense.. :)

Re: homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 22:21
by thomtom
Hi, I hope someone can put me in the right direction. I have now uninstalled\re-installed according to the guide several times but always had the same error when attempting to run homebridge:

Error: Module version mismatch. Expected 48, got 46.
at Error (native)
at Object.Module._extensions..node (module.js:583:18)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/dns_sd.js:24:20)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)


The only thing that I have done differently is that I installed node version 6.6, would this be an issue?

Thanks in advance!

Re: homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 22:28
by Marci
Tend to only see that error when running wrong version of node for your platform...

What device are you running on?

Re: homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 22:30
by Marci
rich710 wrote:Thanks for your help!
Now it looks like something has happened, just a little bit more, now It says It can't connect to Domoticz, something wrong with credentials
or ip-number?

[9/19/2016, 9:31:09 PM] Loaded plugin: homebridge-edomoticz
[9/19/2016, 9:31:10 PM] Registering accessory 'homebridge-edomoticz.eDomoticz'
[9/19/2016, 9:31:10 PM] Registering platform 'homebridge-edomoticz.eDomoticz'
[9/19/2016, 9:31:10 PM] ---
[9/19/2016, 9:31:10 PM] Loaded config.json with 0 accessories and 1 platforms.
[9/19/2016, 9:31:10 PM] ---
[9/19/2016, 9:31:10 PM] Loading 1 platforms...
[9/19/2016, 9:31:10 PM] [eDomoticz] Initializing eDomoticz platform...
[9/19/2016, 9:31:10 PM] [eDomoticz] Fetching Domoticz lights and switches...
[9/19/2016, 9:31:10 PM] Loading 0 accessories...
[9/19/2016, 9:31:10 PM] [eDomoticz] There was a problem connecting to Domoticz.

My config.json is under /home/pi/.homebridge/config.json

{
"bridge": {
"name": "Homebridge",
"username": "CC:21:3E:E4:DE:33",
"port": 51826,
"pin": "031-45-154"
},
"description": "Configuration file for (e)xtended Domoticz platform.",
"platforms": [
{
"platform": "eDomoticz",
"name": "eDomoticz",
"server": "rich710:[email protected]",
"port": "8080",
"ssl": 0,
"roomid": 0
}
],
"accessories": []




Marci wrote:Looks like it hasn't installed then.

Code: Select all

sudo npm install -g homebridge-edomoticz 
Presuming Domoticz is still configured as per defaults, no auth is required from local host, therefore, try it without the username and password.

Re: homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 22:34
by thomtom
Marci wrote:Tend to only see that error when running wrong version of node for your platform...

What device are you running on?
I am running on Pi 1 (original 512MB Pi) and running node version 6.6 but have also tried 6.3.1

Re: homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 22:43
by Marci
Definitely using the files ending .armv6l... and removing / reinstalling homebridge and anything else installed by npm after the change? (Version of node determines what hardware binaries compile for during install of homebridge and it's dependencies)

Re: homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 23:12
by thomtom
Marci wrote:Definitely using the files ending .armv6l... and removing / reinstalling homebridge and anything else installed by npm after the change? (Version of node determines what hardware binaries compile for during install of homebridge and it's dependencies)
Yep Definitely using .armv6l install. I have just tried again with node v 4.00 and it has now paired with the iOS 10 Home app which is further than I have got before......exciting :-).

Re: homebridge-edomoticz Plugin

Posted: Tuesday 20 September 2016 7:59
by TheRamon
simon_rb wrote:
TheRamon wrote:Alright, I think I have tackled the dimmer problem now. Only sends the "double" on command upon turning ON the switch now. Otherwise just dims the thingy.
Can anyone test this on the mqtt-integration branch?
Just updated and my dimmers behave the same :(
If I ask Siri to set brightness of my wall lights they start going through there dimming phase. If my lights are on and I ask it to set the brightness to 50% (currently set to 80%) then they start the dimming phase. This happens when an on command is sent while they are already on.

If I ask siri to reduce or increase the brightness while lights are on it does just that. If the lights are off and I ask Siri to set the living room wall lights to 80% then the lights will turn on then a second later set them to 80%. So it looks like when you ask to set the brightness its still sending an on command first..

Hope that makes sense.. :)
Awwwwww. Yeah makes total sense. Because that's how it's programmed. Only downside is though that when they are off, and we're sending JUST the dim command Siri and the HomeKit apps will never know the light is on. They will just display "off" and the new dim value.

Re: homebridge-edomoticz Plugin

Posted: Tuesday 20 September 2016 17:13
by simon_rb
Ah, so there isn't really a way around it then :(

Unless an off command is sent first, not quite a polished solution but would solve the issue. Has anyone else on here experiencing the same issue? Or it it limited to my Homeeasy dimmers?

Re: homebridge-edomoticz Plugin

Posted: Tuesday 20 September 2016 17:43
by TheRamon
Somehow those react to the on command as if they should turn on and light up at 100%. But should dim to remembered value upon turning on.

Re: homebridge-edomoticz Plugin

Posted: Tuesday 20 September 2016 18:47
by rich710
Everything is up&running now with Siri control over my lamps and garagedoor!
Many many thanks to Marci for all your help here!
This thread gives me hope of internet ;)

//Richard

Re: homebridge-edomoticz Plugin

Posted: Tuesday 20 September 2016 20:51
by deejc
rich710 wrote: This thread gives me hope of internet ;)
now you can start "Tinkering" with it, you'll never leave it alone :lol:

Re: homebridge-edomoticz Plugin

Posted: Wednesday 21 September 2016 11:05
by rich710
As soon as I enter a username and password as for Website Protection in Domoticz, Homebridge can't connect anymore.
I have entered the right username:pass in config.json. But it always gives me this message:

Sep 21 10:53:28 raspberrypi homebridge[1138]: [9/21/2016, 10:53:28 AM] [eDomoticz] There was a problem connecting to Domoticz.
pi@raspberrypi:~ $

If I leave the user/pass in Domotics blank, Everything works fine, but I think that is not secure, and I will be able to control it outside my LAN.

any hints?
Capture.JPG
Capture.JPG (27.94 KiB) Viewed 3138 times



Capture2.JPG
Capture2.JPG (47.54 KiB) Viewed 3138 times

Re: homebridge-edomoticz Plugin

Posted: Wednesday 21 September 2016 12:57
by bxlouis
Hello marci!

I am testing Homebridge with a Fibaro Wall Plug. It works great but I think the behavior could be enhanced.

For now, the Fibaro Wall Plug is detected as a Domoticz "Light/Switch".
So when I say "Siri, turn on/off the Living room's wall plug", Siri tells me he does not recognise any Wall Plug in the Living Room.
I bypassed this issue by naming the Fibaro Wall Plug "Wall Plug".

(I am translating from French so the English type in Siri might not be "Wall Plug" but in French we call that "prise")

Anyway, would it be possible to add a new "Wall plug" type in homebridge? I am sure it exists in Siri's vocabulary! Like you did for the blinds, after I asked you in July. By the way, thanks again for that, it works great!!!

Have a nice day.

Re: homebridge-edomoticz Plugin

Posted: Wednesday 21 September 2016 20:46
by ayziaa
rich710 wrote:As soon as I enter a username and password as for Website Protection in Domoticz, Homebridge can't connect anymore.
I have entered the right username:pass in config.json. But it always gives me this message:

Sep 21 10:53:28 raspberrypi homebridge[1138]: [9/21/2016, 10:53:28 AM] [eDomoticz] There was a problem connecting to Domoticz.
pi@raspberrypi:~ $

If I leave the user/pass in Domotics blank, Everything works fine, but I think that is not secure, and I will be able to control it outside my LAN.

any hints?

Capture.JPG





Capture2.JPG

I have the same problem. If anyone has a solution?!

Re: homebridge-edomoticz Plugin

Posted: Wednesday 21 September 2016 21:52
by MacJL
For the authentication problem, I've found a workaround, by modifying the code.
Just replace the "xxxyyyzzz" with the PATH to your node home in these commands :

Code: Select all

export $NODE_HOME=xxxyyyzzz
cd $NODE_HOME/lib/node_modules/homebridge-edomoticz
cp index.js index.js.bak
sed -i "/this.server.indexOf/ s/:/\+/;/this.server.indexOf/ s/#/\+/" index.js
But that's a (very) ugly workaround that work only if you don't have any '+' in your login and password. I hope the developer can review the authentication process to fix it.

Regards,

Re: homebridge-edomoticz Plugin

Posted: Thursday 22 September 2016 11:54
by TheRamon
Oh wow! Have just fixed the issue with Authorization, the credentials were not sent properly.

This bug is fixed on the mqtt-integration branch! Be sure to update to that one.

I'll better let Marci update the master branch whenever he thinks that might be a good move. I have kind of lost track of the master branch. :oops: :D

Re: homebridge-edomoticz Plugin

Posted: Thursday 22 September 2016 20:10
by Marci
bxlouis wrote:Hello marci!

I am testing Homebridge with a Fibaro Wall Plug. It works great but I think the behavior could be enhanced.

For now, the Fibaro Wall Plug is detected as a Domoticz "Light/Switch".
So when I say "Siri, turn on/off the Living room's wall plug", Siri tells me he does not recognise any Wall Plug in the Living Room.
I bypassed this issue by naming the Fibaro Wall Plug "Wall Plug".

(I am translating from French so the English type in Siri might not be "Wall Plug" but in French we call that "prise")

Anyway, would it be possible to add a new "Wall plug" type in homebridge? I am sure it exists in Siri's vocabulary! Like you did for the blinds, after I asked you in July. By the way, thanks again for that, it works great!!!

Have a nice day.
Nope. Siri has no support for Wall Plug, you have to refer to the, as Outlets, and if I make a custom type, they’ll show as unsupported in iOS10 and folks won’t be able to switch them with the native home app. The core problem is not being able to consistently distinguish a switch from an outlet in the JSON output from Domoticz.

Just refer to sockets by their individual device name as used in Domoticz.

Re: homebridge-edomoticz Plugin

Posted: Thursday 22 September 2016 20:10
by Marci
*snip* see next.