homebridge-edomoticz Plugin

Moderator: leecollings

hanspnyholm
Posts: 4
Joined: Thursday 17 September 2015 22:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by hanspnyholm »

It says /usr/bin/homebridge


Skickat från min iPhone med Tapatalk
User avatar
TheRamon
Posts: 126
Joined: Tuesday 12 July 2016 11:32
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: NL/DE
Contact:

Re: eDomoticz Homebridge-Plugin

Post by TheRamon »

Righto:

Code: Select all

systemctl status homebridge
Same commands, status, start, stop, restart.
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 »

TheRamon wrote:Yeah it is.. Still not getting anything suspicious.

I have changed the setValue function, now uses "eDomoticz-MQTT" as the context. Superb!
Also merged the changes on the master branch (minValue: 4) in mqtt-integration.
*thumbsup*
About accessory.handleMQTTMessage:
Domoticz sends one MQTT message per device action right? How would you know if there are two or more values to update and only callback once?
Sends one per device, but that one message can contain multiple values - so for instance an electric meter will have Current Consumption (message.svalue1), Today Consumption (message.svalue2), Total Consumption (message.svalue3)... it'll always send ALL available values like this, even if only one of the values has actually changed, and the svalueX > characteristic mapping is consistent (does that make sense, or am I explaining it badly?)
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!
sandurz
Posts: 14
Joined: Thursday 28 July 2016 16:52
Target OS: Windows
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by sandurz »

Great work on the MQTT TheRamon and Marci! Very impressed.

Having a weird issue with dimmers since switching to the MQTT branch. Upgraded to the latest push just now to see if it was fixed but it's still going on. If I set the dimmers in Domoticz, I get the reading updated perfectly. But if I try to set a Dim Level ie anything other a basic On/Off command, the light turns off.

Any ideas? Any good ways to debug this sort of thing?
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 »

Nothing you can do to debug. The error will be in code at our end that will need examining. Leave it with us.
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
TheRamon
Posts: 126
Joined: Tuesday 12 July 2016 11:32
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: NL/DE
Contact:

Re: eDomoticz Homebridge-Plugin

Post by TheRamon »

Marci wrote:Sends one per device, but that one message can contain multiple values - so for instance an electric meter will have Current Consumption (message.svalue1), Today Consumption (message.svalue2), Total Consumption (message.svalue3)... it'll always send ALL available values like this, even if only one of the values has actually changed, and the svalueX > characteristic mapping is consistent (does that make sense, or am I explaining it badly?)
Yep I think I understand, but shouldn't that be handled in the switch statement? Take the blinds for example.

Code: Select all

case this.swTypeVal == Constants.DeviceTypeBlinds: {
  [..code..]
  var currentPositionCharacteristic = this.getService(Service.WindowCovering).getCharacteristic(Characteristic.CurrentPosition);
  var targetPositionCharacteristic = this.getService(Service.WindowCovering).getCharacteristic(Characteristic.TargetPosition);
  callback(currentPositionCharacteristic, position);
  callback(targetPositionCharacteristic, position);
  break;
}
They update two characteristics, namely the Current position and the Target position. We distillate the 'position' value from message.svalue1. If target position were to have another value in the MQTT message, wouldn't we just update the characteristic with that one? Say message.svalue2 in TargetPosition only. I might have completely missed your point though. :D

sandurz wrote:But if I try to set a Dim Level ie anything other a basic On/Off command, the light turns off.
Any ideas? Any good ways to debug this sort of thing?
Looking into this now!
User avatar
TheRamon
Posts: 126
Joined: Tuesday 12 July 2016 11:32
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: NL/DE
Contact:

Re: eDomoticz Homebridge-Plugin

Post by TheRamon »

@sandurz: Fixed in the latest commit!
sandurz
Posts: 14
Joined: Thursday 28 July 2016 16:52
Target OS: Windows
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by sandurz »

Perfect. Works great. Thanks!
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 »

Righty - if those testing the MQTT-Integration branch want to update to the latest commit, there’ve been some rather significant changes within the plugin backend (nothing you’d MAJORLY notice visually)... and we’re back at Release Candidate stage again! (ie: it’s finally stopped randomly deleting 50 devices from my home).

Whilst Ramon has been refactoring all my fugly code, making the MQTT handling more efficient (no longer having to detach all other events before firing our values then having to reattach all the events), and providing proper debugging via the native homebridge api, I’ve been typecasting all the variables and services.

Combined Temp / Humidity / Pressure meters now appear as an Eve Weather (but no, the graphs won’t work - don’t ask). All other value-based figures are now proper values, rather than text strings. The units are properly assigned to the characteristic, rather than simply glued to the end of the value. This means you should be able to use a wider variety of sensor readings with triggers & events via the homekit api. This typecasting also corrected an issue where large numbers of sensors would be removed when a single sensor received an invalid value (you wouldn’t have noticed this unless you had an active sensor of a particular type).

To move from the current non-MQTT release to the MQTT release candidate you need to already have an MQTT broker up and running (preinstalled on RPi SD Card images - otherwise follow the link & get the hint), and Domoticz’ MQTT LAN Client added in Settings > Hardware, with it’s dropdown set to ‘out’.

Now head to your homebridge-edomoticz folder and do as follows (skip if you’re already running the MQTT branch):

Code: Select all

cd /usr/local/lib/node_modules/homebridge-edomoticz/
sudo mkdir .git
sudo pico .git/config
Paste in the following:

Code: Select all

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        url = https://github.com/PatchworkBoy/homebridge-edomoticz.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "mqtt-integration"]
        remote = origin
        merge = refs/heads/mqtt-integration
Ctrl-o to save, Ctrl-x to quit

Refer to the readme at https://github.com/PatchworkBoy/homebri ... ntegration for the extra bits you need to add to ~/.homebridge/config.json


<<Existing MQTT Branch users can join back in here!>>

Code: Select all

sudo rm -rf ~/.homebridge/accessories/*
sudo rm -rf ~/.homebridge/persist/*
cd /usr/local/lib/node_modules/homebridge-edomoticz/
sudo git pull origin
sudo npm install


Now restart homebridge, and re-pair your device, and set your rooms back up etc and test it all out!

Any issues, let us know on here...
Last edited by Marci on Monday 22 August 2016 19:03, 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 »

Finally got iOS10 beta on something. Can confirm, native Home app is pants... definitely only supports HomeKit native services, no custom services, and it won't function remotely as it enforces AppleTV4/iPad only for hub use (whereas I have a house full of ATV3's). That said, all official services enabled via homeBridge-eDomoticz function as expected. Everything else will simply state "unsupported" and show no data.

Doesn't add anything that can't already be done in existing more fully-featured apps, so all in all, I'll be sticking with Eve as my HomeKit app of choice.
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!
NewFolk
Posts: 39
Joined: Wednesday 02 September 2015 11:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by NewFolk »

nd it won't function remotely as it enforces AppleTV4/iPad only for hub use (whereas I have a house full of ATV3's).
Did you test this?
I have aTV3 and remote access works good.

Open app, tap on location icon in the left corner and you should see "Home hubs"
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 »

All listed but state disabled, can't be enabled.
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
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: eDomoticz Homebridge-Plugin

Post by G3rard »

According to https://support.apple.com/en-us/HT204893 an Apple TV3 should be working.
If you have an Apple TV (3rd generation or later), you can control your accessories with Siri commands when you're away from home. Just sign in to iCloud with the same Apple ID on your iOS device and Apple TV.
If your remote access isn't working, sign out of iCloud on your Apple TV, then sign back in. To sign in, go to Settings > Accounts > iCloud.

If you can't use HomeKit remotely with your Apple TV
Check your Internet and Wi-Fi connections on your iOS device and Apple TV.
Update the software on your iOS device and Apple TV.
Make sure that your Apple TV is on the same Wi-Fi network as your HomeKit accessories and within about 25 feet of your Bluetooth HomeKit accessories.
Go to Settings > HomeKit and make sure that your iOS device has Use iCloud turned on.
Make sure that your iOS device and Apple TV are on the same network and not in Airplane Mode.
Sign out of iCloud on your Apple TV and sign back in after about two minutes. Make sure that your iOS device and Apple TV are signed in to iCloud using the same Apple ID and password.
Make sure that any HomeKit accessories you've added using your iOS device can be controlled on your Wi-Fi network or using Bluetooth. If the accessories aren't within reach, you might need to restart them. Check the batteries in your accessories and replace them if needed.
Restart your iOS device and Apple TV.
Go to Settings > Airplane Mode and turn Airplane Mode on and off. Then try to control your HomeKit accessories locally.

If you have two-step verification on and can't use HomeKit remotely with your Apple TV (3rd generation)
Sign out of iCloud on your Apple TV.
Go to My Apple ID and turn off two-step verification.
Sign in to iCloud on your Apple TV.
Turn on two-step verification again.
Not using Domoticz anymore
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 »

Yup, I know. All was working fine til I signed all iOS9 devices out of iCloud. With only iOS10 devices signed in, it fails.
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!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: eDomoticz Homebridge-Plugin

Post by simon_rb »

Good thing about the native app is the quick access when swiping up and the Apple Watch. I have the other home app but the native app works best on the watch.
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: eDomoticz Homebridge-Plugin

Post by simon_rb »

Will try the MQTT tomorrow.. fingers crossed
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 »

Door lock support (SwitchTypeVal 11) also now added to the mqtt-integration version, but it’s untested, pending feedback...

Am freezing addition of new features to the Master branch as I get the feeling we’ll be making MQTT-integration the default Release version sooner rather than later.
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!
simon_rb
Posts: 612
Joined: Wednesday 07 August 2013 19:09
Target OS: -
Domoticz version:
Location: UK
Contact:

Re: eDomoticz Homebridge-Plugin

Post by simon_rb »

Out of curiosity anyone here actually using door locks? If so what door locks? That's my next project but doing research the tech and integration seems to me it needs to mature a bit.. or am I wrong?


Sent from my iPhone using Tapatalk
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: homebridge-edomoticz Plugin

Post by Marci »

This chap is: https://github.com/PatchworkBoy/homebri ... /issues/36

But looks like he’s using a custom script to trigger whatever it is rather than a specific Domoticz-supported door lock (as it’s linked to Dummy hardware type).
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 »

simon_rb wrote:Out of curiosity anyone here actually using door locks? If so what door locks? That's my next project but doing research the tech and integration seems to me it needs to mature a bit.. or am I wrong?


Sent from my iPhone using Tapatalk
check this out, make sure you pick a good one, most are pretty much made of butter it seems :-)
http://www.theregister.co.uk/2016/08/08 ... _an_idiot/
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest