Page 36 of 86

Re: homebridge-edomoticz Plugin

Posted: Friday 16 September 2016 10:13
by goedh452
I seem to have an interesting "feature". In iOS10 Beta everything was fine, but in the final version commands are sent twice. My setup is: iPhone with iOS10, Homebridge and Domoticz running on a Pi, RFXCom transceiver and KAKU (klikaanklikuit) dimmers. When I send a command eg to set the dimmer to 80%, two commands are send. The first sets the dimmer to 80% and then an "on" command is send resulting in the dimmer to go brighter, less bright, etc.

This goes both for scenes as well as individual dimmers.

The Hombridge console shows:
[9/16/2016, 9:54:07 AM] [eDomoticz] Setting power state to on
[9/16/2016, 9:54:07 AM] [eDomoticz] WK - Bollampen sent command succesfully
[9/16/2016, 9:54:07 AM] [eDomoticz] WK - Bollampen sent command succesfully

Any solutions?

Re: homebridge-edomoticz Plugin

Posted: Friday 16 September 2016 17:44
by Marci
One for TheRamon - dimmers are still on my shopping list.

Can you get the json output for it as per first post?

Abstracting things out so they work with every hardware combo's tricky.

Anyone else have issues with their dimmers on iOS10?

Re: homebridge-edomoticz Plugin

Posted: Friday 16 September 2016 17:49
by simon_rb
Yes I have same issue.. believe I mentioned a couple of weeks ago. Mine behave same as goedh452

Re: homebridge-edomoticz Plugin

Posted: Friday 16 September 2016 20:04
by Toyman
If I set a dimmer to eg 80% in Eve, the node receives 2 commands: "full on", and then "80%" so the light is at 80% in the end but via 100% in between

homebridge-edomoticz Plugin

Posted: Friday 16 September 2016 20:25
by simon_rb
I think the issue is somewhere an on command is sent then the percentage. Whether it's homebridge/domoticz or HomeKit, I'm not sure.

Just tested mine with Eve and it works fine. It does take a while going through each brightness setting but no on command is sent. Is the native home app the messes mine up.

Re: homebridge-edomoticz Plugin

Posted: Saturday 17 September 2016 14:44
by goedh452
Glad I'm not the only one :D

The setup worked fine with ios9 so I guess ios10 causes the problem and not homebridge or domoticz.

Re: homebridge-edomoticz Plugin

Posted: Sunday 18 September 2016 9:00
by Mazzokun
Hi I'm on iOS 10 and HomeKit app.
If I use Elgato Eve App I can see CPU% and Current Usage. If I use the Native HomeKit App tell me that are unsupported.
I have done something wrong or it's Apple fault?
Thank you :)

Re: homebridge-edomoticz Plugin

Posted: Sunday 18 September 2016 9:28
by goedh452
You did not do anything wrong. The native home app just does not support al sensors yet.

Re: homebridge-edomoticz Plugin

Posted: Sunday 18 September 2016 10:46
by simon_rb
Goedh452 is correct. CPU and Current Usage are custom devices, lucky enough Eve supports custom devices whereas the native home app does not.


Sent from my iPhone using Tapatalk

Re: homebridge-edomoticz Plugin

Posted: Sunday 18 September 2016 11:54
by rich710
Thank you for this excellent (i hope) plugin, I installed jessie and domoticz the manual way, but then tried this guide, think I did your guide as sdcard-image version. and now I am stucked. Everytime I try to start with the "homebridge" command I get an error that says like this, any help about what is wrong in my setup?

Regards //Richard

[9/18/2016, 9:48:32 AM] No plugins found. See the README for information on inst alling plugins.
[9/18/2016, 9:48:33 AM] Loaded config.json with 0 accessories and 1 platforms.
[9/18/2016, 9:48:33 AM] ---
[9/18/2016, 9:48:33 AM] Loading 1 platforms...
/usr/local/lib/node_modules/homebridge/lib/api.js:106
throw new Error("The requested platform '" + name + "' was not registered by any plugin.");
^

Error: The requested platform 'eDomoticz' was not registered by any plugin.
at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:106:13)
at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server. js:263:45)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:71:36)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge :17:22)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)

Re: homebridge-edomoticz Plugin

Posted: Sunday 18 September 2016 19:00
by binbakker
:) :) :)
thx for the effort, after a lot of errors, I finally have it up and running.
Is possible to add more plugins?
for example: https://www.npmjs.com/package/homebridge-synology
Not sure if I will use this one cause it contains password.

thnx again :mrgreen:

Re: homebridge-edomoticz Plugin

Posted: Sunday 18 September 2016 23:37
by Marci
rich710 wrote:Thank you for this excellent (i hope) plugin, I installed jessie and domoticz the manual way, but then tried this guide, think I did your guide as sdcard-image version. and now I am stucked. Everytime I try to start with the "homebridge" command I get an error that says like this, any help about what is wrong in my setup?

Regards //Richard

[9/18/2016, 9:48:32 AM] No plugins found. See the README for information on inst alling plugins.
[9/18/2016, 9:48:33 AM] Loaded config.json with 0 accessories and 1 platforms.
[9/18/2016, 9:48:33 AM] ---
[9/18/2016, 9:48:33 AM] Loading 1 platforms...
/usr/local/lib/node_modules/homebridge/lib/api.js:106
throw new Error("The requested platform '" + name + "' was not registered by any plugin.");
^

Error: The requested platform 'eDomoticz' was not registered by any plugin.
at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:106:13)
at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server. js:263:45)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:71:36)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge :17:22)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
The SD card image guide is for the SD card image, not for manual installs. As a result, the plugin hasn't installed in the right location.

Where has homebridge installed?

Code: Select all

sudo find / -name homebridge
Where has the plugin installed?

Code: Select all

sudo find / -name homebridge-edomoticz

Re: homebridge-edomoticz Plugin

Posted: Sunday 18 September 2016 23:38
by Marci
binbakker wrote::) :) :)
thx for the effort, after a lot of errors, I finally have it up and running.
Is possible to add more plugins?
for example: https://www.npmjs.com/package/homebridge-synology
Not sure if I will use this one cause it contains password.

thnx again :mrgreen:
Yup. Homebridge allows as many plugins as you like.

Re: homebridge-edomoticz Plugin

Posted: Sunday 18 September 2016 23:41
by Marci
goedh452 wrote:You did not do anything wrong. The native home app just does not support al sensors yet.
Not a matter of 'yet' - native app will only ever support native types & MFi-certified custom types. It'll never support non-MFi custom types. As a result, remote automation etc may also have limited functionality as that also requires an MFi chip according to latest HomeKit spec.

Re: homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 11:57
by TheRamon
Yep, heard about the dimmer issue.
Sends two commands back, namely the power state, and if on> sends dimmer value also.

Should be one command only. I'll have a look!

Re: homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 13:41
by TheRamon
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?

@Marci, I saw you updated master, but then reverted it. Any issues with Doorlocks? I'd be happy to take a look.

Re: homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 14:45
by MacJL
Hello,

I don't know if someone is interested, but I've made a Dockerfile with homebrideg-edomoticz that can work on x86(PC) or arm (Rapsberry).

Here is the Dockerfile

Code: Select all

## On ARM v6l
FROM docker.io/resin/rpi-raspbian:jessie
ENV NODE_ARCH=armv6l

## On x86_64
#FROM debian:jessie
#ENV NODE_ARCH=x64

# Base packages
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
 apt-get install -y curl xz-utils git python make g++ libavahi-compat-libdnssd-dev && \
 apt-get clean

# Install node.js
ENV NODE_VERS=v6.9.1
WORKDIR /opt
RUN curl -O "https://nodejs.org/dist/$NODE_VERS/node-$NODE_VERS-linux-$NODE_ARCH.tar.xz"
RUN tar -xf node-$NODE_VERS-linux-$NODE_ARCH.tar.xz
ENV NODE_HOME=/opt/node-$NODE_VERS-linux-$NODE_ARCH
ENV PATH="$NODE_HOME/bin:${PATH}"

# Install Homebridge
WORKDIR $NODE_HOME/lib/node_modules
ADD https://api.github.com/repos/nfarina/homebridge/git/refs/heads/master /opt/homebridge.info
RUN git clone -b master https://github.com/nfarina/homebridge.git
WORKDIR $NODE_HOME/lib/node_modules/homebridge
RUN npm install

# Install Homebridge-eDomoticz from git
WORKDIR $NODE_HOME/lib/node_modules
ADD https://api.github.com/repos/PatchworkBoy/homebridge-edomoticz/git/refs/heads/master /opt/homebridge-edomoticz.info
RUN git clone -b master https://github.com/PatchworkBoy/homebridge-edomoticz.git
WORKDIR $NODE_HOME/lib/node_modules/homebridge-edomoticz
RUN npm install

# Final parameters
WORKDIR $NODE_HOME/lib/node_modules
VOLUME /root/.homebridge
VOLUME /var/run/dbus
EXPOSE 51826
ENTRYPOINT ["/bin/bash", "-c"]
CMD [".bin/homebridge"]
If you already have docker installed, you can build and start homebridge like this :

Code: Select all

mkdir ~/edomoticz
nano ~/edomoticz/Dockerfile
	# Put the Dockerfile here, and comment/uncomment first lines to match your hardware
nano ~/edomoticz/config.json
	# Put your config.json here
docker build -t homebridge-edomoticz ~/edomoticz/
docker run -d -p 51826:51826 -v ~/edomoticz:/root/.homebridge -v /var/run/dbus:/var/run/dbus --restart=always homebridge-edomoticz
Please let me know if you see things that I can improve.

homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 18:02
by Marci
TheRamon wrote: @Marci, I saw you updated master, but then reverted it. Any issues with Doorlocks? I'd be happy to take a look.
Nope, afaik door locks working fine... think I mistakenly merged something to master so had to undo - wasn't directly related.

Got a few branches I need to merge in covering SSL issues as those are confirmed as fixed now.

Re: homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 21:14
by rich710
Thanks for your answer, I realized I followed the wrong guide, but if It's possible to solve it without doing a total
reinstall it would be nice.
I have posted my "find" commands further down in this message.
Couldn't find anything for "homebridge-edomoticz"

Where has homebridge installed?

Code: Select all

sudo find / -name homebridge
pi@raspberrypi:~ $ sudo find / -name homebridge
/root/.npm/homebridge
/root/.npm/registry.npmjs.org/homebridge
/usr/bin/homebridge
/usr/local/lib/node_modules/homebridge
/usr/local/lib/node_modules/homebridge/bin/homebridge
/usr/local/bin/homebridge
Where has the plugin installed?
pi@raspberrypi:~ $ sudo find / -name homebridge-edomoticz
pi@raspberrypi:~ $


Code: Select all

sudo find / -name homebridge-edomoticz

Re: homebridge-edomoticz Plugin

Posted: Monday 19 September 2016 21:20
by Marci
Looks like it hasn't installed then.

Code: Select all

sudo npm install -g homebridge-edomoticz