homebridge-edomoticz Plugin

Moderator: leecollings

bxlouis
Posts: 45
Joined: Wednesday 16 December 2015 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Belgium
Contact:

Re: eDomoticz Homebridge-Plugin

Post by bxlouis »

Thank you Marci for your awesome work ! The blinds do work with Siri now.

I still have 2 questions, though :

- I set one of my blinds as "Inverted blind" in Domoticz, and I think it is not recognized as a blind by eDomoticz.

- It seems the 2 other blinds I use (set as "blind" in Domoticz) work inverted. They close when I say "open my blinds" and open when I say "close my blinds". It is strange since it works well with Domoticz. I tried to change that behavior through Elgato Eve or Insteon+ apps but there is no setting that allows to do that.

Thank you again for your help !
SeaTea
Posts: 3
Joined: Wednesday 10 June 2015 20:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5641
Location: Netherlands
Contact:

Re: eDomoticz Homebridge-Plugin

Post by SeaTea »

Marci wrote:Looks like the nodejs package from Raspbian Jessie repos now only installs the node binary. You'll have to then install npm separately:

Code: Select all

sudo apt-get install npm
In my case this was not the solution, as npm seems to be installed, just not working without errors. (segmentation faults and illegal instruction)

After (lots of) digging via google I found a solution which seems to work. At least I can install everything now.

I am using a Raspberry-PI model 1, which has a ARM-6 on board. It seems that the default installation of nodejs which was pre-installed on the domoticz SD-image was for ARM-7, which wil probably work on the RPI-2 and 3.

So I removed the pre-installed installed nodejs :

Code: Select all

sudo apt-get remove nodejs
and to be sure:

Code: Select all

sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*} /var/db/receipts/org.nodejs.*
hash -r
and after that installed latest node 6.2.2 for ARM6 (armv6l) binaries:

Code: Select all

wget https://nodejs.org/dist/latest-v6.x/node-v6.2.2-linux-armv6l.tar.gz
tar -xvf node-v6.2.2-linux-armv6l.tar.gz
cd node-v6.2.2-linux-armv6l
sudo cp -R * /usr/local/
cd
Then tried to install homebridge, but that failed also with errors with 'bignum' installation. This can be solved by installing homebridge with the option --unsafe-perm, after that installed forever and finally homebridge-edomoticz :

Code: Select all

sudo npm install -g homebridge --unsafe-perm
...

sudo npm install -g forever
...

sudo npm install -g homebridge-edomoticz
...
And follow the rest of the guide in the startpost.

I still have to configure and test the rest but at least installation worked now and logfile shows that it found some "platform accessory's" from my domoticz installation.
adjego
Posts: 11
Joined: Monday 16 February 2015 11:42
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.5163
Location: Eindhoven
Contact:

Re: eDomoticz Homebridge-Plugin

Post by adjego »

adjego wrote:Using this config i'm trying to get it to work. Something with authentication is going wrong. If i disable login all devices are fetched, if enabled with correct username and password set in config i get this:

Somebody has any pointers for me?
Marci wrote:Will have a look at it this weekend...
Did you by any change managed to have a look at this??
SeaTea
Posts: 3
Joined: Wednesday 10 June 2015 20:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5641
Location: Netherlands
Contact:

Re: eDomoticz Homebridge-Plugin

Post by SeaTea »

I found the following in .forever log after restart/update of the plugin:

Code: Select all

[6/22/2016, 3:27:31 PM] Warning: skipping plugin found at '/usr/local/lib/node_modules/homebridge-edomoticz' since we already loaded the same plugin from '/usr/lib/node_modules/homebridge-edomoticz'.
[6/22/2016, 3:27:35 PM] Loaded plugin: homebridge-edomoticz
It seems that I have 2 places with node_modules. I don't know if this is something from the installation which did not succeed (see my previous message), but how can I check if the right homebridge-edomoticz module is used / updated ? Can I check actual (used) version somewhere ?
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: eDomoticz Homebridge-Plugin

Post by Marci »

I still have 2 questions, though :

- I set one of my blinds as "Inverted blind" in Domoticz, and I think it is not recognized as a blind by...
Inverted blinds have a different switchtypeval that hasn't been enabled yet.
- It seems the 2 other blinds I use (set as "blind" in Domoticz) work inverted. They close when I say "open my blinds" and open when I say "close my blinds". It is strange since it works well with Domoticz. I tried to change that behavior through Elgato Eve or Insteon+ apps but there is no setting that allows to do that.
These will need a manual override to invert them in the plugin. Leave them with me.
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: eDomoticz Homebridge-Plugin

Post by Marci »

SeaTea wrote: It seems that I have 2 places with node_modules. I don't know if this is something from the installation which did not succeed (see my previous message), but how can I check if the right homebridge-edomoticz module is used / updated ? Can I check actual (used) version somewhere ?
Whichever node_modules folder you're running homeBridge itself from is the correct one. Delete the other.
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: eDomoticz Homebridge-Plugin

Post by Marci »

adjego wrote:Did you by any change managed to have a look at this??
Nope - next on the list...
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: eDomoticz Homebridge-Plugin

Post by Marci »

Have a look for systemctl for running things at boot on jessie rather than the rc.d method of wheezy... odds on bet it's down to that.
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!
Purejet
Posts: 12
Joined: Wednesday 07 October 2015 14:07
Target OS: -
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Purejet »

Yesterday i've tried to run the homebridge + plugin on the stable domoticz image.
But i failed inside the installation process (Messed up with installing from pi users, which install commands run with sudo). Can someone tell me which steps are necessary to do for this running completely on domoticz 4384?
When i only want to have the sensors that are already inside domoticz throug homebridge, what do i have to configure inside the json? Only the roomid + Platform and no extra accessoires?
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: eDomoticz Homebridge-Plugin

Post by Marci »

Just follow steps in the first post...
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!
Purejet
Posts: 12
Joined: Wednesday 07 October 2015 14:07
Target OS: -
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Purejet »

Marci wrote:Just follow steps in the first post...
I know. At the moment i'm trying to install everything on a clean raspbian jessie image. But also get errors from the npm section. Lots of "gyp ERR!"?

EDIT: Now i get:
pi@raspberrypi:~ $ sudo npm install -g homebridge
pi@raspberrypi:~ $
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: eDomoticz Homebridge-Plugin

Post by Marci »

Purejet wrote:
Marci wrote:Just follow steps in the first post...
I know. At the moment i'm trying to install everything on a clean raspbian jessie image. But also get errors from the npm section. Lots of "gyp ERR!"?

EDIT: Now i get:
pi@raspberrypi:~ $ sudo npm install -g homebridge
pi@raspberrypi:~ $
Redo the npm lines with --unsafe-perm
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!
BasPost
Posts: 13
Joined: Thursday 25 June 2015 15:14
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.2563
Contact:

Re: eDomoticz Homebridge-Plugin

Post by BasPost »

@Marci,
First off all, thanks for the excellent plugin! I've managed to install it with your excellent tutorial in the first post on my raspberry Pi, running Domoticz.
Everything works, except the .sh script which for starting at boot.
I've followed every step in your post: viewtopic.php?f=36&t=10272&p=72791#p72791
But when I start the script with:

Code: Select all

/etc/init.d/homebridge.sh start
I've got the following error in terminal:

Code: Select all

pi@raspberrypi:~$ /etc/init.d/homebridge.sh start
/etc/init.d/homebridge.sh: line 30: unexpected EOF while looking for matching `"'
/etc/init.d/homebridge.sh: line 34: syntax error: unexpected end of file
pi@raspberrypi:~$ 
I've attached the shell script which I created.
Attachments
homebridge.sh.zip
(1.06 KiB) Downloaded 60 times
Purejet
Posts: 12
Joined: Wednesday 07 October 2015 14:07
Target OS: -
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Purejet »

Marci wrote:
Purejet wrote:
Marci wrote:Just follow steps in the first post...
I know. At the moment i'm trying to install everything on a clean raspbian jessie image. But also get errors from the npm section. Lots of "gyp ERR!"?

EDIT: Now i get:
pi@raspberrypi:~ $ sudo npm install -g homebridge
pi@raspberrypi:~ $
Redo the npm lines with --unsafe-perm
I did that. But every time i get more errors. I've also the error in the post above this. And another one;
Error: Cannot find module 'hap-nodejs'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/cli.js:2:11)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
error: Forever detected script exited with code: 1
error: Script restart attempt #11
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: eDomoticz Homebridge-Plugin

Post by Marci »

Purejet wrote: I did that. But every time i get more errors. I've also the error in the post above this. And another one;
Sounds like npm hasn't installed dependencies...

Head to /usr/local/lib/node_modules/... Then go into each sub folder you find there and run 'sudo npm install --unsafe-perm' for each module (homebridge, and homebridge-eDomoticz)
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!
BasPost
Posts: 13
Joined: Thursday 25 June 2015 15:14
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.2563
Contact:

Re: eDomoticz Homebridge-Plugin

Post by BasPost »

Justinb81 wrote:
BasPost wrote:@Marci,
First off all, thanks for the excellent plugin! I've managed to install it with your excellent tutorial in the first post on my raspberry Pi, running Domoticz.
Everything works, except the .sh script which for starting at boot.
I've followed every step in your post: viewtopic.php?f=36&t=10272&p=72791#p72791
But when I start the script with:

Code: Select all

/etc/init.d/homebridge.sh start
I've got the following error in terminal:

Code: Select all

pi@raspberrypi:~$ /etc/init.d/homebridge.sh start
/etc/init.d/homebridge.sh: line 30: unexpected EOF while looking for matching `"'
/etc/init.d/homebridge.sh: line 34: syntax error: unexpected end of file
pi@raspberrypi:~$ 
I've attached the shell script which I created.

Here is your corrected script the " was wrong

homebridge.sh.zip
Thank you so much @Justinb81, the script wants to start, but now with the following error:

Code: Select all

pi@raspberrypi:/etc/init.d$ /etc/init.d/homebridge.sh start
Starting HomeBridge
Password: 
bash: /usr/bin/forever: No such file or directory
Just to clarify, I've setup a new SD-card image of Domoticz this weekend and installed eDomoticz plugin as described in the first post of @Marci. I just now want to auto-start at boot, but no succes...

EDIT:
Manual start with

Code: Select all

forever start /usr/bin/homebridge
works though with the following result:

Code: Select all

pi@raspberrypi:~$ forever start /usr/bin/homebridge
warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info:    Forever processing file: /usr/bin/homebridge
EDIT2:
I think I've managed it!
I was reading the post of Justinb81: viewtopic.php?f=36&t=10272&start=340#p89413
And tried his sh script. And now no errors and everything seems to work. I did sudo reboot and it seems to start. I can control my lights with Siri.
I'm a beginner with Linux, so I would like to now what the difference is what I did
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: eDomoticz Homebridge-Plugin

Post by Marci »

Aye - the current Domoticz image differs to the one that was around when I wrote all that. I need to do a fresh build and update the instructions.
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!
NewFolk
Posts: 39
Joined: Wednesday 02 September 2015 11:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by NewFolk »

Marci wrote:Am currently awaiting files from a contributor which add in RGB support... soon as they arrive I'll update the repos.
Do you know about https://github.com/dotsam/homebridge-milight ?

I`m using it 2 weeks and it is pretty stable.
BasPost
Posts: 13
Joined: Thursday 25 June 2015 15:14
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.2563
Contact:

Re: eDomoticz Homebridge-Plugin

Post by BasPost »

Ok, I tottaly screwed up my installation. I re-installed the domoticz-raspberrypi-sdcard-4834.7z image and restored my domoticz.db
Domoticz is running fine. But for now I don't installed the eDomoticz plugin.
So my RPi is a clean install on Rasbian Jessy, if I'm correct.
I also did apt-get update and apt-get upgrade

When I do in terminal "node -v" I get: "illegal instruction"
Also when I do: "homebridge" in terminal, as suggested in this topic: viewtopic.php?f=31&t=12460 I get: "illegal instruction"

So I don't wan't to continue, trying to install the eDomoticz plugin.

What to do?
NewFolk
Posts: 39
Joined: Wednesday 02 September 2015 11:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by NewFolk »

I used this tutorial on Jessie and Rpi3 https://github.com/nfarina/homebridge/w ... spberry-Pi
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest