Page 12 of 86

Re: eDomoticz Homebridge-Plugin

Posted: Thursday 31 March 2016 20:01
by Marci
Am out of ideas then - sorry! You'll have to raise as a new issue on the homebridge GitHub repo.

Re: eDomoticz Homebridge-Plugin

Posted: Thursday 31 March 2016 20:05
by simon_rb
Marci wrote:Cool - shall have an update supporting those by Sunday hopefully.
Brilliant - Thanks. As I mentioned before I have set a scene to operate the button in HomeKit, It works by saying "Open Curtains" that scene turns off Curtains switch in Domoticz which then opens the curtains and "Close Curtains" Turns the switch on and closes them. Same applies with blinds. With your update maybe we can ask if the curtains are closed and Siri would be able to answer :)

Re: eDomoticz Homebridge-Plugin

Posted: Thursday 31 March 2016 21:23
by deejc
Marci wrote:Cool - shall have an update supporting those by Sunday hopefully.
You crack me up, seriously you must be the most responsive, approachable dev I have ever come across!!!
Get a Vera and redo the plugin for me haha
Nice one mate.

Re: eDomoticz Homebridge-Plugin

Posted: Friday 01 April 2016 7:50
by Appesteijn
Very nice thank you! The how to worked like a charm, only the copy&paste from the homebridge.sh script didn't work.
The three “ were pasted as ^^ (from my mac to nano on RPi3)

Re: eDomoticz Homebridge-Plugin

Posted: Friday 01 April 2016 18:06
by SwordFish
Marci wrote:Am out of ideas then - sorry! You'll have to raise as a new issue on the homebridge GitHub repo.
Thanks for the help.
But I got it working now, don't ask how :?

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 02 April 2016 0:44
by simon_rb
You crack me up, seriously you must be the most responsive, approachable dev I have ever come across!!!
Get a Vera and redo the plugin for me haha
Nice one mate.
^^^Your absolutely right^^^

I have just managed to hook a raspberry pi to my garage door using GPIO pins and can now open it with a toggle switch within domoticz. Only thing is I don't know how to get Siri (HomeKit) to recognise that its a garage door. Even tried a scene call "Open Garage Door" and it ignores the scene and says "I can't find any garage doors" Is there a way of convincing Siri that its a garage door. Didn't notice a door option in Eve. Hmmm Any ideas would be greatly appreciated.

Cheers

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 02 April 2016 9:50
by Marci
Most reliable method for scenes is 'set [scene name]'. Call the scene 'garage door open'. Siri won't recognise it's a door unless I define it as the door service type, but this is reserved for specific sensors which can (must) be able to provide a jammed/unjammed/closed/open/locked/unlocked state to meet the HomeKit service definition, which a Domoticz switch can't.

eDomoticz Homebridge-Plugin

Posted: Saturday 02 April 2016 9:53
by simon_rb
Marci wrote:Most reliable method for scenes is 'set [scene name]'. Call the scene 'garage door open'. Siri won't recognise it's a door unless I define it as the door service type, but this is reserved for specific sensors which can (must) be able to provide a jammed/unjammed/closed/open/locked/unlocked state to meet the HomeKit service definition, which a Domoticz switch can't.
Ah, that's a shame!! I'll try the workaround - thanks for the reply! :-)

Update:- saying the word set works, I'll have to remember to say "set"

eDomoticz Homebridge-Plugin

Posted: Saturday 02 April 2016 9:55
by Marci
(For an idea of how HomeKit works, Have a look at https://github.com/KhaosT/HAP-NodeJS/bl ... itTypes.js - scroll to bottom - line 1791 onwards - and you'll see service definitions and any required characteristics. Scroll up and find the characteristics for their format etc. These are the official HomeKit sensor types and expected response types etc - I need to go thru this again myself as new services and characteristics appear with every iOS update...!)

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 02 April 2016 16:19
by Marci
simon_rb wrote:...I have curtains and blinds, I have one switch for each curtain/blind in domoticz to open and close them. I have setup a scene called open curtains,open kitchen blind etc.. And it works well. Just wondered if there is a way for your plugin to show them as blinds/curtains to HomeKit?
SwitchType:3 support now added which should cover all your blinds! Use code below to update & restart, then let me know if it works.
Bink wrote:I can confirm that now it's not crashing anymore but as mentioned there the override does not work as expected (the temps are set as a permanent override).
Give it another try with the update installed and let me know!

Code: Select all

sudo npm update -g homebridge-edomoticz
forever restart /usr/local/lib/node_modules/homebridge/bin/homebridge
tail -f `ls -t ~/.forever/*.log | grep -v '^d' | head -n1`

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 02 April 2016 16:33
by simon_rb
That was very quick! Not Sunday yet ;)

Update:- Don't think its worked. It failed on grabbing curtains.

Update 2:- Changed Curtains to a light switch and Homebridge passed it and then failed when it got to the Kitchen Blind.

Code: Select all

[4/2/2016, 3:56:44 PM] [eDomoticz] Initializing platform accessory 'Curtains'...
/usr/local/lib/node_modules/homebridge-edomoticz/index.js:1111
              blindService.getCharacteristic(Characteristic.StatePosition).on('get', this.getBlindPStatus.bind(this));
                                                                          ^

TypeError: Cannot read property 'on' of undefined
    at Object.eDomoticzAccessory.getServices (/usr/local/lib/node_modules/homebridge-edomoticz/index.js:1111:75)
    at Server._createAccessory (/usr/local/lib/node_modules/homebridge/lib/server.js:357:36)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:343:32)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:15:19
    at callbackLater (/usr/local/lib/node_modules/homebridge-edomoticz/index.js:366:37)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-edomoticz/index.js:392:17)
    at Request.self.callback (/usr/local/lib/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> (/usr/local/lib/node_modules/homebridge-edomoticz/node_modules/request/request.js:1082:10)
    at emitOne (events.js:82:20)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-edomoticz/node_modules/request/request.js:1009:12)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:893:12)
    at doNTCallback2 (node.js:429:9)
    at process._tickCallback (node.js:343:17)
pi@raspberrypi ~ $ 

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 02 April 2016 17:40
by Marci
Oops - that should’ve been

Code: Select all

blindService.getCharacteristic(Characteristic.PositionState)
...not StatePosition... (fixed)

Update again and retry...!

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 02 April 2016 18:23
by simon_rb
Its now loading hombridge but you can't open or close them using Siri. Says It can't find them. Also you can only do it via percentage in Eve, No open or close buttons. Whenever you ask siri to open the curtains or open the curtains in the living room it says it can't find any devices at this time. Hmm

I have to be call the curtains blinds to activate them. They are also the wrong way round. Open closes them and Close opens them. The Kitchen and Utility blinds do not respond.

Sorry to be a pain but I guess its hard as you can't test them. When I ask Siri to close all blinds it says there are no shades. If no-one objects would it be possible to drop support and go back to how they were before. I think its going to be more effort on your part than its worth. I just set scenes for close/open curtains, Kitchen & Utility blinds and it worked fine. I thought open/close buttons in eve and being able to say close all blinds etc would be the finishing touches but I don't think it will work.

Thanks :)

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 02 April 2016 18:58
by Marci
It’ll work given time - I’m building my own blind motor & controller at the mo, so once that’s finished I’ll get it sorted. In meantime, changes have now been reverted in v1.31 - just update again.

And yeah, reading up, it appears Siri support for the WindowCovering service (which was introduced in iOS9) is patchy at best, and does only respond to instructions addressing “blinds”... fixing the open/closed being wrong way round is simple enough. Service is designed to deal with % of window covered. i.e.: Set living room blind to 30% would roll a roller blind down enough to cover 30% of the window, therefore blind closed = 100%. I set the plugin up for yours so that any % above 50 would cause curtains to close, and any % below 50 would cause to open. Downside of the proper HomeKit service types is they have to be used how Apple intended them... and Custom service types are exempt from Siri comms as far as Im aware.

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 02 April 2016 19:11
by simon_rb
Ah fair enough, thanks for reverting back. I'll help by testing once your ready to do it again. Thanks again!


Sent from my iPhone using Tapatalk

Re: eDomoticz Homebridge-Plugin

Posted: Friday 08 April 2016 16:11
by SwordFish
Is it correct to say that siri doesn't tell me the temperature of the living room when I ask?

Re: eDomoticz Homebridge-Plugin

Posted: Friday 08 April 2016 16:59
by Marci
Assuming you've added temp sensor to Living Room in your HomeKit app, s'just down to how you ask...

"Hey Siri, how warm is it in the living room?"

Re: eDomoticz Homebridge-Plugin

Posted: Friday 08 April 2016 18:54
by simon_rb
Having a little issues with the actual homebridge at the mo. I have tried to use the forever command. Whenever I try and run "/etc/init.d/homebridge.sh start" I get

bash: /usr/bin/forever: No such file or directory

I have tried

ln -s /usr/bin/nodejs /usr/bin/node

But no help.

Any ideas.

Cheers

Re: eDomoticz Homebridge-Plugin

Posted: Friday 08 April 2016 18:57
by Marci
you need to work out where homebridge is installed on your system.

Normally on a clean system following instructions in first post, this is /usr/local/lib/node_modules/homebridge/bin/homebridge

To find it on yours...

Code: Select all

sudo find / -name homebridge
Then substitute /usr/local/lib/node_modules/homebridge/bin/homebridge for your install location in /etc/init.d/homebridge.sh

Re: eDomoticz Homebridge-Plugin

Posted: Friday 08 April 2016 19:06
by simon_rb
As ever thank you for your prompt reply. I think I have made a mess of installing homebridge as I did it along time ago. Wonder if I can uninstall some of it somehow. I have ran your command and got this back. No wonder I'm having probs lol.

Code: Select all

pi@raspberrypi ~ $ sudo find / -name homebridge
/root/.npm/homebridge
/root/.npm/registry.npmjs.org/homebridge

/home/pi/.npm/homebridge
/usr/local/bin/homebridge
/usr/local/lib/node_modules/homebridge
/usr/local/lib/node_modules/homebridge/bin/homebridge
I'm a little confused what to substitute where? Would this be in the forever script?