homebridge-edomoticz Plugin

Moderator: leecollings

rich710
Posts: 17
Joined: Sunday 18 September 2016 11:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post 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 
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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.. :)
thomtom
Posts: 3
Joined: Monday 19 September 2016 22:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post 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!
User avatar
Marci
Posts: 531
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: homebridge-edomoticz Plugin

Post by Marci »

Tend to only see that error when running wrong version of node for your platform...

What device are you running on?
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
User avatar
Marci
Posts: 531
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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.
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
thomtom
Posts: 3
Joined: Monday 19 September 2016 22:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post 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
User avatar
Marci
Posts: 531
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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)
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
thomtom
Posts: 3
Joined: Monday 19 September 2016 22:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post 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 :-).
User avatar
TheRamon
Posts: 126
Joined: Tuesday 12 July 2016 11:32
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: NL/DE
Contact:

Re: homebridge-edomoticz Plugin

Post 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.
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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?
User avatar
TheRamon
Posts: 126
Joined: Tuesday 12 July 2016 11:32
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: NL/DE
Contact:

Re: homebridge-edomoticz Plugin

Post 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.
rich710
Posts: 17
Joined: Sunday 18 September 2016 11:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post 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
User avatar
deejc
Posts: 168
Joined: Tuesday 22 September 2015 18:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5641
Location: UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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:
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
rich710
Posts: 17
Joined: Sunday 18 September 2016 11:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post 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 2920 times



Capture2.JPG
Capture2.JPG (47.54 KiB) Viewed 2920 times
bxlouis
Posts: 45
Joined: Wednesday 16 December 2015 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Belgium
Contact:

Re: homebridge-edomoticz Plugin

Post 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.
ayziaa
Posts: 4
Joined: Wednesday 21 September 2016 20:45
Target OS: -
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post 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?!
MacJL
Posts: 51
Joined: Tuesday 22 April 2014 22:17
Target OS: OS X
Domoticz version: Beta
Location: France
Contact:

Re: homebridge-edomoticz Plugin

Post 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,
User avatar
TheRamon
Posts: 126
Joined: Tuesday 12 July 2016 11:32
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: NL/DE
Contact:

Re: homebridge-edomoticz Plugin

Post 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
User avatar
Marci
Posts: 531
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: homebridge-edomoticz Plugin

Post 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.
Last edited by Marci on Sunday 25 September 2016 12:47, edited 2 times in total.
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
User avatar
Marci
Posts: 531
Joined: Friday 22 January 2016 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Wakefield, West Yorkshire UK
Contact:

Re: homebridge-edomoticz Plugin

Post by Marci »

*snip* see next.
Last edited by Marci on Thursday 22 September 2016 20:14, edited 1 time in total.
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest