Page 6 of 86
Re: eDomoticz Homebridge-Plugin
Posted: Monday 08 February 2016 23:57
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.....
Re: eDomoticz Homebridge-Plugin
Posted: Tuesday 09 February 2016 0:40
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...!
Re: eDomoticz Homebridge-Plugin
Posted: Tuesday 09 February 2016 0:49
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.
eDomoticz Homebridge-Plugin
Posted: Tuesday 09 February 2016 18:47
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
eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 0:04
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!
Re: eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 20:31
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!
Re: eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 20:56
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
Re: eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 20:58
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
Re: eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 21:54
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
Re: eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 22:00
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
Re: eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 22:05
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.
Re: eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 22:07
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.
eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 22:15
by Marci
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.
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.
Re: eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 22:21
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!
Re: eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 22:38
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
Re: eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 22:39
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?
Re: eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 22:40
by deejc
Jem101 wrote:
Did you try turning it off and on again?
pretty much.. and it worked … !! hooray for IT!
Re: eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 22:46
by deejc
All switches are correct, all lights are correct, smoke alarm shows "smoke detected" so thats great… thanks very much.
another successful update
Re: eDomoticz Homebridge-Plugin
Posted: Wednesday 10 February 2016 22:54
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...
Re: eDomoticz Homebridge-Plugin
Posted: Thursday 11 February 2016 9:03
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
.