Page 52 of 86

Re: homebridge-edomoticz Plugin

Posted: Monday 07 November 2016 21:30
by TheRamon
If they are off, an on command is sent following a dimmer command. If they were already on, only a dimmer command is sent.

I'm guessing you don't have the right version, even though it says you're up to date. Try removing the folder with rm. Then in the node_modules folder type:

git clone https://github.com/PatchworkBoy/homebri ... moticz.git

Re: homebridge-edomoticz Plugin

Posted: Monday 07 November 2016 21:33
by simon_rb
TheRamon wrote:If they are off, an on command is sent following a dimmer command. If they were already on, only a dimmer command is sent.

I'm guessing you don't have the right version, even though it says you're up to date. Try removing the folder with rm. Then in the node_modules folder type:

git clone https://github.com/PatchworkBoy/homebri ... moticz.git
Ok, the first time I did it I got loads of stuff come up saying what had changed lol so I think it is the right version. :D

Code: Select all

rom https://github.com/PatchworkBoy/homebridge-edomoticz
   2cd5432..72068b5  master     -> origin/master
Updating 2cd5432..72068b5
Fast-forward
 CHANGELOG                 |   16 +-
 InstallGuide              |   60 +-
 LICENSE                   |   19 +-
 README.md                 |   33 +-
 index.js                  | 1363 ++++-----------------------------------------
 lib/constants.js          |   33 ++
 lib/domoticz.js           |  112 ++++
 lib/domoticz_accessory.js | 1218 ++++++++++++++++++++++++++++++++++++++++
 lib/helper.js             |  101 ++++
 lib/mqtt.js               |   85 +++
 lib/services.js           |  290 ++++++++++
 package.json              |    7 +-
 12 files changed, 2036 insertions(+), 1301 deletions(-)
 create mode 100644 lib/constants.js
 create mode 100644 lib/domoticz.js
 create mode 100644 lib/domoticz_accessory.js
 create mode 100644 lib/helper.js
 create mode 100644 lib/mqtt.js
 create mode 100644 lib/services.js

Re: homebridge-edomoticz Plugin

Posted: Monday 07 November 2016 21:43
by simon_rb
Deleted the folder but I can't clone the repo now.. tried

git clone -b https://github.com/PatchworkBoy/homebri ... moticz.git

Doesn't work? Have I missed something

UPDATE:-me being a twat lol its sudo git clone https://github.com/PatchworkBoy/homebri ... moticz.git

Re: homebridge-edomoticz Plugin

Posted: Monday 07 November 2016 21:50
by simon_rb
is sudo npm update -g homebridge-edomoticz the correct master branch? or do I need to clone the repo?

Re: homebridge-edomoticz Plugin

Posted: Monday 07 November 2016 22:40
by TheRamon
The master branch is good yeah. Mqtt-integration doesn't exist anymore :mrgreen:

Just a simple git clone (URL) must work.

Re: homebridge-edomoticz Plugin

Posted: Monday 07 November 2016 22:43
by simon_rb
I've done the Sudo above but haven't cloned yet. With the master branch above I'm still getting an on command then the value with my dimmers. Whether it's via Siri or via the slider...


Sent from my iPhone using Tapatalk

Re: homebridge-edomoticz Plugin

Posted: Monday 07 November 2016 22:45
by madrian
@TheRamon

"More iOs 10 problem:" -> today I moved my whole installation to my Ubuntu server (from rPi). We will see if it is happens again. It worth to enable the MQTT?

The updated version should fix my problem too /dimmer/?

Code: Select all

@ubuntu:~$ sudo npm update -g homebridge-edomoticz
@ubuntu:~$
No output from the update command. Maybe I have the latest version (I installed around 12:00)?

Current state:

Siri Turn the LED off => works
Siri Turn the LED on => works
Siri set LED to 100% (LED was ON) => dim command -> then on command => NOT OK
Siri set LED to 100% (LED was OFF) => dim command -> then on command => NOT OK

Home app => OK, after choosing the value it sends the dim command only.

Re: homebridge-edomoticz Plugin

Posted: Monday 07 November 2016 23:02
by Nautilus
TheRamon wrote: Yeah, I had to fall back to http for colour changing. MQTT does not support that yet. Dimming works through MQTT though so that's why it's sending level 100 through MQTT.
Yes, this sounds very logical :) But then the behavior I'm witnessing with the MiLight bulbs is that any command that should set a different color does not work suggests that something is still not quite right. Maybe the milight json protocol does not follow what Domoticz uses for RGB as "standard" (just guessing, don't have any other RGB hardware)? For example, is the "iswhite=true" (or false) something that is needed with other RGB stuff?

Re: homebridge-edomoticz Plugin

Posted: Monday 07 November 2016 23:48
by thom
Sorry to insist, but I try very Hard, and that never work...

thom wrote:
simon_rb wrote:@Thom

Your config file is wrong. Are you using the latest plugin, if you are you need the MQTT info in their too and make sure you have a broker running and that you have added it to Domoticz under the hardware..
Sorry, I try to reinstalled the Homebridge with MQTT, but I don't understand the way to have the broker running. I installed the MQTT Client in my Domoticz /Hardware. I put this config.json:

Code: Select all

{
    "bridge": {
        "name": "Homebridge",
        "username": "B8:27:EB:0C:D1:C6",
        "port": 51826,
        "pin": "031-45-154"
    },
    "description": "Configuration file for (e)xtended Domoticz platform.",
    "platforms": [
        {
            "platform": "Homebridge",
            "name": "Homebridge",
            "server": "127.0.0.1",
            "port": "8080",
            "ssl": 0,
            "roomid": 2,
            "mqttenable": 1,
            "mqttserver": "127.0.0.1",
            "mqttport": "1883",
            "mqttauth": 0,
            "mqttuser": "",
            "mqttpass": ""
        }
    ],
    "accessories": []
}
The result of npm run start:

Code: Select all

pi@raspberrypi:~/.homebridge$ npm run start
npm ERR! Linux 4.4.26-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start"
npm ERR! node v4.2.1
npm ERR! npm  v2.14.7

npm ERR! missing script: start
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pi/.homebridge/npm-debug.log
and the result of home bridge command:

Code: Select all

pi@raspberrypi:~$ homebridge
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
[Sun Nov 06 2016 16:05:49 GMT-0500 (EST)] Loaded plugin: homebridge-edomoticz
[Sun Nov 06 2016 16:05:49 GMT-0500 (EST)] Registering accessory 'homebridge-edomoticz.eDomoticz'
[Sun Nov 06 2016 16:05:49 GMT-0500 (EST)] Registering platform 'homebridge-edomoticz.eDomoticz'
[Sun Nov 06 2016 16:05:49 GMT-0500 (EST)] ---
[Sun Nov 06 2016 16:05:49 GMT-0500 (EST)] Loaded config.json with 0 accessories and 1 platforms.
[Sun Nov 06 2016 16:05:49 GMT-0500 (EST)] ---
[Sun Nov 06 2016 16:05:49 GMT-0500 (EST)] Loading 1 platforms...
/usr/local/lib/node_modules/homebridge/lib/api.js:118
      throw new Error("The requested platform '" + name + "' was not registered by any plugin.");
      ^

Error: The requested platform 'Homebridge' was not registered by any plugin.
    at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:118:13)
    at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:281:45)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:77: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:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:467:10)
Thank you for the support.

Re: homebridge-edomoticz Plugin

Posted: Tuesday 08 November 2016 0:22
by simon_rb
@Thom

Try npm uninstall -g edomoticz or npm uninstall -g homebridge-edomoticz

then

npm install -g homebridge-edomoticz

Re: homebridge-edomoticz Plugin

Posted: Tuesday 08 November 2016 2:19
by thom
Thank you very much simon_rb, I try but I have the same result.

Code: Select all

Error: The requested platform 'Homebridge' was not registered by any plugin.

Re: homebridge-edomoticz Plugin

Posted: Tuesday 08 November 2016 7:16
by TheRamon
Check your config file. The plugin is not called homebridge. It's called eDomoticz. Change that and it'll work.

@simon_rb, hpapagaj:
I'll have a look at Siri!

Re: homebridge-edomoticz Plugin

Posted: Tuesday 08 November 2016 8:23
by NewFolk
TheRamon wrote: Yeah, I had to fall back to http for colour changing. MQTT does not support that yet. Dimming works through MQTT though so that's why it's sending level 100 through MQTT.
Hope for release soon. :)

Is it posable to disable MQTT by config?

what does this setting does?

Code: Select all

"mqttenable": 1
If I set it to 0 in log I see only

Code: Select all

User: Admin initiated a switch command 
And color changing still does not work.

Re: homebridge-edomoticz Plugin

Posted: Tuesday 08 November 2016 10:04
by TheRamon
hpapagaj wrote:@TheRamon

"More iOs 10 problem:" -> today I moved my whole installation to my Ubuntu server (from rPi). We will see if it is happens again. It worth to enable the MQTT?

The updated version should fix my problem too /dimmer/
It is always worth it to enable mqtt. Fast response times and all.

I _thought_ your problem was fixed with the latest version. (Git)
But there are reports that version is not working yet. So I'm going to try to reproduce the bug by tracing what happens when dimming a light through Siri. If the "on" command is sent, I'll look where it comes from.

Re: homebridge-edomoticz Plugin

Posted: Tuesday 08 November 2016 10:42
by simon_rb
Even using the slider within Home App iOS 10 shows an on command sent each time?? Strange eh

Re: homebridge-edomoticz Plugin

Posted: Tuesday 08 November 2016 13:29
by TheRamon
@simon_rb, hpapagaj:

Please see the issue on GitHub:
https://github.com/PatchworkBoy/homebri ... /issues/57

I have just fixed the dimming issue (kind of a workaround) on master.
Please git pull :)

Re: homebridge-edomoticz Plugin

Posted: Tuesday 08 November 2016 13:43
by TheRamon
@bdormael:

Please see this issue on GitHub:
https://github.com/PatchworkBoy/homebri ... /issues/58

I have just pushed a new version to Git, could you please check and see if your issue with the SecPanel has been resolved?

Re: homebridge-edomoticz Plugin

Posted: Tuesday 08 November 2016 17:22
by simon_rb
TheRamon wrote:@simon_rb, hpapagaj:

Please see the issue on GitHub:
https://github.com/PatchworkBoy/homebri ... /issues/57

I have just fixed the dimming issue (kind of a workaround) on master.
Please git pull :)
Genius! My dimmers are working with Siri and the sliders in iOS 10 Home app!!! Whoop Whoop!

Re: homebridge-edomoticz Plugin

Posted: Tuesday 08 November 2016 18:34
by dfranco
Hi all after installing my homebridge I’m getting the follow error:

/home/pi/domoticz/homebridge/node_modules/homebridge-edomoticz/index.js:1107
motionService.getCharacteristic(new Characteristic.StatusLowBattery()).on('get', this.getLowBatteryStatus.bind(this));
^

TypeError: Cannot read property 'on' of undefined
at Object.eDomoticzAccessory.getServices (/home/pi/domoticz/homebridge/node_modules/homebridge-edomoticz/index.js:1107:89)
at Server._createAccessory (/home/pi/domoticz/homebridge/lib/server.js:375:36)
at Server.<anonymous> (/home/pi/domoticz/homebridge/lib/server.js:361:32)
at /home/pi/domoticz/homebridge/node_modules/hap-nodejs/lib/util/once.js:15:19
at callbackLater (/home/pi/domoticz/homebridge/node_modules/homebridge-edomoticz/index.js:425:37)
at Object.<anonymous> (/home/pi/domoticz/homebridge/node_modules/homebridge-edomoticz/index.js:451:17)
at Request.self.callback (/home/pi/domoticz/homebridge/node_modules/homebridge-edomoticz/node_modules/request/request.js:198:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/home/pi/domoticz/homebridge/node_modules/homebridge-edomoticz/node_modules/request/request.js:1082:10)

Any idea?

Re: homebridge-edomoticz Plugin

Posted: Tuesday 08 November 2016 18:50
by NewFolk
Is Npm version the same to Git master branch?