homebridge-edomoticz Plugin

Moderator: leecollings

simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

homebridge-edomoticz Plugin

Post by simon_rb »

Can anyone confirm something for me. I believe the behaviour within HomeKit may have changed. Before when a device was on and you requested it to be turned on again, it would send the on command. Which I need for some of my devices. Was trying today and it's not sending an on command to domoticz if the device is already on. If I remember correctly TheRamon had changed it so it would send an on command if it was already on. Has this or HomeKits behaviour changed?

Cheers Guys

Update:-
Thinking about it, maybe it was the off command I was thinking about. Having it send the on command messed up some of the dimmers. Funny really as for some of the switches I need an on command sent even if it's on as they switch channels on a matrix.. doh!


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

Yeah! It was the off command one can send multiple times. Sending two ON commands is not possible, only one will flow through. This was because of the "dimmer" issue. Apparently sometimes an "on" commands gets sent twice, even when dimming a light to 50%. So 50% + on command = 100% since ON = 100%.
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

homebridge-edomoticz Plugin

Post by simon_rb »

TheRamon wrote:@simon:

Yeah! It was the off command one can send multiple times. Sending two ON commands is not possible, only one will flow through. This was because of the "dimmer" issue. Apparently sometimes an "on" commands gets sent twice, even when dimming a light to 50%. So 50% + on command = 100% since ON = 100%.
That's right. I realised after the post. I don't want two on commands sent. Just an on command even if the switch is on. I have 4 switches - Siri TV, Siri Fire TV, Siri Apple TV & Siri PS4. When one of them turns on it will set my HDMI matrix to the right channel and turn the TV on if its off. When they are all off the TV will turn off so that works great. Issue is (not really an issue but inconvenience lol) when you want to switch from one to the other when it's already on.. for example the Siri Fire TV is on, I can turn on Siri Sky TV to see what's on that and it all changes the matrix over but if I want to switch back to the Siri Fire TV and ask it to turn Fire TV on (renamed them all to remove the Siri inside HomeKit) and it responds saying it's done however the Siri Fire TV in Domoticz isn't switched on because it's already on so it wont change the matrix back over so I have to turn off the Siri Fire TV then turn it back on again to get it to activate..

Is this a HomeKit behaviour or are we not sending an on if the switch is on using edomoticz. If it's the later can you separate behaviour between lights and switches so switches would send an on command as that probably wouldn't do any harm. If this is possible I'm happy to make the modification locally so not to effect other people's setup lol.

Other uses for the above could be when a switch doesn't get the on signal from domoticz you can issue the on command again via Siri but with current setup it has to be turned off then on again.

Really funny asking about this as I was one of the ones who had the problem with dimmers receiving an on command when they were already on!! Lol.

Thanks TheRamon!!!


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: homebridge-edomoticz Plugin

Post by Marci »

Knock up a blocky script in Domoticz, to turn the other switches off when you turn one 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!
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 »

Marci wrote:Knock up a blocky script in Domoticz, to turn the other switches off when you turn one on...?
I have a blocky that will switch back if two are on then turn one of the Siri Tv activities are turned off and works for most cases. Can't switch between sources if I leave them on for whatever reason though.

More curious to know if it's possible to resend an on command to a device that's already on as sometimes they don't receive the command, although do not want to ruin the good work done in regards to the dimmers.

Cheers Marci
Pauldc
Posts: 9
Joined: Friday 13 January 2017 12:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post by Pauldc »

So I’m doing a fresh installation of image 4834 on a Pi 2, and was going to go with option 2 from post 1. Im just a bit confused of which node install do go with seems the 4834 says if its on a Pi A/B/B+ to use: node-v6.3.1-linux-armv6l.tar.gz and the 3530 for Pi 2/3 use node-v6.3.1-linux-armv7l.tar.gz.

Well I’m on a Pi 2 with 4834 so should i run node-v6.3.1-linux-armv6l.tar.gz or node-v6.3.1-linux-armv6l.tar.gz seems the Pi 2 uses armv7l i think? I’m very new to this and very confused.

Any help would be great
Lorccan
Posts: 32
Joined: Wednesday 21 December 2016 10:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post by Lorccan »

I had everything working, but needed to rearrange room plans - which meant deleting a room (6) on the Domoticz side - so I removed this from config.json as well:

Code: Select all

{
    "description" : "Configuration file for Domoticz platform",
    "bridge" : {
            "name" : "Homebridge",
            "username" : "XX:XX:XX:XX:XX:XX",
            "port" : 34473,
            "pin" : "031-45-154"
        },
    "platforms": [
        {
            "platform" : "eDomoticz",
            "name" : "eDomoticz",
            "server" : "127.0.0.1",
            "port" : "8080",
            "roomid" : 2,
            "loadscenes" : 0
       },
       {
            "platform" : "eDomoticz",
            "name" : "eDomoticz",
            "server" : "127.0.0.1",
            "port" : "8080",
            "roomid" : 3,
            "loadscenes" : 0
       },
       {
            "platform" : "eDomoticz",
            "name" : "eDomoticz",
            "server" : "127.0.0.1",
            "port" : "8080",
            "roomid" : 4,
            "loadscenes" : 0
       },
       {
            "platform" : "eDomoticz",
            "name" : "eDomoticz",
            "server" : "127.0.0.1",
            "port" : "8080",
            "roomid" : 5,
            "loadscenes" : 0
       },
       {
            "platform" : "eDomoticz",
            "name" : "eDomoticz",
            "server" : "127.0.0.1",
            "port" : "8080",
            "roomid" : 7,
            "loadscenes" : 0
       },
       {
            "platform" : "eDomoticz",
            "name" : "eDomoticz",
            "server" : "127.0.0.1",
            "port" : "8080",
            "roomid" : 8,
            "loadscenes" : 0
       }
    ],
    "accessories" : [
    ]
}
When I launch Homebridge now, I get an error:

Code: Select all

Jan 13 16:39:23 domoticz-1 homebridge[646]: [1/13/2017, 4:39:23 PM] [eDomoticz] There was a problem connecting to Domoticz. (HTTP Status code 200)
Jan 13 16:39:23 domoticz-1 homebridge[646]: [object Object]
and this is at the position of the missing room.

Can anyone suggest how to get around this please?
Lorccan
Posts: 32
Joined: Wednesday 21 December 2016 10:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post by Lorccan »

Lorccan wrote:I had everything working, but needed to rearrange room plans - which meant deleting a room (6) on the Domoticz side - so I removed this from config.json as well:

When I launch Homebridge now, I get an error:

Code: Select all

Jan 13 16:39:23 domoticz-1 homebridge[646]: [1/13/2017, 4:39:23 PM] [eDomoticz] There was a problem connecting to Domoticz. (HTTP Status code 200)
Jan 13 16:39:23 domoticz-1 homebridge[646]: [object Object]
and this is at the position of the missing room.

Can anyone suggest how to get around this please?
I found the solution: stupid error - I was editing the wrong config.json file!
darrepac
Posts: 133
Joined: Tuesday 04 February 2014 21:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Isère, France
Contact:

Re: homebridge-edomoticz Plugin

Post by darrepac »

This plugin and this thread seem worth to try to impress our wife using Siri to drive our home...
Yet, I have some issues and would need your help.
I have domoticz running on 192.168.0.19 with MQTT broker stuff done (and tested on local with mosquitto_pub test)
I have homebridge and homebridge-edomoticz plugin installed and (seems) working on 192.168.0.27
So they are not running on the same server. I write the following config.json:

Code: Select all


    "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": "192.168.0.19",
            "port": "9090",
            "ssl": 0,
            "roomid": 0,
            "mqtt": 1
        }
    ],
    "accessories": [],
    "mqtt": {
            "host": "192.168.0.19",
            "port": 1234
        }
}

Once I launch homebridge, I have the following error:

Code: Select all

[1/15/2017, 4:52:04 PM] [eDomoticz] Could not connect to MQTT broker! (192.168.0.27:1883)
Yet, on Home iOS application, all devices are detected. Yet, actions doesn't seem to work
Lalsacien
Posts: 1
Joined: Friday 20 January 2017 19:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: Strasbourg, France
Contact:

Re: homebridge-edomoticz Plugin

Post by Lalsacien »

Hello,

Newbie for installing homebridge-edomoticz I tried many times but I ever have some errors.
My configuration is a Pi 2, and Domoticz Version: 3.5877

Could you perhaps help me a little bit please ?

Here is what I made (as the same above) :

sudo npm set prefix '/usr/local' -g
sudo npm install -g homebridge --unsafe-perm

Then I have errors :

gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.1.19-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge/node_modules/mdns
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
/usr/local/lib
âââ (empty)

npm ERR! Linux 4.1.19-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge" "--unsafe-perm"
npm ERR! node v6.3.1
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mdns package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs mdns
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls mdns
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/npm-debug.log
npm ERR! code 1

I don't know what to do :( Many thanks for help

Best regards
Lal
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 »

darrepac wrote:I have domoticz running on 192.168.0.19 with MQTT broker stuff done (and tested on local with mosquitto_pub test)
You say you have MQTT setup and it works? Have you added it inside Domoticz as a hardware?

Cheers


Sent from my iPhone using Tapatalk
jompie
Posts: 14
Joined: Sunday 09 November 2014 18:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: Netherlands
Contact:

Re: homebridge-edomoticz Plugin

Post by jompie »

Hi,

I get also the same errors as Lalsacien. For some reason it looks like the homebridge directory is not created.
Please help.
KAKU switches/receivers/Motion sensor/Doorbell
Oregon Temp sensors, TFA Temp sensor
Mertik controller
Raspberry Pi, RFXCom
drmabuse71
Posts: 10
Joined: Sunday 29 January 2017 8:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post by drmabuse71 »

Hi,
first of all: thanks for the great help given on this side !!! :)

Has someone solved darrepac´s problem ?
Got the same:

[1/29/2017, 8:14:41 AM] [eDomoticz] Could not connect to MQTT broker! (localhost:1883)

the Devices are shown in HomeKit, but they don´t work.
I checked it out with only one device, an Aeotec Switch DSC24 - 2nd generation.
The switch itself is shown in HomeKit as a switch, but does not work.
The two meters, Voltage and kWH are shown in Homekit as "not supported devices" - they are unlighted.
Pi:
Spoiler: show
Raspberry Homebridge log
Raspberry Homebridge log
Bildschirmfoto 2017-01-29 um 08.34.53.png (60.85 KiB) Viewed 3622 times
Domoticz:
Spoiler: show
Domoticz MQQT Switch
Domoticz MQQT Switch
Bildschirmfoto 2017-01-29 um 08.34.22.png (68.07 KiB) Viewed 3622 times
config,.json
Spoiler: show

Code: Select all

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:21:3E:E4:DE:44",
        "port": 51826,
        "pin": "031-45-154"
    },
    "description": "Configuration file for (e)xtended Domoticz platform.",
    "platforms": [
        {
            "platform": "eDomoticz",
            "name": "eDomoticz",
            "server": "192.168.0.6",
            "port": "8080",
            "ssl":0,
            "roomid": 0,
            "mqtt": 1
        }
    ],
Any suggestions ? ;-)

Thx for ur help in advance,
kind regards,
Michael
drmabuse71
Posts: 10
Joined: Sunday 29 January 2017 8:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post by drmabuse71 »

Got some news:

I figured out, that the switch works, if I turn off my MQTT Device in Domoticz !
Homebridge says something as: Turn on your MQTT Dummy in Domoticz or something,
but the device is working :-(

Seems, that there is something wrong according the communication between Domoticz and the
homebridge Plugin .....

Any solutions ?

Kind regars, Michael
User avatar
EdddieN
Posts: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

Re: homebridge-edomoticz Plugin

Post by EdddieN »

Hi,

I can see my hombebridge:
IMG_7493.PNG
IMG_7493.PNG (22.39 KiB) Viewed 3511 times
but stays there forever to eventually fail. My terminal windows says all ok, running on port 51826... any idea
11101101 - www.machinon.com
stef84
Posts: 4
Joined: Sunday 05 February 2017 16:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: homebridge-edomoticz Plugin

Post by stef84 »

Hi.

I use raspberry zero and it work hombridge.

For compile, i use this guide:

Code: Select all


        ____                        _   _
     ___|  _ \  ___  _ __ ___   ___ | |_(_) _v0.2.3
    / _ | | | |/ _ \| '_ ` _ \ / _ \| __| |/ __|_  /
   |  __| |_| | (_) | | | | | | (_) | |_| | (__ / /
    \___|____/ \___/|_| |_| |_|\___/ \__|_|\___/___|
       www.npmjs.com/package/homebridge-edomoticz

   A Platform Plugin for HomeBridge by Marci & TheRamon
           [http://twitter.com/marcisshadow] 
           [http://domoticz.com/forum/memberlist.php?mode=viewprofile&u=10884]
  
From a clean install of Jessie on Raspberry Pi, booted up and connected to WLAN...

sudo apt-get update
sudo apt-get upgrade
sudo reboot

sudo apt-get install rpi-update
sudo BRANCH=next rpi-update    [fixes Wifi Ch12/13 issue with rPi3 WiFi]
iwconfig wlan0 power off       [fixes powermanagement issue with WiFi on all Raspberry Pi]

sudo touch /etc/network/if-up.d/wlan0                   [these lines make the powermanagement fix permanent]
sudo chmod +x /etc/network/if-up.d/wlan0
sudo chmod 777 /etc/network/if-up.d/wlan0
sudo echo -e '#!/bin/bash\niwconfig wlan0 power off' > /etc/network/if-up.d/wlan0
sudo chmod 755 /etc/network/if-up.d/wlan0

sudo reboot

[Installing Domoticz]
sudo curl -L install.domoticz.com | bash

[Only need to do the following lines if on RaspberryPi Model B / B+ / nonARM7 CPU]
sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*} /var/db/receipts/org.nodejs.*
hash -r
sudo su -c 'echo "deb https://deb.nodesource.com/armv6l-node/ weezy main" >> /etc/apt/sources.list'

##### per raspy 2 and 3
sudo curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -

###### per Raspy ZERO, usare questi comandi 
wget https://nodejs.org/dist/v4.4.5/node-v4.4.5-linux-armv6l.tar.gz
tar -xvf node-v4.4.5-linux-armv6l.tar.gz
cd node-v4.4.5-linux-armv6l
sudo cp -R * /usr/local/
sudo reboot

[otherwise continue from here]
sudo apt-get install -y build-essential python-rpi.gpio nodejs
sudo apt-get install libavahi-compat-libdnssd-dev
sudo apt-get install git
sudo apt-get install mosquitto
sudo npm install -g node-red --unsafe-perm
sudo wget https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/nodered.service -O /lib/systemd/system/nodered.service
sudo wget https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/node-red-start -O /usr/bin/node-red-start
sudo wget https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/node-red-stop -O /usr/bin/node-red-stop
sudo chmod +x /usr/bin/node-red-st*

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

mkdir ~/.homebridge
pico ~/.homebridge/config.json [refer to https://github.com/PatchworkBoy/homebridge-eDomoticz, ctrl-o to save, ctrl-x to exit]

sudo pico /lib/systemd/system/homebridge.service

#---Start Copy---#
[Unit]
Description=HomeBridge Service
After=multi-user.target

[Service]
User=pi
Type=idle
ExecStart=/usr/bin/homebridge

[Install]
WantedBy=multi-user.target
#---END Copy---#

[Paste (ctrl-v from win clients, cmd-v from Mac clients)
ctrl-o to save, ctrl-x to exit]

sudo chmod 644 /lib/systemd/system/homebridge.service
sudo systemctl daemon-reload
sudo systemctl enable homebridge.service
sudo systemctl enable nodered.service
sudo systemctl enable mosquitto.service

sudo apt-get install pi-bluetooth bluetooth bluez blueman [RaspberryPi 3 only]

sudo reboot

[done - navigate to the device in a web browser on port 8080, configure Domoticz, add sensors, reboot. Pair to the Homebridge from your iOS device.]


------------------------------------------

# Running Homebridge on Boot (/etc/rc.local) using Screen

# If you would like your Pi to start up HomeBridge automatically in a Screen session on reboot, you need to install Screen and edit the Pi's /etc/rc.local file.

Install Screen

       sudo apt-get install screen

Edit /etc/rc.local

       sudo nano /etc/rc.local

Add this line before the exit 0 line:

       su -c "screen -dmS homebridge homebridge" -s /bin/sh pi


Inviato dal mio iPhone utilizzando Tapatalk
User avatar
EdddieN
Posts: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

Re: homebridge-edomoticz Plugin

Post by EdddieN »

I tried that one too, nothing...
11101101 - www.machinon.com
User avatar
EdddieN
Posts: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

Re: homebridge-edomoticz Plugin

Post by EdddieN »

Right I got it to work if I run from terminal "homebridge", however if I use the instructions at boot up on post #1 of this thread I get this when running status:

Code: Select all

● homebridge.service - HomeBridge Service
   Loaded: loaded (/lib/systemd/system/homebridge.service; enabled)
   Active: failed (Result: exit-code) since Mon 2017-02-06 18:53:25 GMT; 2s ago
  Process: 2060 ExecStart=/usr/bin/homebridge (code=exited, status=203/EXEC)
 Main PID: 2060 (code=exited, status=203/EXEC)

Feb 06 18:53:25 pi systemd[1]: Started HomeBridge Service.
Feb 06 18:53:25 pi systemd[1]: homebridge.service: main process exited, code=exited, status=203/EXEC
Feb 06 18:53:25 pi systemd[1]: Unit homebridge.service entered failed state.
any ideas, this linux is really new for me
11101101 - www.machinon.com
User avatar
EdddieN
Posts: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

Re: homebridge-edomoticz Plugin

Post by EdddieN »

Right, finally got it working. Not sure what I was doing but a mix of un-installing as much as I could, installing as post 1 and then using the Wheezy option to start at boot.
11101101 - www.machinon.com
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: homebridge-edomoticz Plugin

Post by woody4165 »

ergofreiberg wrote:Hi!

Would it be possible to add Domoticz built-in Security Panel to Homebridge. Currently I have my Paradox EVO192 linked to Security Panel and in Domoticz everyting is working fine. Is there any point in opening issue about this topic?

Regards,
Ergo
Hi

how did you linked Paradox alarm to the security panel?

Thanks
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests