Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loaded plugin no accessories? #33

Open
scheveningen opened this issue Jul 2, 2016 · 12 comments
Open

loaded plugin no accessories? #33

scheveningen opened this issue Jul 2, 2016 · 12 comments

Comments

@scheveningen
Copy link

I try to install the plugin, But it won't work. I'm sure I have a small error in my config.json file.
But I can not figure it out. Install the plugin 2 times to be sure. Room name is the same as the name in my sonos app.

[Sat Jul 02 2016 16:49:32 GMT+0000 (UTC)] Loaded plugin: homebridge-sonos
[Sat Jul 02 2016 16:49:32 GMT+0000 (UTC)] Registering accessory 'homebridge-sonos.Sonos'
[Sat Jul 02 2016 16:49:32 GMT+0000 (UTC)] ---
[Sat Jul 02 2016 16:49:32 GMT+0000 (UTC)] Loaded config.json with 0 accessories and 1 platforms.
[Sat Jul 02 2016 16:49:32 GMT+0000 (UTC)] ---

config.json file

{
"description": "Configuration file for Domoticz platform.",
"platforms": [
{
"platform": "Domoticz",
"name": "Domoticz",
"server": "127.0.0.1",
"port": "8080"
}
{
"accessories": [
{
"accessory": "Sonos",
"name": "Bedroom Speakers",
"room": "Woonkamer"
}
]
}

@gizbod
Copy link

gizbod commented Jul 3, 2016

I think you are missing ], between platforms and accessories.

@gizbod
Copy link

gizbod commented Jul 3, 2016

You need this I think, after your initial homebridge set up config

"platforms": [
{
"platform": "Domoticz",
"name": "Domoticz",
"server": "127.0.0.1",
"port": "8080"
}],
"accessories": [
{
"accessory": "Sonos",
"name": "Bedroom Speakers",
"room": "Woonkamer"
}
]

@scheveningen
Copy link
Author

Still the same, I copy past the text using nano config.json Save the file, reboot domoticz and start homebridge and I get the same problem. "Loaded config.json with 0 accessories and 1 platforms."

[Sun Jul 03 2016 20:18:49 GMT+0000 (UTC)] Registering platform 'homebridge-edomoticz.eDomoticz'
[Sun Jul 03 2016 20:18:50 GMT+0000 (UTC)] ---
[Sun Jul 03 2016 20:18:53 GMT+0000 (UTC)] Loaded plugin: homebridge-sonos
[Sun Jul 03 2016 20:18:53 GMT+0000 (UTC)] Registering accessory 'homebridge-sonos.Sonos'
[Sun Jul 03 2016 20:18:53 GMT+0000 (UTC)] ---
[Sun Jul 03 2016 20:18:53 GMT+0000 (UTC)] Loaded config.json with 0 accessories and 1 platforms.
[Sun Jul 03 2016 20:18:53 GMT+0000 (UTC)] ---
[Sun Jul 03 2016 20:18:53 GMT+0000 (UTC)] Loading 1 platforms...
[Sun Jul 03 2016 20:18:53 GMT+0000 (UTC)] [Domoticz] Initializing eDomoticz platform...
[Sun Jul 03 2016 20:18:53 GMT+0000 (UTC)] [Domoticz] Fetching Domoticz lights and switches...
[Sun Jul 03 2016 20:18:53 GMT+0000 (UTC)] Loading 0 accessories...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

@gizbod
Copy link

gizbod commented Jul 3, 2016

Post your full config blurring out any passwords

@scheveningen
Copy link
Author

scheveningen commented Jul 4, 2016

I just started with domoticz and homebridge. The installation of domoticz and homebridge went well. I use the app insteon+ after I started homebridge I see the homebridge in the app. So that is working fine.
The first thing I want to get working is the songs plugin. I install the songs plugin with,
sudo npm install -g homebridge-sonos (in the homebridge directory )

pi@raspberrypi:~/homebridge$ sudo npm install -g homebridge-sonos
homebridge-sonos@0.1.0 /usr/local/lib/node_modules/homebridge-sonos
├── underscore@1.8.3
└── sonos@0.8.0 (ip@0.3.3, debug@0.7.4, underscore@1.5.2, upnp-client@0.0.1, xml2js@0.2.8, request@2.27.0)

Below the complete config.json

{
"platform": "Domoticz",
"name": "Domoticz",
"server": "127.0.0.1",
"port": "8080"
}],
"accessories": [
{
"accessory": "Sonos",
"name": "Bedroom Speakers",
"room": "Woonkamer"
}
]

@scheveningen
Copy link
Author

still no luck, still no accessory?

@jochem725
Copy link

@scheveningen The config file you posted is not valid, I think this should solve your problem:

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },
    "description": "Configuration file for Domoticz platform.",
    "platforms": [{
        "platform": "Domoticz",
        "name": "Domoticz",
        "server": "127.0.0.1",
        "port": "8080"
    }],
    "accessories": [{
        "accessory": "Sonos",
        "name": "Bedroom Speakers",
        "room": "Woonkamer"
    }]
}

@scheveningen
Copy link
Author

still no luck. BUT below is the way is start homebridge,

Tuesday, 12 July 2016, 8:25:17 pm UTC
Linux 4.1.18+ armv6l GNU/Linux
Uptime.............: 0 days, 00h20m27s
Memory.............: 286700kB (Free) / 445380kB (Total)
Load Averages......: 0.07, 0.05, 0.06 (1, 5, 15 min)
Running Processes..: 62
IP Addresses.......: 192.168.178.17

pi@raspberrypi:~$ homebridge

And if I edit the config.json I type,
pi@raspberrypi:~$ nano config.json

Is there a change that I edit the config.json in the wrong directory? It is just a guess.

@jochem725
Copy link

@scheveningen I think the correct directory for the config.json file should be /home/pi/.homebridge in your case. To edit the correct config file you should use nano /home/pi/.homebridge/config.json

@scheveningen
Copy link
Author

YES!!! this is the problem, I edit the wrong config.json! But now there is a small new problem.
[ Error writing /home/pi/.homebridge/config.json: Permission denied ]

@jochem725
Copy link

@scheveningen You can write to that file using sudo nano /home/pi/.homebridge/config.json

@scheveningen
Copy link
Author

@jochem725 sorry for the late replay, but is work fine now! Thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants