Siri / HomeKit support for Domoticz

Moderator: leecollings

boudicca
Posts: 26
Joined: Saturday 03 January 2015 20:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by boudicca »

no cigar. Segmentation fault.

Alas I was using an standard RPI, if that install was for an RPI3, hmm will consider running on rpi3 but didn't want to break the default domoticz install as its live :(
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: Siri / HomeKit support for Domoticz

Post by Marci »

All of the above should work on any raspPi running Wheezy onwards, other than the final line (bluetooth bits - sudo apt-get install pi-bluetooth bluetooth bluez blueman) which are rPi3 specific. All tested on Pi1vB, Pi2, Pi3 on both wheezy and jessie.

If they don’t, you have issues elsewhere with your Pi / OS.
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!
boudicca
Posts: 26
Joined: Saturday 03 January 2015 20:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by boudicca »

where does it download Homebridge and Forever in the script ? did a fresh jessie again and still get segmentation fault on a standard rpi. at sudo npm install -g homebridge and forever. ?...will try rpi3 later after I've made a backup
pi@raspberrypi:~ $ sudo npm install -g homebridge
pi@raspberrypi:~ $ sudo bash
root@raspberrypi:/home/pi# npm install -g forever
Segmentation fault
root@raspberrypi:/home/pi#
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: Siri / HomeKit support for Domoticz

Post by Marci »

Where as in to what location on your disk? /usr/local/lib/node_modules (stock global node module location)

You can start homebridge manually without forever, just head to /usr/local/lib/node_modules/homebridge/bin and ./homebridge

That said, could be armv6 issue... try:

Code: Select all

sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*} 
sudo rm -rf /var/db/receipts/org.nodejs.*
hash -r
sudo su -c 'echo "deb https://deb.nodesource.com/armv6l-node/ weezy main" >> /etc/apt/sources.list'
sudo curl -sL https://deb.nodesource.com/setup_0.12 | bash -
sudo apt-get install nodejs
sudo apt-get install libavahi-compat-libdnssd-dev

sudo npm install -g homebridge
sudo npm install -g forever
sudo npm install -g homebridge-edomoticz
(The additional line comes after hash -r)
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!
boudicca
Posts: 26
Joined: Saturday 03 January 2015 20:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by boudicca »

NB sudo bash -
sudo curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
Nah...still same on Jessie even with that source change

Made a backup of the rpi3...will give it go there.
boudicca
Posts: 26
Joined: Saturday 03 January 2015 20:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by boudicca »

okay we have a winner!!!

RPI3 - Success all the way through to controlling with eve and siri (Although it gets confused)

I followed your installer script and used edomoticz

Things your installer script.txt needs in addition

bash - = sudo bash -
sudo apt-get install git = (because it isn't) on the lite version of jessie

by default for some reason it couldn't put homebridge in the path /usr/local/lib/node_modules/homebridge/bin/homebridge
if goes in /usr/bin/homebridge.

and finally

.homebridge does exist until you run it for the first time. so you can't put a config.json until its either you create it or it exists after you run homebridge first.
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: Siri / HomeKit support for Domoticz

Post by Marci »

Have updated that into the file - ta!
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!
bing69
Posts: 139
Joined: Thursday 05 June 2014 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: 's-Hertogenbosch, NL
Contact:

Re: Siri / HomeKit support for Domoticz

Post by bing69 »

All neatly installed on a new PI, I got home bridge not installed on the old spinning Pi.
However, it can not start Homebridge like the wike page with start, but i use homebridge in the / bin directory. to start.
How can I correct this? And all the devices may be on the iPhone, however, Siri does not work, do I have to use the English Siri or can I use the Dutch?
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: Siri / HomeKit support for Domoticz

Post by Marci »

Wiki is outdated... See http://www.domoticz.com/forum/viewtopic ... 440#p77846

Fire up a HomeKit app and configure your Siri names? Should work with Dutch or English. Takes a few minutes for iCloud etc to pick up your HomeKit config, and you need Bluetooth on if you use and want to change scenes.
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!
WyldeBill
Posts: 3
Joined: Monday 01 December 2014 20:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by WyldeBill »

Hi All - great work on the new Homebridge install that is part of the latest Rpi SD.

Was up and working quite quickly although did come across a number of issues most of which were solved by scouring the pages of this forum. The installation seems to be a little different to references around the web when searching for information but for anyone else new to RPi/Domoticz/Homebridge this is what I found:

1) To avoid authentication issues which gives the error "There was a problem connecting to Domoticz" add 127.0.0.* to the Local Networks (no username/password) section on the settings page. Separate networks with a semi colon ";"

2) I had great problem trying to get Homebridge to restart on boot up. Tried Forever as per the Wiki and also tried adding a start up file to etc/init.d and then linking it with update-rc but without success. Also tried PM2 which I eventually got to work. Most of the information has the following instruction to set up PM2:

pm2 start app.js --name HomeBridge

however there is no app.js in the .homebridge directory so it produces an error. Through reading various posts eventually I replaced app.js with the following:

/usr/lib/node_modules/homebridge/bin/homebridge

That resolved the issue and PM2 scheduled the job and by following all of the other PM2 steps Homebridge starts after a reboot.

3) I have been using Eve as a client and when adjusting the duration for the override on a Heating Device (using Evohome) it caused Homebridge to crash.

I have found two errors in /usr/lib/node_modules/homebridge-edomoticz/index.js

Lines 885 and 886

Original lines
url = (mode == "TemporaryOverride")? "&until=" + isonow + "&used=true" : "&used=true";

that.log("Setting thermostat SetPoint to " + setpoint +", mode to " + mode);

Amended lines:
Added variable url to the conditional sections of the line
url = (mode == "TemporaryOverride")? url + "&until=" + isonow + "&used=true" : url + "&used=true";
Changed setpoint to temp as setpoint is not defined
that.log("Setting thermostat SetPoint to " + temp + ", mode to " + mode);

Thanks everyone for their posts which helped me get this far. Hope this helps someoneelse.

Now to move it across to my production system :)
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: Siri / HomeKit support for Domoticz

Post by Marci »

Homebridge-eDomoticz has it’s own separate support thread & install guide, and shouldn’t be confused with the plugin / instructions on the out-of-date Wiki pages...

Whether Temp / setPoint is used depends on the device type etc as per:

Code: Select all

var heat = (that.Type=="Heating" && that.subType=="Zone") ? true : false;
var therm = (that.Type=="Thermostat" && that.subType=="SetPoint") ? true : false;
temp = (heat || therm) ? oneDP(s.SetPoint) : oneDP(s.Temp);
So if it gets it wrong, i need to know about it / account for your specific combination (hard to cater for all devices when I don’t own them all). Instructions for sharing your sensor info so i can include it’s combination are in the first post of the support thread. Good spot on the missing url reference - ta!
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!
niki68
Posts: 4
Joined: Thursday 05 May 2016 16:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by niki68 »

Hi Experts,

While reading a lot of wiki, this forum and some other tutorials I managed to setup homebridge and run it by starting it manual. I now want to have it start automatically after booting the PI (Jessie). I'm following the PM route to do this as mentioned in this thread earlier. Can you please explain the proces around the app.js process?

Code: Select all

pi@raspberrypi:~/homebridge$ pm2 start app.js --name HomeBridge
[PM2] Spawning PM2 daemon
[PM2] PM2 Successfully daemonized
[PM2][ERROR] script not found : /home/pi/homebridge/app.js
script not found : /home/pi/homebridge/app.js
┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
└──────────┴────┴──────┴─────┴────────┴─────────┴────────┴────────┴──────────┘
 Use `pm2 show <id|name>` to get more details about an app
I guess this occurs because there is no app.js in that directory. How can I solve this issue?
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: Siri / HomeKit support for Domoticz

Post by Marci »

Follow the homebridge-edomoticz thread, which covers the current way of doing it with the current version of homebridge and plugin with full step-by-step instructions, rather than this which covers the discontinued method for the old version of homebridge and plugin.
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!
niki68
Posts: 4
Joined: Thursday 05 May 2016 16:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by niki68 »

Aha, was not aware of that. Thanks for the head-up.
Artic1980
Posts: 23
Joined: Monday 25 April 2016 17:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by Artic1980 »

hello you can use Homebridge off the net? I read that if you have an Apple TV connected but you can not get it to work
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: Siri / HomeKit support for Domoticz

Post by simon_rb »

Artic1980 wrote:hello you can use Homebridge off the net? I read that if you have an Apple TV connected but you can not get it to work
Yes you can and you are correct, you need an Apple TV 3 or 4. I am currently using ATV4 but have tested it on a 3. Even works when the ATV goes into standby/sleep mode.

All you need to do is log into your ATV using your same Apple ID, also make sure "allow remote access" is enabled under homekit settings on your iPhone.
Artic1980
Posts: 23
Joined: Monday 25 April 2016 17:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by Artic1980 »

I can not understand where the mistake atv3 is connected to the same network Raspberry iCloud on both ATV on the iPhone on domoticz I have to configure something?


Inviato dal mio iPhone utilizzando Tapatalk
Artic1980
Posts: 23
Joined: Monday 25 April 2016 17:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siri / HomeKit support for Domoticz

Post by Artic1980 »

Hello I have a problem I connected a esp01 and a relay to the entrance gate but to do so I have to pronounce turn open the gate and you do not open the gate as I can make it recognize as a door or gate ?
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: Siri / HomeKit support for Domoticz

Post by Marci »

Issues with external access to HomeBridge are a homebridge issue, and need bringing up over on the homebridge github issues page at https://github.com/nfarina/homebridge/issues

As for the gate... no plugins for homebridge/Domoticz thus far have Service.Door support as of yet, so if you’re relying on a homebridge plugin to link you to Domoticz, commands requesting to “open” or “close” a door/gate won’t work. Homebridge will simply see your door/gate as an on/off switch, so will only recognise “turn on/off [Domoticz name of door device]”.

For Door / Gate support via the eDomoticz plugin, post the device JSON output for your doors / gates to the eDomoticz github issues page and I’ll add it in.
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!
King1987
Posts: 10
Joined: Tuesday 28 July 2015 22:04
Target OS: NAS (Synology & others)
Domoticz version: 2020.2
Contact:

Re: Siri / HomeKit support for Domoticz

Post by King1987 »

OK, maybe a stupid question, but does somebody has this already working on a Synology? If yes: how?
I cannot find it in the many replies and topics.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests