homebridge-edomoticz Plugin

Moderator: leecollings

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: eDomoticz Homebridge-Plugin

Post by deejc »

Seems a bit quiet here for a while, anyway I'm thinking of coming back to domoticz from Vera!
I am running domoticz in a docker but did I see the official domoticz SD image now contains your Siri stuff ?
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
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 »

Er... dunno! If it does, no-one's said anything to 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!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: eDomoticz Homebridge-Plugin

Post by simon_rb »

The image has Homebridge but I don't think it has this plugin.

It's quiet here as it just works :-)
Marci can relax lol


Sent from my iPhone using Tapatalk
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 »

Cool! Could do with knowing the homebridge install location on the image so I can update OP instructions accordingly, so if anyone checks it out do let me know!
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!
m0rph13
Posts: 18
Joined: Sunday 31 January 2016 1:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Contact:

Re: eDomoticz Homebridge-Plugin

Post by m0rph13 »

Some days ago my homekit app failed to be able to control my homebridge bridged stuff.
I removed the data from my phone.
I removed the persist directory from homebridge and started it up with sudo forever.
According to the homebridge logs all is well with an output like:

Code: Select all

[Fri May 13 2016 11:39:20 GMT+0200 (CEST)] Loaded plugin: homebridge-edomoticz
[Fri May 13 2016 11:39:20 GMT+0200 (CEST)] Registering accessory 'homebridge-edomoticz.eDomoticz'
[Fri May 13 2016 11:39:20 GMT+0200 (CEST)] Registering platform 'homebridge-edomoticz.eDomoticz'
[Fri May 13 2016 11:39:20 GMT+0200 (CEST)] ---
[Fri May 13 2016 11:39:20 GMT+0200 (CEST)] Loaded config.json with 0 accessories and 1 platforms.
[Fri May 13 2016 11:39:20 GMT+0200 (CEST)] ---
[Fri May 13 2016 11:39:21 GMT+0200 (CEST)] Loading 1 platforms...
[Fri May 13 2016 11:39:21 GMT+0200 (CEST)] [eDomoticz] Initializing eDomoticz platform...
[Fri May 13 2016 11:39:21 GMT+0200 (CEST)] [eDomoticz] Fetching Domoticz lights and switches...
[Fri May 13 2016 11:39:21 GMT+0200 (CEST)] Loading 0 accessories...
[Fri May 13 2016 11:39:21 GMT+0200 (CEST)] [eDomoticz] Initializing platform accessory 'Barometer'...
[Fri May 13 2016 11:39:21 GMT+0200 (CEST)] [eDomoticz] Initializing platform accessory 'Hörnlampa'...
....
[Fri May 13 2016 11:39:21 GMT+0200 (CEST)] [eDomoticz] Initializing platform accessory 'Övervåning'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 031-45-154 │     
    └────────────┘     
                       
[Fri May 13 2016 11:39:21 GMT+0200 (CEST)] Homebridge is running on port 51826.
I fired up the app on my phone, added the new (as I removed the old) home, added homebridge and entered the key.
the app then tries to find accessories but fails to find any.

I am not sure how to debug this to find out where the fault might be.. Any suggestion?
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 »

shouldn't need sudo forever... just forever. Using sudo puts persist & pairing info etc in /root/.homebridge rather than ~/.homebridge

Remove persist etc from both these locations, relaunch homebridge via forever WITHOUT using sudo, then head to HomeKit and set yourself back up. Might need to delete the default home again first.
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!
m0rph13
Posts: 18
Joined: Sunday 31 January 2016 1:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Contact:

Re: eDomoticz Homebridge-Plugin

Post by m0rph13 »

Thanks for your help Marci!

The problem seems to have been on the phone. I borrowed my daughters and then it worked as it should.
I removed the data from my phone, removed the app, restarted the phone and reinstalled the app and after that I could successfully receive the accessories again!

/M
markk
Posts: 267
Joined: Tuesday 14 January 2014 14:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by markk »

I've been trying for quite some time to get this working but I get stumped at the same point everytime.

I follow all the instruction but when I get here: "forever start /usr/local/lib/node_modules/homebridge/bin/homebridge"

This is the result:
siri.png
siri.png (2.93 KiB) Viewed 3102 times
What am I doing wrong?
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
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: eDomoticz Homebridge-Plugin

Post by deejc »

Looks like forever isn't installed or isn't in your path


Sent from my iPhone using Tapatalk
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
markk
Posts: 267
Joined: Tuesday 14 January 2014 14:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by markk »

How do I do that?

I run "sudo apt-get update && sudo apt-get upgrade" and this process runs

Then when I get back to "pi@raspberrypi:~$" I do "sudo npm install -g homebridge && sudo npm install -g forever" but it just immediately reverts back to "pi@raspberrypi:~$"!!

I also tried

sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*} /var/db/receipts/org.nodejs.*
hash -r
sudo curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -
sudo apt-get install nodejs

and

sudo apt-get install libavahi-compat-libdnssd-dev

I can't remember the exact outcome from these but I get a reply so as to imply that all the latest versions were already installed.
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
Bigted
Posts: 68
Joined: Friday 12 December 2014 14:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Bigted »

markk wrote:How do I do that?

I run "sudo apt-get update && sudo apt-get upgrade" and this process runs

Then when I get back to "pi@raspberrypi:~$" I do "sudo npm install -g homebridge && sudo npm install -g forever" but it just immediately reverts back to "pi@raspberrypi:~$"!!

I also tried

sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*} /var/db/receipts/org.nodejs.*
hash -r
sudo curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -
sudo apt-get install nodejs

and

sudo apt-get install libavahi-compat-libdnssd-dev

I can't remember the exact outcome from these but I get a reply so as to imply that all the latest versions were already installed.
What happens when you type either

node -v
npm -v
gomario
Posts: 19
Joined: Wednesday 04 November 2015 6:05
Target OS: Windows
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by gomario »

markk wrote:How do I do that?

I run "sudo apt-get update && sudo apt-get upgrade" and this process runs

Then when I get back to "pi@raspberrypi:~$" I do "sudo npm install -g homebridge && sudo npm install -g forever" but it just immediately reverts back to "pi@raspberrypi:~$"!!

I also tried

sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*} /var/db/receipts/org.nodejs.*
hash -r
sudo curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -
sudo apt-get install nodejs

and

sudo apt-get install libavahi-compat-libdnssd-dev

I can't remember the exact outcome from these but I get a reply so as to imply that all the latest versions were already installed.

I had the exact thing happening.
The only way I was finally able to get eDomoticz working (there is so many outdated tutorials) was:

1. install Node Version Manager https://github.com/creationix/nvm/blob/ ... E.markdown
2. Followed their instructions and used

Code: Select all

nvm install 4.2.6
3. Activated it

Code: Select all

. ~/.nvm/nvm.sh
4. Checked for all instaled node versions

Code: Select all

nvm ls
5. uninstalled any other versions than 4.2.6

Code: Select all

nvm unstall x.x.x
6. set default version to use

Code: Select all

 nvm alias default 4.2.6
After that (I'm a newb) I copied config.json out using winscp(owned by root), deleted it and copied it back (now owned by pi).

- that finally fixed all illegal instructions errors or nothing happening after using any npm related command
npm takes a little while before it start installing but all works now. Finally I am able to use edomoticz.. no other way worked for me.

now every time I want to use nvm I just have to activate it again" . ~/.nvm/nvm.sh" but I might add this as a startup thingy....

I might be wrong with this, but I really worked for me. Linux is a complete nightmare (IMHO) when it comes to following guides etc. there is ALWAYS one package that is outdated and causes problems, or some repo dependency crap, or something just weird... on top of that there is supposed to be that issue with detecting ARM architecture in the old and new version of node...
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:

eDomoticz Homebridge-Plugin

Post by Marci »

There's only ONE guide for eDomoticz - first page of this thread. The issue tends to be people following guidance for an ancient version of homebridge & the previous Domoticz plugin (nothing to do with me!) before realising their error, and THEN trying to install eDomoticz & the latest homebridge... or they’re working on a system that has been in-use and has had a shafted node installation for ages without actually realising it.


Run each command separately...

Code: Select all

sudo npm install -g homebridge
Post the output

Code: Select all

sudo npm install -g forever
Post the output

Now find where forever is installed...

Code: Select all

sudo find / -name forever
Post the output

And now find where homebridge is installed...

Code: Select all

sudo find / -name homebridge
Post the output
Last edited by Marci on Wednesday 18 May 2016 18:36, edited 3 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: eDomoticz Homebridge-Plugin

Post by Marci »

( or read back through this thread, as this has already been covered - read onwards from viewtopic.php?f=36&t=10272&start=220#p82466 )
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!
markk
Posts: 267
Joined: Tuesday 14 January 2014 14:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by markk »

Marci wrote:There's only ONE guide for eDomoticz - first page of this thread. The issue tends to be people following guidance for an ancient version of homebridge & the previous Domoticz plugin (nothing to do with me!) before realising their error, and THEN trying to install eDomoticz & the latest homebridge... or they’re working on a system that has been in-use and has had a shafted node installation for ages without actually realising it.


Run each command separately...

Code: Select all

sudo npm install -g homebridge
Post the output

Code: Select all

sudo npm install -g forever
Post the output

Now find where forever is installed...

Code: Select all

sudo find / -name forever
Post the output

And now find where homebridge is installed...

Code: Select all

sudo find / -name homebridge
Post the output
OK, i followed these instructions and this is what I got:

output.png
output.png (34.8 KiB) Viewed 3001 times
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
gomario
Posts: 19
Joined: Wednesday 04 November 2015 6:05
Target OS: Windows
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by gomario »

markk wrote:
Marci wrote:There's only ONE guide for eDomoticz - first page of this thread. The issue tends to be people following guidance for an ancient version of homebridge & the previous Domoticz plugin (nothing to do with me!) before realising their error, and THEN trying to install eDomoticz & the latest homebridge... or they’re working on a system that has been in-use and has had a shafted node installation for ages without actually realising it.


....

OK, i followed these instructions and this is what I got:

output.png

That was exactly what happened to me. With a fresh, latest install of the Domoticz Raspi image, logged in as pi. Just no output, exactly like in the image above.

@Marci:
What I meant when I said that there are multiple guides...I meant going down the rabbit hole to get npm working,
Most of my searches ended pointing to outdated homebridge how-tos or previous Domoticz plugins, exactly as you said...
I finally found a solution using nvm to try different versions of node.js/npm ... some resulting in outputting: "illegal instruction" and some in nothing at all. After I got node.js 4.2.6 installed npm started working too and all went well.

Thanks again Marci for all you have done, your plugin is simply awesome. I did not want to sound like I haven't bothered reading through the thread or ungrateful in any way.
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 »

markk wrote:
OK, i followed these instructions and this is what I got:


output.png
Ok - we can see from the output there that homebridge appears to be installed, but forever has failed to install. So, let's put npm in verbose mode, as it (now) defaults to quiet mode...

Code: Select all

sudo npm -dd install -g forever
...and post the output. You should be able to left click-drag over text in the console and use Ctrl+c to copy, then paste that into your reply rather than use screenshots... That way you can post longer more-than-one-page output if necessary. Hit the 'code' button before and after pasting to get the forum to format it properly.
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!
markk
Posts: 267
Joined: Tuesday 14 January 2014 14:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by markk »

@Gomario and @Marci
Thanks for your replies. I'll give this a go this evening. I really appreciate your support.
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
markk
Posts: 267
Joined: Tuesday 14 January 2014 14:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by markk »

I tried that and nothing happened :(

Code: Select all

pi@raspberrypi:~$ sudo npm -dd install -g forever
pi@raspberrypi:~$
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
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:

eDomoticz Homebridge-Plugin

Post by Marci »

Hmmm.... I suspect forever is failing to build in it's repo. Will investigate further. In meantime, use instructions for loading on boot here: https://github.com/nfarina/homebridge/w ... spberry-Pi (but note path differences - refer to your last screencap for paths to homeBridge, IE: yours is in /usr/bin not /usr/local/bin etc)

You can still run everything fine, just not via forever... so just skip the forever steps in the first post and continue on with the rest, then use details at link above to get it running on boot.

If forever is looking to be terminally screwed I'll update all the instructions to remove it, but as it stands, forever isn't required for anything else involved to work.
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