homebridge-edomoticz Plugin
Moderator: leecollings
-
- Posts: 9
- Joined: Tuesday 28 June 2016 17:22
- Target OS: Windows
- Domoticz version:
- Location: Huddersfield, UK
- Contact:
Re: homebridge-edomoticz Plugin
Sorry to ask what is probably a 'schoolboy' question, but can you launch homebridge from a windows CMD shell successfully? running windows 10, I use 'node homebridge' in the appropriate directory and it loads all of my Domoticz accessories but doesn't respond at all beyond that. If I run it in the GIT-CMD shell (as an administrator) it runs fine.
I'm trying to simply run it from a batch file from startup along with Domoticz so that when homebridge freezes (which it seems to quite often since I've updated to iOS10) Myself (or my wife) can simply re-boot the mini-pc.
Thanks in advance!
I'm trying to simply run it from a batch file from startup along with Domoticz so that when homebridge freezes (which it seems to quite often since I've updated to iOS10) Myself (or my wife) can simply re-boot the mini-pc.
Thanks in advance!
- 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
No idea I'm afraid... I run all mine exclusively on raspberry Pi. Slack or the GitHub issues page would be best place to look: https://github.com/nfarina/homebridge/b ... /README.md
Presume you've done...
When you run from batch, does the ccd window status reflect it's ended after displaying pin code? i.e.: batch has done it's job, when homebridge loads, it then ends rather than being run as a daemon in background via foreverjs or similar?
Presume you've done...
...from https://github.com/nfarina/homebridge/w ... on-Windows, ensuring you've done a general tcp port rule, rather than just allowing it to git-cmd?8.1 - If iOS apps cannot pair to HomeBridge, you may need to add a firewall rules to allow port 51826 (Control Panel > System Security > Windows Firewall > Advanced Settings > Create New Rule to allow TCP 51826)
When you run from batch, does the ccd window status reflect it's ended after displaying pin code? i.e.: batch has done it's job, when homebridge loads, it then ends rather than being run as a daemon in background via foreverjs or similar?
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!
-
- Posts: 26
- Joined: Thursday 04 February 2016 13:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.530
- Location: Emmen, Drenthe
- Contact:
Re: homebridge-edomoticz Plugin
Thanks for your advice Marci.Marci wrote:Which branch of the plugin are you using? There were some authentication fixes put in place in the mqtt-integration branch over on github... update to this first...
https://github.com/PatchworkBoy/homebri ... ntegration
Download and copy the contents over the top of the contents of your current homebridge-edomoticz folder... and update your config.json as per further down that page... leave mqttenable set to 0 to run the mqtt branch without mqtt.
I decided to start all over with a new sd card with latest Jessie version, and used the instructions from https://github.com/PatchworkBoy/homebri ... stallGuide
After setting everything up, I loaded my Domoticz configuration from a backup. Then I checked if I could add HomeBridge to my HomeKit network, but it still doesn't find HomeBridge...
Is it possible that this problem was caused by running iOS 10.1 beta?
Code: Select all
# sudo systemctl status homebridge.service -l
* homebridge.service - HomeBridge Service
Loaded: loaded (/lib/systemd/system/homebridge.service; enabled)
Active: active (running) since ma 2016-10-17 23:07:54 CEST; 3min 5s ago
Main PID: 748 (homebridge)
CGroup: /system.slice/homebridge.service
`-748 homebridge
okt 17 23:08:00 domoticz homebridge[748]: [2016-10-17 23:08:00] [eDomoticz] Initializing eDomoticz platform...
okt 17 23:08:01 domoticz homebridge[748]: [2016-10-17 23:08:00] [eDomoticz] Fetching Domoticz lights and switches...
okt 17 23:08:01 domoticz homebridge[748]: [2016-10-17 23:08:01] Loading 0 accessories...
okt 17 23:08:01 domoticz homebridge[748]: Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
okt 17 23:08:01 domoticz homebridge[748]:
okt 17 23:08:01 domoticz homebridge[748]: ┌────────────┐
okt 17 23:08:01 domoticz homebridge[748]: │ 031-45-154 │
okt 17 23:08:01 domoticz homebridge[748]: └────────────┘
okt 17 23:08:01 domoticz homebridge[748]:
okt 17 23:08:01 domoticz homebridge[748]: [2016-10-17 23:08:01] Homebridge is running on port 51826.
- 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
Doubt it...
In home app, head to location icon top left, home settings, select your home, scroll to bottom, remove home.
Stop homeBridge. Edit config.json, change the MAC address username slightly.
Delete contents of .homebridge/persist/ and .homebridge/accessories/
Start homeBridge.
Fire up Home app, ensure you give your new home a different name to last time.
See if it finds it then.......
In home app, head to location icon top left, home settings, select your home, scroll to bottom, remove home.
Stop homeBridge. Edit config.json, change the MAC address username slightly.
Delete contents of .homebridge/persist/ and .homebridge/accessories/
Start homeBridge.
Fire up Home app, ensure you give your new home a different name to last time.
See if it finds it then.......
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!
- 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
Mazzokun wrote:I format and reinstall everything from the beginning.. I got thisCode: Select all
pi@raspberrypi:~ $ systemctl -l status homebridge ... so in debug it works.. either no.. What? Why? :( :| :([/quote] Ok. Step by step then... is homeBridge where the homeBridge.service file thinks it is? Does it exist in /usr/bin?
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!
- 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
Yup... cool... and we should now look to move to MQTT::{"command": "getdeviceinfo", "idx": xxx } in preference to http (but functionality would still need to be there for http regardless).TheRamon wrote:@Marci:
Yeah, I ment caching locally in eDomoticzAccessory. Something like isOn = false, and update that value through the status JSON of Domoticz. Whenever iOS asks te status of that device, we return the isOn value of eDomoticzAccessory. That'd be instant. We now make a HTTP request to Domoticz first to ask what the status is, and return that one.
EDIT: in fact, let's make MQTT gets the priority first, as that should be REALLY straightforward to implement and deploy... which resolves the entire issue for those using MQTT (tests via node-red are instantaneous response)... the cacheing then comes into play for the legacy http requests, which could potentially go into a file-based store. Plugin then queries this on homeBridge load, and triggers a full http update in background, just to speed up initial homeBridge load time... ???
Last edited by Marci on Tuesday 18 October 2016 0:07, 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!
-
- Posts: 89
- Joined: Thursday 28 April 2016 23:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Milan, Italy
- Contact:
Re: homebridge-edomoticz Plugin
Marci wrote:Mazzokun wrote:I format and reinstall everything from the beginning.. I got thisCode: Select all
pi@raspberrypi:~ $ systemctl -l status homebridge ... so in debug it works.. either no.. What? Why? :( :| :([/quote] Ok. Step by step then... is homeBridge where the homeBridge.service file thinks it is? Does it exist in /usr/bin?[/quote] Thank you [b]very very very[/b] much! It was in usr/[b]local[/b]/bin :oops:
- 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
*thumbs up*
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!
- TheRamon
- Posts: 126
- Joined: Tuesday 12 July 2016 11:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: NL/DE
- Contact:
Re: homebridge-edomoticz Plugin
Sounds splendid!!Marci wrote: Yup... cool... and we should now look to move to MQTT::{"command": "getdeviceinfo", "idx": xxx } in preference to http (but functionality would still need to be there for http regardless).
EDIT: in fact, let's make MQTT gets the priority first, as that should be REALLY straightforward to implement and deploy... which resolves the entire issue for those using MQTT (tests via node-red are instantaneous response)... the cacheing then comes into play for the legacy http requests, which could potentially go into a file-based store. Plugin then queries this on homeBridge load, and triggers a full http update in background, just to speed up initial homeBridge load time... ???
I'll try and setup something. Config var > use HTTP or MQTT. Full with ideas now.
-
- Posts: 26
- Joined: Thursday 04 February 2016 13:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.530
- Location: Emmen, Drenthe
- Contact:
Re: homebridge-edomoticz Plugin
Have done this, and it worked after rebooting my Raspberry Pi !Marci wrote:In home app, head to location icon top left, home settings, select your home, scroll to bottom, remove home.
Stop homeBridge. Edit config.json, change the MAC address username slightly.
Delete contents of .homebridge/persist/ and .homebridge/accessories/
Thanks!
Last edited by martijnm on Tuesday 18 October 2016 16:17, edited 3 times in total.
-
- Posts: 8
- Joined: Friday 06 May 2016 10:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
Hi!
Would it be possible to add Domoticz built-in Security Panel to Homebridge. Currently I have my Paradox EVO192 linked to Security Panel and in Domoticz everyting is working fine. Is there any point in opening issue about this topic?
Regards,
Ergo
Would it be possible to add Domoticz built-in Security Panel to Homebridge. Currently I have my Paradox EVO192 linked to Security Panel and in Domoticz everyting is working fine. Is there any point in opening issue about this topic?
Regards,
Ergo
- 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
Depends... is the security panel accessible via the domoticz json or MQTT API? No mention of it here: https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's
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!
-
- Posts: 8
- Joined: Friday 06 May 2016 10:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
Jep - it's internal interface. Currently using MQTT and Tertiush/ParadoxIP150 script to talk to my security system.
{
"ActTime" : 1476811451,
"ServerTime" : "2016-10-18 20:24:11",
"Sunrise" : "08:09",
"Sunset" : "18:04",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Normal",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 1,
"HardwareName" : "Domoticz Internal",
"HardwareType" : "Domoticz Internal interface",
"HardwareTypeVal" : 67,
"HaveDimmer" : false,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "148702",
"LastUpdate" : "2016-10-18 15:36:07",
"MaxDimLevel" : 0,
"Name" : "Security Panel",
"Notifications" : "false",
"PlanID" : "5",
"PlanIDs" : [ 5 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Normal",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Security Panel",
"SwitchType" : "Security",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "Security",
"TypeImg" : "security",
"Unit" : 0,
"Used" : 1,
"XOffset" : "430",
"YOffset" : "192",
"idx" : "43"
}
],
"status" : "OK",
"title" : "Devices"
}
e.
{
"ActTime" : 1476811451,
"ServerTime" : "2016-10-18 20:24:11",
"Sunrise" : "08:09",
"Sunset" : "18:04",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Normal",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 1,
"HardwareName" : "Domoticz Internal",
"HardwareType" : "Domoticz Internal interface",
"HardwareTypeVal" : 67,
"HaveDimmer" : false,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "148702",
"LastUpdate" : "2016-10-18 15:36:07",
"MaxDimLevel" : 0,
"Name" : "Security Panel",
"Notifications" : "false",
"PlanID" : "5",
"PlanIDs" : [ 5 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Normal",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Security Panel",
"SwitchType" : "Security",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "Security",
"TypeImg" : "security",
"Unit" : 0,
"Used" : 1,
"XOffset" : "430",
"YOffset" : "192",
"idx" : "43"
}
],
"status" : "OK",
"title" : "Devices"
}
e.
-
- Posts: 8
- Joined: Friday 06 May 2016 10:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
... and nvalues.
Disarm 0
Normal Delay 1
Alarm 2
Alarm Delayed 3
Motion 4
No Motion 5
Panic 6
Panic End 7
8
Arm Away 9
Arm Away Delayed 10
Arm Home 11
Arm Home Delayed 12
Disarm 13
Disarm 0
Normal Delay 1
Alarm 2
Alarm Delayed 3
Motion 4
No Motion 5
Panic 6
Panic End 7
8
Arm Away 9
Arm Away Delayed 10
Arm Home 11
Arm Home Delayed 12
Disarm 13
- 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
Cool - throw all that into a GitHub issue n' I'll take a look when I get chance...
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!
-
- Posts: 8
- Joined: Friday 06 May 2016 10:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
Ok, thanks, will do that.
e.
e.
- TheRamon
- Posts: 126
- Joined: Tuesday 12 July 2016 11:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: NL/DE
- Contact:
Re: homebridge-edomoticz Plugin
Alrighty, have just refactored and moved about EVERYTHING.
Requests are handled differently now. I have moved the baserequest, called in every function, to domoticz.js.
Domoticz.js is basically a class with a few convenient functions:
Only thing left to do now is to integrate caching for eDomoticzAccessory, so that values are returned immediately whenever HomeKit asks for it.
We should probably also look at MQTT device polling in Domoticz.deviceStatus. Caveat here though is that MQTT returns minimal data.
E.g. Requesting the status of my Dimmer through MQTT:
Requests are handled differently now. I have moved the baserequest, called in every function, to domoticz.js.
Domoticz.js is basically a class with a few convenient functions:
- Domoticz.deviceStatus - A GET request to Domoticz asking the status. Formerly baserequest.get to this.status_url.
- Domoticz.updateDeviceStatus - A PUT/POST request to Domoticz saving the new status. Formerly baserequest.put to url separately defined in each function.
- Domoticz.updateWithURL - Same as Domoticz.updateDeviceStatus.
Only thing left to do now is to integrate caching for eDomoticzAccessory, so that values are returned immediately whenever HomeKit asks for it.
We should probably also look at MQTT device polling in Domoticz.deviceStatus. Caveat here though is that MQTT returns minimal data.
E.g. Requesting the status of my Dimmer through MQTT:
- Spoiler: show
- Spoiler: show
- TheRamon
- Posts: 126
- Joined: Tuesday 12 July 2016 11:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: NL/DE
- Contact:
Re: homebridge-edomoticz Plugin
I have just implemented caching for switches with 'Characteristic.On'. (Get/set power state)
This means "normal switches" are cached now, and whenever opening up the HomeKit app (or Eve) they'll instantly be available.
See mqtt-integration.
This means "normal switches" are cached now, and whenever opening up the HomeKit app (or Eve) they'll instantly be available.
See mqtt-integration.
- 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
Note on upgrading to the above...
Stop homebridge, perform a...
...in the homebridge-edomoticz folder, restart homebridge.
Now in Home or Eve, head to accessories and remove the bridge from your home, then re-add it again. You’ll then have to reconfigure your rooms etc.
@Ramon - stellar job d00d... words escape me! *applause* Instantaneous response times across the board for sets, gets, siri commands. Absolutely awesome.
Stop homebridge, perform a...
Code: Select all
sudo git pull origin
...in the homebridge-edomoticz folder, restart homebridge.
Now in Home or Eve, head to accessories and remove the bridge from your home, then re-add it again. You’ll then have to reconfigure your rooms etc.
@Ramon - stellar job d00d... words escape me! *applause* Instantaneous response times across the board for sets, gets, siri commands. Absolutely awesome.
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!
-
- Posts: 82
- Joined: Saturday 13 December 2014 21:20
- Target OS: Linux
- Domoticz version:
- Contact:
Re: homebridge-edomoticz Plugin
Marci wrote:Note on upgrading to the above...
Stop homebridge, perform a...
Code: Select all
sudo git pull origin
...in the homebridge-edomoticz folder, restart homebridge.
Now in Home or Eve, head to accessories and remove the bridge from your home, then re-add it again. You’ll then have to reconfigure your rooms etc.
@Ramon - stellar job d00d... words escape me! *applause* Instantaneous response times across the board for sets, gets, siri commands. Absolutely awesome.
I can't upgrade without removing and reconfiguring everything ?
This because it's a huge job to configure all my rooms again.
Verzonden vanaf mijn iPad met Tapatalk
Who is online
Users browsing this forum: No registered users and 1 guest