homebridge-edomoticz Plugin

Moderator: leecollings

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 »

3G here and a naff upstream on the home broadband... ATV3. Am guessing it's all just too slow to respond 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!
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 »

Now properly added to node package registry...

Code: Select all

cd /usr/local/lib/node_modules
sudo npm uninstall -g homebridge-eDomoticz && sudo npm install -g homebridge-edomoticz
You can then grab updates with

Code: Select all

sudo npm update -g homebridge-edomoticz
Then, of course, restart homebridge. No changes to sensors etc so no need to erase persist or reset your homekit config.
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!
Puck
Posts: 4
Joined: Wednesday 03 February 2016 11:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Puck »

Homebridge is running fine next to the latest Domoticz Beta, however any Homekit app on my iPhone doesn't recognise 2 lights I have as dimmable, but just as an on/off switch. Domoticz does see them as dimmable. The hardware is Kaku ACD2-200R's. Any idea how to fix this?
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 »

Dimming is on my to-do list... https://github.com/PatchworkBoy/homebri ... /README.md

EDIT: Dimming is now done... follow the instructions to update in the original post which will nudge you up to v0.1.4, and your dimmers should be working. You may need to delete the homebridge device from your home then re-pair to it to pick up the changed sensors.

NB: The relationship between HomeKit’s percentage slider and the Domoticz slider is well documented as being fuzzy... I’ve attempted to get things as useful as possible whilst allowing full range. HomeKit CAN set 100% in Domoticz. I only have a virtual sensor to test this with, so let me know if any major issues.
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!
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:3G here and a naff upstream on the home broadband... ATV3. Am guessing it's all just too slow to respond then!
I've never gotten any Homekit apps to work remotely even over 4G with a very fast internet upstream, and like you i have an ATV3.While reseaching, I've found lots of comments claiming that it just doesn't work well with a 3 but is much better with the ATV4 so go figure!

one last thing, I have an Owl 113 power consumption meter which shows up in Domoticz as a device of type 'current' and does show instantaneous values for watts (not kwh). In Homebridge though, using your plugin, it appears as a simple On/Off switch. Is this something which is easily fixable?

Many thanks for all your work so far

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
makuta77
Posts: 11
Joined: Monday 12 October 2015 10:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2563
Contact:

Re: eDomoticz Homebridge-Plugin

Post by makuta77 »

Hello,
It's great job!!! Works like a charm!
I have one question: it is possible to get the charts in Eve app like screenshot on the web page?
https://itunes.apple.com/app/elgato-eve/id917695792
screen322x572.jpeg
screen322x572.jpeg (36.18 KiB) Viewed 5602 times
screen322x572 (1).jpeg
screen322x572 (1).jpeg (34.86 KiB) Viewed 5602 times
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 »

Jem101 wrote:While reseaching, I've found lots of comments claiming that it just doesn't work well with a 3 but is much better with the ATV4 so go figure!
Morning John... The atv4 stays more 'awake' than the 3 at a guess, with a persistent connection so that it can provide Siri to the remote. I have had it working well with the old official platform shim, probably because that doesn't have to sit and wait for a pile of sensor status requests to be fulfilled... it just blindly sends commands. It's the status checks that make it all a bit sketchy at the moment. Trade off one set of capabilities for another.

It's something I need to investigate more thoroughly.

It throws up some questions of the HomeKit spec: I have 3x atv3's... which one performs the task? How is it chosen? Or do I suddenly have 3x devices all waking then hitting Domoticz for the same info depending which wakes first, then 3x trying to ship that to iCloud, resolving the time differences to get the most 'right' response to give to the HomeKit client, hence long delays before the app gets the response? Can it be improved by telling one of my ATV3's not to go into standby? Does Bluetooth need to be on for it to function (not that it has to DO anything, but Bluetooth has to be enabled on your iPhone for scenes to work for instance for no apparent reason, so one can never be sure)? At work I have 130 atv's on the network with at least 3x signed in as me... I dread to think! How does HomeKit know which ATV is on the same network as homebridge?
one last thing, I have an Owl 113 power consumption meter which shows up in Domoticz as a device of type 'current' and does show instantaneous values for watts (not kwh).
Device type: current = not one watched for by the plugin... Follow guidance in OP to get it's json and throw up as a new issue on GitHub and I'll get it sorted.
Last edited by Marci on Sunday 07 February 2016 10:43, edited 3 times 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 »

makuta77 wrote:Hello,
It's great job!!! Works like a charm!
I have one question: it is possible to get the charts in Eve app
Thanks! And hopefully, in a future patch. I know _how_ it's done.

Homebridge needs the v.latest version of the hap-nodejs submodule: do-able, pull the plugin-2 homebridge repo, but better to wait for it to be merged into stable/master as unstable at the moment. That provides the ‘log’ characteristic. Then either Elgato will handle that characteristic if it detects it, or it’ll need linking in via elgato-specific charateristics

The crux of the issue is that I need to be able to retrieve the log points from Domoticz and I don't think they're officially exposed via the json api. I need to look at the Ajax requests for the sensor log views in Domoticz and see if I can fudge it somehow.

Edit: Found them...

Code: Select all

http://127.0.0.1:8080/json.htm?
		type=lightlog
		&idx={_ID_}

http://127.0.0.1:8080/json.htm?
		type=graph
		&sensor={counter|Percentage|temp|rain|fan|wind|uv}
		&idx={_ID_}
		&method={int}
		&range={day|week|month|year}
			{
			&actmonth={month}
			&actyear={year}
			}
It's definitely something I'd like to support if I can work out how, and will be a milestone to aim for. Watch this space!
Last edited by Marci on Sunday 07 February 2016 15:40, edited 3 times 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!
Puck
Posts: 4
Joined: Wednesday 03 February 2016 11:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Puck »

Updated and removed old devices, but switches are still not recognized as dimmable... It seems that Domoticz doesn't set the HaveDimmer to true, although the SwitchType = Dimmer. Is this a bug? Any workaround?

Edit: a similar bugfix here? https://github.com/nfarina/homebridge/pull/130/files
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 »

Can you get me the json output? It's just a case of working out a combination of it's properties to identify it that won't conflict with other methods... then translating that over to homebridge. HaveDimmer is what I'm using from Domoticz to add the characteristic - that issue's kinda the other way.
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 »

since uninstalling the old and installing the new i get an error.. i thought it was the config.json had eDomoticz and not edomoticz so i changed it but its still the same, any ideas ?

Code: Select all

ERROR LOADING PLUGIN homebridge-edomoticz:
SyntaxError: Unexpected identifier
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Plugin.load (/usr/local/lib/node_modules/homebridge/lib/plugin.js:65:22)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:70:14)
    at Array.forEach (native)
====================

Code: Select all

Error: The requested platform 'edomoticz' was not registered by any plugin.
    at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:88:13)
    at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:194:45)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:35:36)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:23:16)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)

[/s]

Ran npm update and its now back!!
Last edited by deejc on Sunday 07 February 2016 15:29, edited 2 times in total.
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
Puck
Posts: 4
Joined: Wednesday 03 February 2016 11:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Puck »

My current JSON output for one of the dimmers. I don't know if I can manually adjust the dimmers to set HaveDimmer to true in Domoticz?

Code: Select all

      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "Off",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 1,
         "HardwareName" : "RFLink Gateway",
         "HardwareType" : "RFLink Gateway USB",
         "HardwareTypeVal" : 46,
         "HaveDimmer" : false,
         "HaveGroupCmd" : false,
         "HaveTimeout" : false,
         "ID" : "012DD986",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-02-07 12:44:19",
         "Level" : 40,
         "LevelInt" : 40,
         "MaxDimLevel" : 100,
         "Name" : "Main",
         "Notifications" : "false",
         "PlanID" : "2",
         "PlanIDs" : [ 2 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "Off",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "false",
         "Type" : "Light/Switch",
         "TypeImg" : "dimmer",
         "Unit" : 1,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "32"
      },
      
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 »

Don’t worry about it - once I can ID the accessory via some unique chars or other, the plugin will set it to true. Leave it with me!
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 »

Righty then @Puck - should be fixed in latest commit... give it a try and let me know - be sure to check the full range of the brightness slider and that Domoticz responds as expected, & vice versa!

Code: Select all

sudo npm update -g homebridge-edomoticz && forever restart /usr/local/lib/node_modules/homebridge/bin/homebridge
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 »

one last thing, I have an Owl 113 power consumption meter which shows up in Domoticz as a device of type 'current' and does show instantaneous values for watts (not kWh).
@Jem - should be fixed in 0.1.6 commit... update as per above and let me know.
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!
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 »

Working perfectly,

Many thanks

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
Puck
Posts: 4
Joined: Wednesday 03 February 2016 11:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Puck »

Marci wrote:Righty then @Puck - should be fixed in latest commit... give it a try and let me know - be sure to check the full range of the brightness slider and that Domoticz responds as expected, & vice versa!

Code: Select all

sudo npm update -g homebridge-edomoticz && forever restart /usr/local/lib/node_modules/homebridge/bin/homebridge
Works perfectly now. Thank you for the quick fixes!
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 / @Jem101 - update again - I’ve just added the Contact Sensors you requested.
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 »

Dude seriously you rock, the response that you give is superb. This plugin is the fastest evolving plugin in homebridge and is rock solid.
Thanks


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:

Re: eDomoticz Homebridge-Plugin

Post by Marci »

*blush* fanx!
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!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest