Page 41 of 86
Re: homebridge-edomoticz Plugin
Posted: Saturday 08 October 2016 0:46
by simon_rb
Since updating to the latest MQTT branch I have lost my LMS Squeezebox players. They now say not supported..
Sent from my iPhone using Tapatalk
Re: homebridge-edomoticz Plugin
Posted: Saturday 08 October 2016 16:32
by Marci
Stick it's json up on GitHub & I'll see how it WAS picked up previously & work out what's overridden it.
Re: homebridge-edomoticz Plugin
Posted: Saturday 08 October 2016 16:32
by Marci
rwijbenga wrote:Ok, then I will wait a bit longer...
But I now also have the midnight crash:
Code: Select all
homebridge.service - HomeBridge Service
Loaded: loaded (/lib/systemd/system/homebridge.service; enabled)
Active: failed (Result: exit-code) since Fri 2016-10-07 05:17:57 CEST; 8h ago
Process: 817 ExecStart=/usr/bin/homebridge (code=exited, status=1/FAILURE)
Main PID: 817 (code=exited, status=1/FAILURE)
Oct 07 05:17:57 raspberrypi homebridge[817]: at SaxLtx.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/ltx/lib/parsers/ltx.js:105:26)
Oct 07 05:17:57 raspberrypi homebridge[817]: at StreamParser.write (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/StreamParser.js:124:17)
Oct 07 05:17:57 raspberrypi homebridge[817]: at Connection.onData (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/node-xmpp-core/lib/Connection.js:310:17)
Oct 07 05:17:57 raspberrypi homebridge[817]: at emitOne (events.js:101:20)
Oct 07 05:17:57 raspberrypi homebridge[817]: at Socket.emit (events.js:188:7)
Oct 07 05:17:57 raspberrypi homebridge[817]: at readableAddChunk (_stream_readable.js:176:18)
Oct 07 05:17:57 raspberrypi homebridge[817]: at Socket.Readable.push (_stream_readable.js:134:10)
Oct 07 05:17:57 raspberrypi homebridge[817]: at TCP.onread (net.js:543:20)
Oct 07 05:17:57 raspberrypi systemd[1]: homebridge.service: main process exited, code=exited, status=1/FAILURE
Oct 07 05:17:57 raspberrypi systemd[1]: Unit homebridge.service entered failed state.
In my case the problems came after upgrading to the latest beta of domoticz. V3.5733
Hope this helps finding a fix....
That's being triggered by your homebridge-harmony plugin, not Domoticz.
homebridge-edomoticz Plugin
Posted: Saturday 08 October 2016 16:41
by Marci
simon_rb wrote:Hi all,
My homebridge keeps crashing at night when I turn "The House" off.. Using MQTT branch.
Cheers
Code: Select all
pi@raspberrypi:~$ sudo systemctl status homebridge -l
● homebridge.service - HomeBridge Service
Loaded: loaded (/lib/systemd/system/homebridge.service; enabled)
Active: failed (Result: exit-code) since Thu 2016-10-06 23:35:03 BST; 10h ago
Process: 29054 ExecStart=/usr/bin/homebridge (code=exited, status=1/FAILURE)
Main PID: 29054 (code=exited, status=1/FAILURE)
Oct 06 23:35:03 raspberrypi homebridge[29054]: Layer Decrypt fail!
Oct 06 23:35:03 raspberrypi homebridge[29054]: Verify Fail
Oct 06 23:35:03 raspberrypi homebridge[29054]: Layer Decrypt fail!
Oct 06 23:35:03 raspberrypi homebridge[29054]: Verify Fail
Oct 06 23:35:03 raspberrypi homebridge[29054]: Layer Decrypt fail!
Oct 06 23:35:03 raspberrypi homebridge[29054]: undefined:1
Oct 06 23:35:03 raspberrypi homebridge[29054]: {"characteristics":[{"aid":2,"iid":12,"ev":true},{"aid":2,"iid":15,"ev":true},{"aid":3,"iid":11,"ev":true},{"aid":3,"iid":14,"ev":true},{"aid":4,"iid":11,"ev":true},{"aid":4,"iid":14,"ev":true},{"aid":5,"iid":11,"ev":true},{"aid":5,"iid":14,"ev":true},{"aid":6,"iid":11,"ev":true},{"aid":6,"iid":14,"ev":true},{"aid":7,"iid":11,"ev":true},{"aid":7,"iid":14,"ev":true},{"aid":8,"iid":11,"ev":true},{"aid":8,"iid":14,"ev":true},{"aid":9,"iid":11,"ev":true},{"aid":9,"iid":14,"ev":true},{"aid":10,"iid":11,"ev":true},{"aid":10,"iid":14,"ev":true},{"aid":11,"iid":11,"ev":true},{"aid":11,"iid":14,"ev":true},{"aid":12,"iid":11,"ev":true},{"aid":12,"iid":14,"ev":true},{"aid":13,"iid":13,"ev":true},{"aid":13,"iid":16,"ev":true},{"aid":14,"iid":11,"ev":true},{"aid":14,"iid":14,"ev":true},{"aid":15,"iid":12,"ev":true},{"aid":15,"iid":15,"ev":true},{"aid":16,"iid":11,"ev":true},{"aid":16,"iid":14,"ev":t
Oct 06 23:35:03 raspberrypi homebridge[29054]: SyntaxError: Unexpected token
Oct 06 23:35:03 raspberrypi systemd[1]: homebridge.service: main process exited, code=exited, status=1/FAILURE
Oct 06 23:35:03 raspberrypi systemd[1]: Unit homebridge.service entered failed state.
They don't look like errors triggered by hb-ed... edomoticz triggered errors are prefixed with the platform name. And nothing is set to bluntly log a 'characteristics' json object output like that - @TheRamon - do you agree?
Are you running any other plugins?
The undefined:1 error implies it's being told (via a scene trigger? Defined in HomeKit or Domoticz?) to turn off a device or characteristic that doesn't exist in HomeKit.
(Which could be the lms devices that now reports as unsupported)
The layer decrypt & verify failures imply this may be a bigger problem going on within homebridge / hap-nodejs. The plugin doesn't do any crypto - that's all hap-nodejs & iOS. May be worth posting in the hap-nodejs repo's GitHub issues page, noting in the post that it's whilst using homebridge.
Re: homebridge-edomoticz Plugin
Posted: Saturday 08 October 2016 16:50
by simon_rb
Thanks Maci, I shall take a look at my scenes. I'll also post the LMS json on git when I get home. Cheers mate.
Sent from my iPhone using Tapatalk
Re: homebridge-edomoticz Plugin
Posted: Saturday 08 October 2016 21:12
by rwijbenga
I think it was the harmony plugin, I have started from scratch, and no other plugin's. Let's see how it goes!
Thank you all for helping out, and I feel stupid not seeing the harmony error myself....

Re: homebridge-edomoticz Plugin
Posted: Sunday 09 October 2016 4:02
by energie
simon_rb wrote:I've not updated to latest beta of domoticz, I'm on the latest stable. I had no issues with dimmers other than it sending an on command then the dimmer value which I know can't be changed. I'll update to latest MQTT branch and see what happens tonight.
Sent from my iPhone using Tapatalk
Apart from you main problem, updating to the latest version, in this case the beta, is definitely worth it. The current latest stable is quite old.
Re: homebridge-edomoticz Plugin
Posted: Sunday 09 October 2016 11:12
by simon_rb
Marci,
I installed a plugin called squeeze, didn't offer any benefits over edomoticz with LMS so took it out of my config and uninstalled it. I first encountered the error with homebridge the first night with the plugin installed and has continued ever since. In regards to scenes only scene HomeKit does is turn off one switch called "Home". This has worked and I haven't changed this for months. Have I missed a step in removing the squeeze plugin?
https://www.npmjs.com/package/homebridge-squeezebox
@energie I might take a look
Update:- maybe the squeeze plugin has confused things. May try resetting HomeKit and delete persist folder.
Re: homebridge-edomoticz Plugin
Posted: Sunday 09 October 2016 11:40
by Marci
Remember, plugins create each accessory's uuid from the device name. Two plugins both loading the same device means one will hoist that device out of control over the other. If one of those devices vanishes, homebridge keeps it cached in case it reappears, so the control remains hoisted. Then an action is issued to the plugin that no longer has control of that device... et voila. Crash.
Long n' short... delete persist and accessories from ~\.homebridge and let it reassign the UUID back to edomoticz and all will fix itself.
This should be the FIRST thing you try when diagnosing issues of sensors vanishing etc when playing with multiple plugins.
When experimenting with multiple plugins referencing the same devices, each devices name must be unique across ALL of homebridge, or, you must remove those devices from your other platforms FIRST to avoid a conflict only fixable day dumping persist / accessories.
Ie: an accessory can only feature in one platform plugin at a time.
Correct procedure: move lms to hidden room in Domoticz, restart homebridge to pick up change (check lms is gone in HomeKit app). Install new independent lms plugin, restart homebridge to pick up change. Check it has returned being handled by new plugin.
To give control back to edomoticz, remove accessory / new platform in HomeKit app, remove new plugin, restart homebridge. Move device out of domoticz hidden room. Restart homebridge.
Re: homebridge-edomoticz Plugin
Posted: Sunday 09 October 2016 12:10
by simon_rb
Did the above mate (deleting accessories & persist folders, resetting HomeKit) Re added everything and the LMS players are still unsupported so maybe something has changed when I updated to latest MQTT branch.
Cheers
Re: homebridge-edomoticz Plugin
Posted: Sunday 09 October 2016 12:19
by Marci
Aye - double coincidence of problem above combined with a commit going missing - soz! Shall get it sorted later this afternoon.
Re: homebridge-edomoticz Plugin
Posted: Sunday 09 October 2016 12:20
by simon_rb
Marci wrote:Aye - double coincidence of problem above combined with a commit going missing. Shall get it sorted later this afternoon.
Ah, funny world eh! No probs mate. Thanks for your patience.

Re: homebridge-edomoticz Plugin
Posted: Monday 10 October 2016 9:17
by TheRamon
Marci wrote:
They don't look like errors triggered by hb-ed... edomoticz triggered errors are prefixed with the platform name. And nothing is set to bluntly log a 'characteristics' json object output like that - @TheRamon - do you agree?
Totally agree. We don't log anything except when using DEBUG=* -D.
"forceLog" is only invoked at the beginning, too.
Re: homebridge-edomoticz Plugin
Posted: Tuesday 11 October 2016 13:08
by possible
Goodday,
I got homebridge installed on my Raspberry Pi 2, everything seems to be running fine:
However, as you can see, the config.json is missing. When I add example config.json to /home/pi/.homebridge, I got the following errors when restarting everything:
Does anyone know what the problem might be ?
I added this config.json:
Code: Select all
{
"description": "Configuration file for Domoticz platform.",
"platforms": [
{
"platform": "Domoticz",
"name": "Domoticz",
"server": "127.0.0.1",
"port": "8080"
}
],
"accessories": [
]
}
Re: homebridge-edomoticz Plugin
Posted: Tuesday 11 October 2016 16:43
by TheRamon
Hi @possible,
Your config JSON was almost right. Try changing the platform name like below: (my config json)
Code: Select all
{
"bridge": {
"name": "Homebridge",
"username": "CC:21:3E:E4:DE:33",
"port": 51826,
"pin": "031-45-154"
},
"description": "Configuration file for (e)xtended Domoticz platform.",
"platforms": [
{
"platform": "eDomoticz",
"name": "eDomoticz",
"server": "127.0.0.1",
"port": "8080",
"ssl": 0,
"roomid": 0,
"mqttenable": 0,
"mqttserver": "",
"mqttport": "1883",
"mqttauth": 0,
"mqttuser": "",
"mqttpass": ""
}
],
"accessories": []
}
Re: homebridge-edomoticz Plugin
Posted: Tuesday 11 October 2016 18:20
by Minglarn
A little question.. Searched for it but it ended with 200 hits.
Is it possible to install home bridge on a another RPI and let it communicate with Domoticz?
homebridge-edomoticz Plugin
Posted: Tuesday 11 October 2016 20:21
by Marci
Yes. Hence the server and port fields in the plugin's config.json. Set these to dns/IP & port of any machine running domoticz.
Re: homebridge-edomoticz Plugin
Posted: Tuesday 11 October 2016 20:32
by Minglarn
Thanks for the info...
Btw, shouldn't bee easier to just install a Domoticz image and start homebridge on that unit and let it act as a slave?
Re: homebridge-edomoticz Plugin
Posted: Tuesday 11 October 2016 22:43
by Marci
Yep, that works also, but unnecessary. Just uses more CPU/mem. Homebridge & the plugin are designed to work locally or over a network. No benefit of setting up a slave Domoticz instance at all.
Re: homebridge-edomoticz Plugin
Posted: Tuesday 11 October 2016 22:48
by Marci
(In fact, the method used to communicate between domoticz master and slave is the exact same method the plugin communicates with domoticz over a network... no need to add a slave into the mix at all)