Page 42 of 86

Re: homebridge-edomoticz Plugin

Posted: Wednesday 12 October 2016 14:56
by possible
Hi,

I tried to install the following plugin for my sony TV:

Code: Select all

npm install -g homebridge-sonybraviatv
I want to turn my Sony Android TV on with this plugin. i added the following configuration to 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": [
        {
            "accessory": "SonyBraviaTV",
            "name": "Sony KDL",
            "ipaddress": "192.168.0.150",
            "presharedkey": "YOUR PRESHARED KEY HERE"
        }
    ],
But when I restart homebridge, homebridge fails:

Code: Select all

homebridge.service - HomeBridge Service
   Loaded: loaded (/lib/systemd/system/homebridge.service; enabled)
   Active: failed (Result: exit-code) since Wed 2016-10-12 12:58:16 UTC; 3s ago
  Process: 15505 ExecStart=/usr/local/lib/node_modules/homebridge/bin/homebridge (code=exited, status=1/FAILURE)
 Main PID: 15505 (code=exited, status=1/FAILURE)

Oct 12 12:58:16 raspberrypi homebridge[15505]: at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
Oct 12 12:58:16 raspberrypi homebridge[15505]: at Module._compile (module.js:409:26)
Oct 12 12:58:16 raspberrypi homebridge[15505]: at Object.Module._extensions..js (module.js:416:10)
Oct 12 12:58:16 raspberrypi homebridge[15505]: at Module.load (module.js:343:32)
Oct 12 12:58:16 raspberrypi homebridge[15505]: at Function.Module._load (module.js:300:12)
Oct 12 12:58:16 raspberrypi homebridge[15505]: at Function.Module.runMain (module.js:441:10)
Oct 12 12:58:16 raspberrypi homebridge[15505]: at startup (node.js:139:18)
Oct 12 12:58:16 raspberrypi homebridge[15505]: at node.js:974:3
Oct 12 12:58:16 raspberrypi systemd[1]: homebridge.service: main process exited, code=exited, status=1/FAILURE
Oct 12 12:58:16 raspberrypi systemd[1]: Unit homebridge.service entered failed state.
Did I made a typo ?

Re: homebridge-edomoticz Plugin

Posted: Wednesday 12 October 2016 17:04
by Minglarn
Marci wrote:(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)
Great.
Will try to install it on my rpi1 :)

Edit: Changed my mind... Just bought a RPI3 :)

Re: homebridge-edomoticz Plugin

Posted: Wednesday 12 October 2016 19:14
by Minglarn
Hi!

wget http://www.domoticz.com/releases/r ... armv7l.tgz

Seems to be broken... No response from host... Any alternatives?

Re: homebridge-edomoticz Plugin

Posted: Wednesday 12 October 2016 19:18
by Marci
possible wrote:Hi,

I tried to install the following plugin for my sony TV:

Code: Select all

npm install -g homebridge-sonybraviatv
I want to turn my Sony Android TV on with this plugin. i added the following configuration to 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": [
        {
            "accessory": "SonyBraviaTV",
            "name": "Sony KDL",
            "ipaddress": "192.168.0.150",
            "presharedkey": "YOUR PRESHARED KEY HERE"
        }
    ],
But when I restart homebridge, homebridge fails:

Code: Select all

homebridge.service - HomeBridge Service
   Loaded: loaded (/lib/systemd/system/homebridge.service; enabled)
   Active: failed (Result: exit-code) since Wed 2016-10-12 12:58:16 UTC; 3s ago
  Process: 15505 ExecStart=/usr/local/lib/node_modules/homebridge/bin/homebridge (code=exited, status=1/FAILURE)
 Main PID: 15505 (code=exited, status=1/FAILURE)

Oct 12 12:58:16 raspberrypi homebridge[15505]: at Object.<anonymous> 
Run it manually and it should hopefully present more useful errors... but note, if using a separate plugin for the TV then that TV shouldn't be listed in Domoticz.

Code: Select all

DEBUG=* homebridge -D

Re: homebridge-edomoticz Plugin

Posted: Wednesday 12 October 2016 19:22
by Marci
Minglarn wrote:Hi!

wget http://www.domoticz.com/releases/r ... armv7l.tgz

Seems to be broken... No response from host... Any alternatives?
S'just the download link for domoticz. Go to downloads section, right click and copy link, paste in place of original... BUT... like it says for option 3 in the first post...
It’s assumed that you have a vague idea of what you’re doing with Linux and will be able to resolve any issues yourself.
If you're getting stuck at that step, start again using the domoticz images instead.

Re: homebridge-edomoticz Plugin

Posted: Wednesday 12 October 2016 20:26
by Minglarn
Marci wrote:
Minglarn wrote:Hi!

wget http://www.domoticz.com/releases/r ... armv7l.tgz

Seems to be broken... No response from host... Any alternatives?
S'just the download link for domoticz. Go to downloads section, right click and copy link, paste in place of original... BUT... like it says for option 3 in the first post...
It’s assumed that you have a vague idea of what you’re doing with Linux and will be able to resolve any issues yourself.
If you're getting stuck at that step, start again using the domoticz images instead.
I did get it from this url: https://releases.domoticz.com/releases/ ... armv7l.tgz

Re: homebridge-edomoticz Plugin

Posted: Wednesday 12 October 2016 20:43
by possible
Marci wrote:
possible wrote:Hi,

I tried to install the following plugin for my sony TV:

Code: Select all

npm install -g homebridge-sonybraviatv
I want to turn my Sony Android TV on with this plugin. i added the following configuration to 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": [
        {
            "accessory": "SonyBraviaTV",
            "name": "Sony KDL",
            "ipaddress": "192.168.0.150",
            "presharedkey": "YOUR PRESHARED KEY HERE"
        }
    ],
But when I restart homebridge, homebridge fails:

Code: Select all

homebridge.service - HomeBridge Service
   Loaded: loaded (/lib/systemd/system/homebridge.service; enabled)
   Active: failed (Result: exit-code) since Wed 2016-10-12 12:58:16 UTC; 3s ago
  Process: 15505 ExecStart=/usr/local/lib/node_modules/homebridge/bin/homebridge (code=exited, status=1/FAILURE)
 Main PID: 15505 (code=exited, status=1/FAILURE)

Oct 12 12:58:16 raspberrypi homebridge[15505]: at Object.<anonymous> 
Run it manually and it should hopefully present more useful errors... but note, if using a separate plugin for the TV then that TV shouldn't be listed in Domoticz.

Code: Select all

DEBUG=* homebridge -D

What do you mean with run it manually? The TV is not listed in domoticz.. I only added the plugin and added the accessory to the config file.

Do I have to remove the domoticz part in the configuration file?

debug:

Code: Select all

[10/12/2016, 7:05:42 PM] There was a problem reading your config.json file.
[10/12/2016, 7:05:42 PM] Please try pasting your config.json file here to validate it: http://jsonlint.com
[10/12/2016, 7:05:42 PM]
/usr/local/lib/node_modules/homebridge/lib/server.js:194
    throw err;
    ^

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at Server._loadConfig (/usr/local/lib/node_modules/homebridge/lib/server.js:188:19)
    at new Server (/usr/local/lib/node_modules/homebridge/lib/server.js:49:23)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:26:16)
    at Object.<anonymous> (/usr/local/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)
    at startup (node.js:139:18)
    at node.js:974:3

Re: homebridge-edomoticz Plugin

Posted: Thursday 13 October 2016 11:31
by TheRamon
possible wrote:
Marci wrote:
possible wrote:

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": [
        {
            "accessory": "SonyBraviaTV",
            "name": "Sony KDL",
            "ipaddress": "192.168.0.150",
            "presharedkey": "YOUR PRESHARED KEY HERE"
        }
    ],
It looks like you're missing the last accolade "}" in your config json.

Try:

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": [
        {
            "accessory": "SonyBraviaTV",
            "name": "Sony KDL",
            "ipaddress": "192.168.0.150",
            "presharedkey": "YOUR PRESHARED KEY HERE"
        }
    ]
    }

Re: homebridge-edomoticz Plugin

Posted: Thursday 13 October 2016 14:10
by possible
TheRamon wrote:
possible wrote:
Marci wrote:
It looks like you're missing the last accolade "}" in your config json.

Try:

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": [
        {
            "accessory": "SonyBraviaTV",
            "name": "Sony KDL",
            "ipaddress": "192.168.0.150",
            "presharedkey": "YOUR PRESHARED KEY HERE"
        }
    ]
    }

Thanks!

That did the trick! But if I want to add multiple accessoires, What code do I have to use ?

I probably made a mistake again:

Code: Select all

 "accessories": [
        {
            "accessory": "SonyBraviaTV",
            "name": "Televisie",
            "ipaddress": "192.168.0.150",
            "presharedkey": "wereld213"

        }

     ],
            "accessory": "Xbox",
            "name": "Xbox",
            "ipAddress": "192.168.0.171",
            "liveId": "KEY"
        }
   ]
   }

Re: homebridge-edomoticz Plugin

Posted: Thursday 13 October 2016 20:02
by Artic1980
i have this problem
sudo systemctl status homebridge.service -l
● homebridge.service - HomeBridge Service
Loaded: loaded (/lib/systemd/system/homebridge.service; enabled)
Active: failed (Result: exit-code) since gio 2016-10-13 20:00:50 CEST; 21s ag o
Process: 610 ExecStart=/usr/bin/homebridge (code=exited, status=203/EXEC)
Main PID: 610 (code=exited, status=203/EXEC)

ott 13 20:00:50 octopi systemd[1]: Starting HomeBridge Service...
ott 13 20:00:50 octopi systemd[1]: Started HomeBridge Service.
ott 13 20:00:50 octopi systemd[1]: homebridge.service: main process exited, code =exited, status=203/EXEC
ott 13 20:00:50 octopi systemd[1]: Unit homebridge.service entered failed state.


whi?

Re: homebridge-edomoticz Plugin

Posted: Thursday 13 October 2016 21:00
by rwijbenga
possible wrote:
TheRamon wrote:
possible wrote:

I probably made a mistake again:

Code: Select all

 "accessories": [
        {
            "accessory": "SonyBraviaTV",
            "name": "Televisie",
            "ipaddress": "192.168.0.150",
            "presharedkey": "wereld213"

        }

     ],
            "accessory": "Xbox",
            "name": "Xbox",
            "ipAddress": "192.168.0.171",
            "liveId": "KEY"
        }
   ]
   }

The middle ] needs to go, it should be:

Code: Select all

 "accessories": [
        {
            "accessory": "SonyBraviaTV",
            "name": "Televisie",
            "ipaddress": "192.168.0.150",
            "presharedkey": "wereld213"

        },
            "accessory": "Xbox",
            "name": "Xbox",
            "ipAddress": "192.168.0.171",
            "liveId": "KEY"
        }
   ]
   }
You can always check your json on this url: http://jsonlint.com/#

Re: homebridge-edomoticz Plugin

Posted: Friday 14 October 2016 9:11
by possible
rwijbenga wrote:
possible wrote:
TheRamon wrote:

I probably made a mistake again:

Code: Select all

 "accessories": [
        {
            "accessory": "SonyBraviaTV",
            "name": "Televisie",
            "ipaddress": "192.168.0.150",
            "presharedkey": "wereld213"

        }

     ],
            "accessory": "Xbox",
            "name": "Xbox",
            "ipAddress": "192.168.0.171",
            "liveId": "KEY"
        }
   ]
   }

The middle ] needs to go, it should be:

Code: Select all

 "accessories": [
        {
            "accessory": "SonyBraviaTV",
            "name": "Televisie",
            "ipaddress": "192.168.0.150",
            "presharedkey": "wereld213"

        },
            "accessory": "Xbox",
            "name": "Xbox",
            "ipAddress": "192.168.0.171",
            "liveId": "KEY"
        }
   ]
   }
You can always check your json on this url: http://jsonlint.com/#
yeah i checked the website, but it keeps failing on:

Error: Parse error on line 31:
... }, "accessory": "Xbox", "name":
--------------------^
Expecting 'EOF', '}', ',', ']', got ':'

Re: homebridge-edomoticz Plugin

Posted: Friday 14 October 2016 9:40
by binbakker
possible wrote:
rwijbenga wrote:
possible wrote:


yeah i checked the website, but it keeps failing on:

Error: Parse error on line 31:
... }, "accessory": "Xbox", "name":
--------------------^
Expecting 'EOF', '}', ',', ']', got ':'
Seems you miss the { at the start of Xbox accessoire:

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": [{
		"accessory": "SonyBraviaTV",
		"name": "Televisie",
		"ipaddress": "192.168.0.150",
		"presharedkey": "wereld213"

	}, {
		"accessory": "Xbox",
		"name": "Xbox",
		"ipAddress": "192.168.0.171",
		"liveId": "KEY"
	}]
}

Re: homebridge-edomoticz Plugin

Posted: Friday 14 October 2016 14:24
by TheRamon
Have just added an experimental feature to the MQTT branch, namely changing colours through RGB instead of Hue & Saturation. Hue and Saturation never worked the way it should, so I'm hoping RGB will.

Will try this out tonight.

For reference: https://github.com/domoticz/domoticz/issues/909

Re: homebridge-edomoticz Plugin

Posted: Friday 14 October 2016 18:23
by simon_rb
TheRamon wrote:Have just added an experimental feature to the MQTT branch, namely changing colours through RGB instead of Hue & Saturation. Hue and Saturation never worked the way it should, so I'm hoping RGB will.

Will try this out tonight.

For reference: https://github.com/domoticz/domoticz/issues/909
Top man, any further ideas/development on the 'cache' idea. Or are you waiting for MQTT to be completely finished?

Re: homebridge-edomoticz Plugin

Posted: Saturday 15 October 2016 9:45
by Marci
Been reading thru the source of hap-nodejs - there doesn't seem to be a cache that's usable in this way... unless I've missed something??

Re: homebridge-edomoticz Plugin

Posted: Saturday 15 October 2016 9:47
by Marci
Artic1980 wrote:i have this problem
sudo systemctl status homebridge.service -l
● homebridge.service - HomeBridge Service
Loaded: loaded (/lib/systemd/system/homebridge.service; enabled)
Active: failed (Result: exit-code) since gio 2016-10-13 20:00:50 CEST; 21s ag o
Process: 610 ExecStart=/usr/bin/homebridge (code=exited, status=203/EXEC)
Main PID: 610 (code=exited, status=203/EXEC)

ott 13 20:00:50 octopi systemd[1]: Starting HomeBridge Service...
ott 13 20:00:50 octopi systemd[1]: Started HomeBridge Service.
ott 13 20:00:50 octopi systemd[1]: homebridge.service: main process exited, code =exited, status=203/EXEC
ott 13 20:00:50 octopi systemd[1]: Unit homebridge.service entered failed state.


whi?
Run...

Code: Select all

DEBUG=* homebridge -D
...to get more useful info.

homebridge-edomoticz Plugin

Posted: Saturday 15 October 2016 9:49
by Marci
*ignore*

Re: homebridge-edomoticz Plugin

Posted: Saturday 15 October 2016 10:01
by simon_rb
TheRamon wrote: @marci, sometime later we should probably cache the on/off state (and other variables) of the devices in the eDomoticzAccessory. Then, update the state with the status JSON (ideally later on in the process through tapping MQTT messages). Then, whenever Siri or HomeKit asks the status of the device we IMMEDIATELY return the cached value without asking Domoticz first. :mrgreen: :mrgreen: :mrgreen: :mrgreen:
Something TheRamon mentioned last week.


Sent from my iPhone using Tapatalk

Re: homebridge-edomoticz Plugin

Posted: Saturday 15 October 2016 10:18
by Marci
Yep, I saw... what I was getting at is that there doesn't appear to be an existing method already in homebridge / hap-nodejs that we can use for this, so would need our own mechanism.