homebridge-edomoticz Plugin

Moderator: leecollings

RemcoSmit
Posts: 8
Joined: Saturday 09 July 2016 14:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by RemcoSmit »

Hi again,

I managed to get one step further by editing the config.json. I added one accessory and started Homebridge once more.
This time, I get a real error message:

Code: Select all

pi@raspberrypi:~$ homebridge
*** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs>
*** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister>
[7/19/2016, 3:41:42 PM] Loaded plugin: homebridge-edomoticz
[7/19/2016, 3:41:42 PM] Registering accessory 'homebridge-edomoticz.eDomoticz'
[7/19/2016, 3:41:42 PM] Registering platform 'homebridge-edomoticz.eDomoticz'
[7/19/2016, 3:41:42 PM] ---
[7/19/2016, 3:41:42 PM] Loaded config.json with 1 accessories and 1 platforms.
[7/19/2016, 3:41:42 PM] ---
[7/19/2016, 3:41:42 PM] Loading 1 platforms...
[7/19/2016, 3:41:42 PM] [Domoticz] Initializing eDomoticz platform...
[7/19/2016, 3:41:42 PM] [Domoticz] Fetching Domoticz lights and switches...
[7/19/2016, 3:41:42 PM] Loading 1 accessories...
/usr/lib/node_modules/homebridge/lib/api.js:46
  if (name.indexOf('.') == -1) {
          ^

TypeError: Cannot read property 'indexOf' of undefined
    at API.accessory (/usr/lib/node_modules/homebridge/lib/api.js:46:11)
    at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:233:42)
    at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:72:38)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
Help is really appreciated as I am a complete Linux newbie
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 those warnings are normal. Don't add accessories via config.json - point of plugin is to get automatically from Domoticz. Revert back to original config.json

Code: Select all

There was a problem connecting to Domoticz.
Like it says, it can't connect to Domoticz. Issue is with IP/Port/authentication etc in config.json

If it can't connect to Domoticz, it can't get any of your accessories. If homebridge has no accessories loaded, then Eve won't see any accessories.

What URL do you use via web browser to get to Domoticz?
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!
RemcoSmit
Posts: 8
Joined: Saturday 09 July 2016 14:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by RemcoSmit »

Thanks for getting back to me Marci.

I changed the config.json file to this:

Code: Select all

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },
    "description": "Configuration file for Domoticz platform.",
    "platforms": [
        {
            "platform": "eDomoticz",
            "name": "Domoticz",
            "server": "127.0.0.1",
            "port": "8080",
            "ssl": 0,
            "roomid": 0
        }
    ],
    "accessories": [
    ]
}
At home (so via local LAN) I use the url http://<hostname>:8080
Hostname can be resoled via internal DNS.

Both homebridge and Domoticz run on the same machine, so 127.0.0.1 should work according to my knowledge of IPv4. Port number seems correct to me too.
I do have security enabled on Domoticz, but not for the local subnet:
Lokale netwerken (geen gebruikersnaam/wachtwoord):
Netwerken: 172.16.147.*
(Gescheiden door een puntkomma, bijvoorbeeld: 127.0.0.*;192.168.0.*)
RemcoSmit
Posts: 8
Joined: Saturday 09 July 2016 14:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by RemcoSmit »

Another thing, this happened to me twice now (with a re-applied image in between):

When I install Homebridge (or one of the other steps in this post), my dusksensor starts behaving strangely.
Or better: Domoticz start missing the switching moments.
I still have my HomeWizard appliance online (for sale now ;) ), and that one still picks up the dusk and dawn switching moments at the right times.

Does someone have a clue what causes 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:

eDomoticz Homebridge-Plugin

Post by Marci »

No idea... could be network latency, could be CPU load, could be many things - you'd need to take that up on the homebridge GitHub issues page.

Don't use local loopback address. If the rasppi can resolve the host name, try that, otherwise, it's actual LAN IP.
Last edited by Marci on Thursday 21 July 2016 18:11, 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!
RemcoSmit
Posts: 8
Joined: Saturday 09 July 2016 14:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by RemcoSmit »

thanks, Marci.
It's working when I use the LAN address and not the loopback address. Strange, as this should work.
bxlouis
Posts: 45
Joined: Wednesday 16 December 2015 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Belgium
Contact:

Re: eDomoticz Homebridge-Plugin

Post by bxlouis »

Marci wrote:
I still have 2 questions, though :

- I set one of my blinds as "Inverted blind" in Domoticz, and I think it is not recognized as a blind by...
Inverted blinds have a different switchtypeval that hasn't been enabled yet.
- It seems the 2 other blinds I use (set as "blind" in Domoticz) work inverted. They close when I say "open my blinds" and open when I say "close my blinds". It is strange since it works well with Domoticz. I tried to change that behavior through Elgato Eve or Insteon+ apps but there is no setting that allows to do that.
These will need a manual override to invert them in the plugin. Leave them with me.
Hi Marci,

Will you provide an update about this issue ? At least the second one ?

Many thanks
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 »

bxlouis wrote:
Marci wrote:-
Hi Marci,

Will you provide an update about this issue ? At least the second one ?

Many thanks

Hi bxlouis,

I have improved the blinds support.
When my pull request gets approved the blinds will function properly, and you will be able to handle "inverted" blinds too.

https://github.com/PatchworkBoy/homebri ... cz/pull/28
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 »

Approved, merged, CHANGELOG updated, and npmjs repo updated etc... so you can update via wget or curl -o from GitHub, or npm update.

Ta muchly Ramon!
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 »

RemcoSmit wrote:thanks, Marci.
It's working when I use the LAN address and not the loopback address. Strange, as this should work.
Not necessarily... at a guess one of the node.js modules (dependencies & sub dependencies of homebridge) is binding a service's port only to the LAN address rather than all addresses assigned to the system at an OS level. Fairly common in node based stuff.
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!
bxlouis
Posts: 45
Joined: Wednesday 16 December 2015 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Belgium
Contact:

Re: eDomoticz Homebridge-Plugin

Post by bxlouis »

TheRamon wrote:
bxlouis wrote:
Marci wrote:-
Hi Marci,

Will you provide an update about this issue ? At least the second one ?

Many thanks

Hi bxlouis,

I have improved the blinds support.
When my pull request gets approved the blinds will function properly, and you will be able to handle "inverted" blinds too.

https://github.com/PatchworkBoy/homebri ... cz/pull/28
Thank your very much to both of you TheRamon and Marci. I will test that asap !
bxlouis
Posts: 45
Joined: Wednesday 16 December 2015 14:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Belgium
Contact:

Re: eDomoticz Homebridge-Plugin

Post by bxlouis »

Tested ! It works like a charm ! Awesome !!!
Jochem
Posts: 19
Joined: Sunday 28 February 2016 19:39
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10181
Location: Noordwijk
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Jochem »

Hello,

When I load my homekit on my iPhone I will only see the switches but not the Temperature sensors..

What's going wrong???

Jochem
Raspberry P3, RF-Link FW version 48, lots of KAKU switches, Sonos connected, LG TV switching, a lot of weather switches.
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 »

Are they picked up by homebridge in it's log?
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!
Jochem
Posts: 19
Joined: Sunday 28 February 2016 19:39
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10181
Location: Noordwijk
Contact:

Re: eDomoticz Homebridge-Plugin

Post by Jochem »

Hello Marci,

I don't think so, I cannot find the log file in my homebridge configuration...

I also tried to install edomoticz but cannot find the edomoticz files...
Raspberry P3, RF-Link FW version 48, lots of KAKU switches, Sonos connected, LG TV switching, a lot of weather switches.
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 »

Instructions in first post cover log file location etc IF installed according to instructions, otherwise, read through the thread - locating homebridge etc is covered several times.
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!
markk
Posts: 267
Joined: Tuesday 14 January 2014 14:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by markk »

Marci wrote:Aye - the current Domoticz image differs to the one that was around when I wrote all that. I need to do a fresh build and update the instructions.
Hi Marci. I had a second SD card crash in two months last week so am awaiting delivery of a RPi3 and new SD card to do a fresh RPi install. In the meantime, I've used an old SD card back-up to get Domoticz up and running again but the back-up was from before I'd finally got Homebridge running on it having virtually taken over this thread with my problems a few pages ago and I'm having all the same issues installing it again as I did the last time. I'm gutted. I love this plugin. Two days solid now and still no joy. When my new SD and RPi arrive I will do a clean install but I was wondering if you've yet had a chance to amend the instructions to reflect the changes on the current Domoticz image so I don't hit the same issues again. If not, could I use an older Domoticz image, install the Homebridge plugin then upgrade Domoticz to the latest version?
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
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 »

Hi everyone,

Just a quick query really.. most of my devices are named by 'room' - 'device' and put in a default room. Mainly because that's what they are named in domoticz. Eg. Living Room - Wall Lights. I used t say hey Siri turn on the living room wall lights and it would do just that. I have updated to iOS 10 beta 3 and now I says it can't do that. I've narrowed it down to it not liking the hyphen in the name because if I add the hyphen to the text in Siri it will then execute the command.

Has anyone else noticed anything similar?

Cheers
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 »

It's probably HomeKit looking for a room called living room and then a light you would be better calling it lounge light in Siri by changing its name and Calling it like that rather than including a room in its name


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

How do you do it with say ceiling lights? They are called living room - ceiling light, Hallway - Ceiling Light etc.. I can't change them both to ceiling light can I? But have them in different rooms?


Sent from my iPhone using Tapatalk
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests