homebridge-edomoticz Plugin

Moderator: leecollings

Post Reply
Jem101
Posts: 66
Joined: Saturday 02 May 2015 21:26
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Bexleyheath, SE London, UK
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Jem101 »

Right, now I don't know what might have happened but suddenly I've seeing my two actual dimmable devices show up properly in 'Eve' and 'Home' and everything else being properly assigned to on/off.

I haven't run any more updates, all i have done is update my iPad to the latest 9.3 beta (and hence forced a hard reboot).

So now I see two (and only two) devices listed under 'brightness' in Eve which is exactly what I would expect.

Alas Contacts are still MIA in Eve and showing with no status in 'Home'


Weird, weird, weird.....
I firmly believe in having an open mind - although not so open that your brain falls out!

- sometimes attributed to Carl Sagan, but the original quote is much older than that
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: eDomoticz Homebridge-Plugin

Post by Marci »

The plugin is hard coded to recognise your specific json requirements John, so yours should be close to perfect...

I'm now seeing the benefits of m0rph's tag proposal over on GitHub... but don't want to make setup too arduous - ie: having to rename all your devices in Domoticz to include tags, or provide config.json with a list of idx's - defeats the purpose of having a platform plugin to some extent.

I'll look at switchtypeval - cheers sneezy!

Maybe i could extend the room id to a list of rooms... and categorise by room?

Open to suggestions...!
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!
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: eDomoticz Homebridge-Plugin

Post by Marci »

NB: 9.3 beta may have triggered a sign out / in again to iCloud Drive - clears up many issues between HomeKit apps on the same device and across other devices when they start behaving oddly - s'how the HomeKit config is shared.
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!
User avatar
deejc
Posts: 168
Joined: Tuesday 22 September 2015 18:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5641
Location: UK
Contact:

eDomoticz Homebridge-Plugin

Post by deejc »

I think switchtypeval is the way forward!!
Wouldn't that allow proper listing of things like smoke Alarms and everything else ?


Sent from my iPhone using Tapatalk
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
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:

eDomoticz Homebridge-Plugin

Post by Marci »

Possibly... I've knocked up a quick php Domoticz json api emulator so I can simulate all the types quickly n' easily, as well as paste in user's json so I can replicate their devices perfectly for testing - will experiment. Next push will be to fix dimmers & switches (ie: the no fan issue in Eve), then spend some time working thru the various Domoticz switch & sensor types etc more logically, starting with contact sensors!
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!
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: eDomoticz Homebridge-Plugin

Post by Marci »

*whistles innocently* /me gestures towards npm...

...v0.1.11

Code: Select all

sudo npm update -g homebridge-edomoticz && forever restart /usr/local/lib/node_modules/homebridge/bin/homebridge
Have at it - keep me posted!

PS: You may need to rename your homebridge / trash persist / sign in & out of icloud for this one. Any existing sensors will have had definition changes. Unavoidable. @deejc - SwitchTypeVal implemented!
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!
User avatar
deejc
Posts: 168
Joined: Tuesday 22 September 2015 18:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5641
Location: UK
Contact:

Re: eDomoticz Homebridge-Plugin

Post by deejc »

stopped HB, deleted persist, deleted HB in home.app….
restarted HB, added HB back to home.app .. no different, still showing all switches with brightness :-(
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
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: eDomoticz Homebridge-Plugin

Post by Marci »

V0.1.12... Run the update again... :(
(Was hoping to sneak that commit thru with no-one noticing. You're too quick for me!)

For reference only devices with a SwitchTypeVal of 7 are assigned as dimmers - i.e.: edit a switch, check the Switch Type dropdown - only items set as “Dimmer” here are detected within the plugin as having a dimmer. No other property is used for checking, and the brightness characteristic isn’t added to any other custom sensor id’d by Type or SubType.

This is how default HomeKit hardware is now detected, using all the standard HomeKit routines & types etc - they’re fully spec-compliant:

- Sockets (on/off) - Domoticz SwitchTypeVal: 0
- Lamps (on/off) - Domoticz SwitchTypeVal: 0
- Lamps (dimmer) - Domoticz SwitchTypeVal: 7
- Contact Sensors - Domoticz SwitchTypeVal: 2
- Smoke Detectors - Domoticz SwitchTypeVal: 5
- Motion Sensors - Domoticz SwitchTypeVal: 8
Last edited by Marci on Wednesday 10 February 2016 21:57, edited 1 time in total.
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!
User avatar
deejc
Posts: 168
Joined: Tuesday 22 September 2015 18:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5641
Location: UK
Contact:

Re: eDomoticz Homebridge-Plugin

Post by deejc »

I don't know what has happened but home app won't see the homebridge at all now, I even restarted the phone


Sent from my iPhone using Tapatalk
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
Jem101
Posts: 66
Joined: Saturday 02 May 2015 21:26
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Bexleyheath, SE London, UK
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Jem101 »

Updated, cleared persist cache re-added homebridge

and

Everything is working perfectly!

Only my two actual dimmable lights are showing as such, everything else is showing as On/Switch or Contact, status updates correctly in Eve to reflect changes in Domoticz.

Truly, truly excellent.

One tiny, tiny thing, my windows contact sensors show as Type Contact but the status is showing as YES or NO instead of CLOSED and OPEN, the status does however change when I open a Window (EVE changes from YES to NO and back again when I close it). Not a biggie but is it easy to change the wording?

John
I firmly believe in having an open mind - although not so open that your brain falls out!

- sometimes attributed to Carl Sagan, but the original quote is much older than that
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: eDomoticz Homebridge-Plugin

Post by Marci »

@deejc - here are my steps when things do this for me:

- Rename the homebridge in config.json to a new name, and vary the username: string (the mac address field)
- rm -rf * your persist folder
- Restart Homebridge
- If on raspberry pi, give it a minute or two to settle (if you watch top via a separate ssh session you’ll see CPU spikes hard on a homebridge restart for a while)
- Open Home.app - if still have old devices listed, swipe on the bridge to remove. You should get an OSS Auth error, then everything goes. Now add accessory, pickup the new bridge and pair.
- Wait 5 minutes, or, sign out of iCloud and sign back in on your device, then re-run Home.app
- Now head to Eve. Eve SHOULD by now have synced itself up with HomeKit and reflect the same as Home. It can take a few minutes for Eve to reset itself as it appears to cache stuff for a bit before properly refreshing, just sit there and watch it without touching. At some point inside of a few minutes, everything in Eve will vanish and re-appear with the new setup.

Homekit is very quirky about things changing and registering them properly, especially with multiple iOS devices on the same appleid, or with other family members devices if they have eve and home installed, rather than just relying on HomeKit via settings - here you’ve got a family’s worth of devices all having to resync for instance...

S’a pain - the plugin-2 architecture that KhaosT is working on should resolve all these issues by giving us a way to configure homebridge (add / remove / refresh accessories) via an app.
Last edited by Marci on Wednesday 10 February 2016 22:09, edited 1 time in total.
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!
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: eDomoticz Homebridge-Plugin

Post by Marci »

John - nope, sorry! Those are constants defined within the homekit spec in HAP-NodeJS. No influence over them can be had without breaking the spec as far as I know. I think it’s the iOS app that then defines what they get translated to.

EG: With my test sensor (using apple home kit simulator, and the virtual one in domoticz) Home.app displays as Contact or No Contact. Eve displays as Yes or No.
Last edited by Marci on Thursday 11 February 2016 18:27, edited 1 time in total.
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!
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:

eDomoticz Homebridge-Plugin

Post by Marci »

Image

It it gets a funky icon for it's type in Eve, it's operating as a spec-compliant HomeKit device... No control over format of it's output. Any deviation will cause the accessory to be rejected as non-compliant, and Siri will refuse to ℅-operate with it. Siri will only converse with spec-compliant stuff - so she'll answer if you ask for current temperature, but not if you ask for power usage.

Image

Whereas if it gets the Eve-default logo for it's type, it's a custom sensor I can do whatever I want with it, but Siri will never converse or report on it's status when asked.
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!
User avatar
deejc
Posts: 168
Joined: Tuesday 22 September 2015 18:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5641
Location: UK
Contact:

Re: eDomoticz Homebridge-Plugin

Post by deejc »

ok im a bit further forward after that, its now back but my devices are still showing with brightness..?
im not sure my npm is actually updating the plugin.
is there a way to check locally that npm has updated the plugin to the latest version ?


uninstalled and reinstalled the plugin and we are back!
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
Jem101
Posts: 66
Joined: Saturday 02 May 2015 21:26
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Bexleyheath, SE London, UK
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Jem101 »

Marci wrote:John - nope, sorry! Those are constants defined within the home kit spec in HAP-NodeJS. No influence over them can be had without breaking the spec as far as I know. I think it’s the app that then defines what they get translated to.

EG: With my test sensor (using apple home kit simulator, and the virtual one in domoticz) Home.app displays as Contact or No Contact. Eve displays as Yes or No.

Fair enough, not point trying to force something when it's only going to break something else further down the chain. I also have the home.app installed but I never noticed that it reports as Contact or No Contact which I suppose does make sense.

John
I firmly believe in having an open mind - although not so open that your brain falls out!

- sometimes attributed to Carl Sagan, but the original quote is much older than that
Jem101
Posts: 66
Joined: Saturday 02 May 2015 21:26
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Bexleyheath, SE London, UK
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Jem101 »

deejc wrote:ok im a bit further forward after that, its now back but my devices are still showing with brightness..?
im not sure my npm is actually updating the plugin.
is there a way to check locally that npm has updated the plugin to the latest version ?


uninstalled and reinstalled the plugin and we are back!

Did you try turning it off and on again? :D
I firmly believe in having an open mind - although not so open that your brain falls out!

- sometimes attributed to Carl Sagan, but the original quote is much older than that
User avatar
deejc
Posts: 168
Joined: Tuesday 22 September 2015 18:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5641
Location: UK
Contact:

Re: eDomoticz Homebridge-Plugin

Post by deejc »

Jem101 wrote: Did you try turning it off and on again? :D
pretty much.. and it worked … !! hooray for IT!
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
User avatar
deejc
Posts: 168
Joined: Tuesday 22 September 2015 18:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5641
Location: UK
Contact:

Re: eDomoticz Homebridge-Plugin

Post by deejc »

All switches are correct, all lights are correct, smoke alarm shows "smoke detected" so thats great… thanks very much.
another successful update
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
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: eDomoticz Homebridge-Plugin

Post by Marci »

@deejc manually: check the file package.json to see if it's the latest release (verify against the release number on npmjs.com) and the top few lines of index.js usually show same number and changelog)

Or...

Code: Select all

sudo npm ls -g
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!
Sneezydevil
Posts: 111
Joined: Monday 18 January 2016 9:56
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Sneezydevil »

Marci wrote:Possibly... I've knocked up a quick php Domoticz json api emulator so I can simulate all the types quickly n' easily, as well as paste in user's json so I can replicate their devices perfectly for testing - will experiment. Next push will be to fix dimmers & switches (ie: the no fan issue in Eve), then spend some time working thru the various Domoticz switch & sensor types etc more logically, starting with contact sensors!
Would you be willing to share the php json emulator? I was thinking about making one myself, but why reinvent the wheel.

On a other note, I probably have some SwitchTypeVal's not on your list yet would you be interested in them, or are they of no use to you?

I have no apple devices but like the work you are doing :D.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests