Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

scouser75

macrumors 68030
Oct 7, 2008
2,753
557
It still looks like you never made a default config file. Go back to our earlier discussion about using the text editor nano to make a config file. You can just copy and paste the default file from this link then save it as yours when you exit nano.

https://github.com/nfarina/homebridge/blob/master/config-sample.json
OK. Now, how do I access nano? From Terminal?

Do I copy and paste the entirety of the link above into Nano?

Will there be a 'save' button on Nano? Or is there a command to 'save'?

I can see Homebridge on Homekit on my iPad and iPhone. It's under Rooms and is titled 'Default Room Homebridge No Response'. Does that look right?
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,206
15,761
California
In Terminal you need to first login to the Pi using SSH. Then enter nano ~/.homebridge/config.json to open a config file. Then copy paste in the text below as a default config file. Then control-x to exit nano and y to save the file.

Code:
{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },
    
    "description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",

    "accessories": [
        {
            "accessory": "WeMo",
            "name": "Coffee Maker"
        }
    ],

    "platforms": [
        {
            "platform" : "PhilipsHue",
            "name" : "Hue"
        }
    ]
}
 

scouser75

macrumors 68030
Oct 7, 2008
2,753
557
Thanks WB. This is what I done:

ping raspberry.local (ping raspberry just did not work so I done a bit of research)

ssh @192.***.*.**

nano ~/.homebridge/config.json

I then copied and pasted your text above and I've attached the result. Does it all look correct? Or still messed up?

If correct, what is my next step please?

PS How do I exit out of the attached screen and back to terminal and the raspberry command screen?
 

Attachments

  • 2-Screen Shot 2018-06-23 at 18.49.30.png
    2-Screen Shot 2018-06-23 at 18.49.30.png
    30.8 KB · Views: 228

scouser75

macrumors 68030
Oct 7, 2008
2,753
557
I got impatient this morning and wanted to have a go at getting this thing to finally work, so here's what I've done this morning:

I pinged the Pi and for some reason got a completely different IP! I'm baffled!!!

I then decided to stick with the IP address I got yesterday by using this command: 'ping raspberrypi.local'

Then using the IP I got, I entered ssh pi@***.***.*.** This command asked for my password, which I entered and it took me to the pi@raspberry:~ $ command.

I then entered 'sudo npm install -g --unsafe-perm homebridge-platform-ring-video-doorbell' and got the results shown below. Alas, on my iPhone and iPad I still can't access the Ring Doorbell. I can though see 'Default Room Homebridge'. And thankfully the 'No Response' working has gone. So something must have gone well??? I created the config file yesterday, and details are shown above. Do I need to create a config file after each new install of equipment?

pi@raspberrypi:~ $ sudo npm install -g --unsafe-perm homebridge-platform-ring-video-doorbell

> arp-a@0.5.2 install /usr/local/lib/node_modules/homebridge-platform-ring-video-doorbell/node_modules/homespun-discovery/node_modules/arp-a

> node-gyp rebuild


make: Entering directory '/usr/local/lib/node_modules/homebridge-platform-ring-video-doorbell/node_modules/homespun-discovery/node_modules/arp-a/build'

SOLINK_MODULE(target) Release/obj.target/macos.node

COPY Release/macos.node

make: Leaving directory '/usr/local/lib/node_modules/homebridge-platform-ring-video-doorbell/node_modules/homespun-discovery/node_modules/arp-a/build'


> socketwatcher@0.3.0 install /usr/local/lib/node_modules/homebridge-platform-ring-video-doorbell/node_modules/homespun-discovery/node_modules/pcap2/node_modules/socketwatcher

> node-gyp rebuild


make: Entering directory '/usr/local/lib/node_modules/homebridge-platform-ring-video-doorbell/node_modules/homespun-discovery/node_modules/pcap2/node_modules/socketwatcher/build'

CXX(target) Release/obj.target/socketwatcher/socket_watcher.o

../socket_watcher.cpp: In static member function ‘static void SocketWatcher::Callback(uv_poll_t*, int, int)’:

../socket_watcher.cpp:77:60: warning: v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]

Nan::MakeCallback(watcher->handle(), callback, argc, argv);

^

In file included from ../socket_watcher.hpp:8:0,

from ../socket_watcher.cpp:5:

../../nan/nan.h:929:46: note: declared here

NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(

^~~~~~~~~~~~

SOLINK_MODULE(target) Release/obj.target/socketwatcher.node

COPY Release/socketwatcher.node

make: Leaving directory '/usr/local/lib/node_modules/homebridge-platform-ring-video-doorbell/node_modules/homespun-discovery/node_modules/pcap2/node_modules/socketwatcher/build'


> pcap2@3.0.4 install /usr/local/lib/node_modules/homebridge-platform-ring-video-doorbell/node_modules/homespun-discovery/node_modules/pcap2

> node-gyp rebuild


make: Entering directory '/usr/local/lib/node_modules/homebridge-platform-ring-video-doorbell/node_modules/homespun-discovery/node_modules/pcap2/build'

CXX(target) Release/obj.target/pcap_binding/src/pcap_binding.o

CXX(target) Release/obj.target/pcap_binding/src/pcap_session.o

../src/pcap_session.cc: In static member function ‘static void PcapSession::packetReady(u_char*, const pcap_pkthdr*, const u_char*)’:

../src/pcap_session.cc:85:102: warning: v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]

n::GetCurrentContext()->Global(), Nan::New(session->packet_ready_cb), 0, NULL);

^

In file included from ../src/pcap_session.h:4:0,

from ../src/pcap_session.cc:7:

../node_modules/nan/nan.h:929:46: note: declared here

NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(

^~~~~~~~~~~~

SOLINK_MODULE(target) Release/obj.target/pcap_binding.node

COPY Release/pcap_binding.node

make: Leaving directory '/usr/local/lib/node_modules/homebridge-platform-ring-video-doorbell/node_modules/homespun-discovery/node_modules/pcap2/build'

homebridge-platform-ring-video-doorbell@0.6.5 /usr/local/lib/node_modules/homebridge-platform-ring-video-doorbell

├── hap-nodejs-community-types@0.2.0-alpha0

├── underscore@1.8.3

├── doorbot@3.1.0 (debug@2.6.9)

└── homespun-discovery@0.1.26 (pluralize@3.0.0, uuid@3.0.0, snmp-native@1.0.18, multicast-dns@6.2.3, bonjour@3.5.0, glob@7.1.2, xml2js@0.2.8, arp-a@0.5.2, pcap2@3.0.4)

pi@raspberrypi:~ $
 
Last edited:

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,206
15,761
California
If correct, what is my next step please?

PS How do I exit out of the attached screen and back to terminal and the raspberry command screen?
Once you get to that step and have pasted in the text, hit control-x and you will get a screen asking if you want to save the file. Hit y to save the file.

If you look along the bottom of the nano window it has a list key command options.

On the Ring stuff, I have no idea because I have not setup Ring on my Pi.
 
  • Like
Reactions: scouser75

scouser75

macrumors 68030
Oct 7, 2008
2,753
557
Thanks WB. I did save the file the way you detailed. And at the bottom of the nano screen the Exit command is (up arrow) and x. I pressed control and x but I just got a beep sound and it doesn't allow to exit.

Also, I found this link to install ring camera. So, if I go into Raspberrypi and install the camera plugin, and then enter the nano command (go into nano and copy and paste the command and then save), will it override my previous efforts for the ring doorbell plugin? Or will it include both ring doorbell AND ring camera plugins?

I'm shutting the Pi down with 'sudo shutdown -h'. Is that correct?

So close... yet feels so far!
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,206
15,761
California
Thanks WB. I did save the file the way you detailed. And at the bottom of the nano screen the Exit command is (up arrow) and x. I pressed control and x but I just got a beep sound and it doesn't allow to exit.

Also, I found this link to install ring camera. So, if I go into Raspberrypi and install the camera plugin, and then enter the nano command (go into nano and copy and paste the command and then save), will it override my previous efforts for the ring doorbell plugin? Or will it include both ring doorbell AND ring camera plugins?

I'm shutting the Pi down with 'sudo shutdown -h'. Is that correct?

So close... yet feels so far!

That little up arrow you see is the symbol for the control key (not command key). If you are on a Mac KB you will see the little ^ on the control key. In nano if I hit control then the X key I get this window to save the changes.

Screen Shot 2018-06-24 at 7.40.10 AM.png


After you save the initial default config file, each time you open the file in nano you should be able to add to it or edit new devices in then save. The syntax of that file is very picky and is has to be just right.

Here you can see part of my config file and each device.

Code:
"accessories": [],
    "platforms": [
        {
            "platform": "HarmonyHub",
            "name": "Living Room"
        },
        {
            "platform": "BelkinWeMo",
            "name": "Kitchen Lights",
            "description": "Kitchen Lights",
            "BelkinWeMo_name": "Kitchen Lights"
        }
    ]
 
  • Like
Reactions: scouser75

scouser75

macrumors 68030
Oct 7, 2008
2,753
557
Thanks mate. Bloomin' UK keyboard doesn't have the up arrow on the Ctrl key. And to exit out of nano I need to press CTRL and M.

So now, what I need to do is add the original nano command you gave below again and then just edit it each time I add something new and then save (CTRL X, then Y) and exit nano (CTRL M). Then that should have saved my new accessory?

This is the command you gave me a few posts above. Where it says 'accessory' would I enter 'ring-video-doorbell'? And where it says 'name' do I keep it as 'Homebridge'? The rest remains as it is?

On Homekit on the devices, Homebridge is showing in 'Living Room'.

{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-154"
},

"description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",

"accessories": [
{
"accessory": "WeMo",
"name": "Coffee Maker"
}
],

"platforms": [
{
"platform" : "PhilipsHue",
"name" : "Hue"
}
]
}
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,206
15,761
California
So now, what I need to do is add the original nano command you gave below again and then just edit it each time I add something new and then save (CTRL X, then Y) and exit nano (CTRL M). Then that should have saved my new accessory?
Yes... exactly. Each time you add a new plugin to support some device, you need to edit the config file to add it.

I have no idea about the specifics of adding the Ring though sine I have not done it.

It is good you can see the Homebridge setup in Homekit, so you have done something right! :)
 
  • Like
Reactions: scouser75

scouser75

macrumors 68030
Oct 7, 2008
2,753
557
It is good you can see the Homebridge setup in Homekit, so you have done something right! :)

About freaking time, hey! :D

And forgot to ask, in 'platforms' do I need to make any amendments? Or keep it as you have with "PhilipsHue" and "Hue"?
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,206
15,761
California
And forgot to ask, in 'platforms' do I need to make any amendments? Or keep it as you have with "PhilipsHue" and "Hue"?
You can just leave it there if you want to remind you of the syntax. Even if you have no Hue lights is will just show a short error message when you start Homebridge and not harm anything.
 

scouser75

macrumors 68030
Oct 7, 2008
2,753
557
You can just leave it there if you want to remind you of the syntax. Even if you have no Hue lights is will just show a short error message when you start Homebridge and not harm anything.

Tried entered the nano text below. Ctrl Y. Ctrl M (to exit)..... and........... no luck :( Am I missing something?

GNU nano 2.7.4 File: /home/pi/.homebridge/config.json


{

"bridge": {

"name": "Homebridge",

"username": "CC:22:3D:E3:CE:30",

"port": 51826,

"pin": "031-45-154"

},



"description": "This is an example configuration file with one fake accesso$


"accessories": [

{

"accessory": "ring-video-doorbell",

"name": "Coffee Maker"

}

],


"platforms": [

{


EDIT: Somehow managed to run a report!!!

pi@raspberrypi:~ $ homebridge

[6/24/2018, 6:18:01 PM] Loaded config.json with 1 accessories and 1 platforms.

[6/24/2018, 6:18:01 PM] ---

[6/24/2018, 6:18:01 PM] Plugin /usr/local/lib/node_modules/homebridge-camera-ffmpeg requires Node version of >=5.0.0 which does not satisfy the current Node version of v4.3.2. You may need to upgrade your installation of Node.

[6/24/2018, 6:18:03 PM] Loaded plugin: homebridge-camera-ffmpeg

[6/24/2018, 6:18:03 PM] Registering platform 'homebridge-camera-ffmpeg.Camera-ffmpeg'

[6/24/2018, 6:18:03 PM] ---

[6/24/2018, 6:18:03 PM] ====================

[6/24/2018, 6:18:03 PM] ERROR LOADING PLUGIN homebridge-platform-ring-video-doorbell:

[6/24/2018, 6:18:03 PM] SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

at exports.runInThisContext (vm.js:53:16)

at Module._compile (module.js:373:25)

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 Module.require (module.js:353:17)

at require (internal/module.js:12:17)

at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-platform-ring-video-doorbell/index.js:8:19)

at Module._compile (module.js:409:26)

at Object.Module._extensions..js (module.js:416:10)

[6/24/2018, 6:18:03 PM] ====================

[6/24/2018, 6:18:03 PM] Loading 1 platforms...

/usr/local/lib/node_modules/homebridge/lib/api.js:122

throw new Error("The requested platform '" + name + "' was not registered by any plugin.");

^


Error: The requested platform 'PhilipsHue' was not registered by any plugin.

at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:122:13)

at Server.str.replace.Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:314:45)

at Server.str.replace.Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:85:36)

at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)

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)

pi@raspberrypi:~ $


 
Last edited:

scouser75

macrumors 68030
Oct 7, 2008
2,753
557
Are you getting that prompt to save the file like I showed earlier? It sounds like you might be quitting nano without saving.

Yup. I get the command. I press Y. I then press CTRL X.

I've attached a report above (I typed Homebridge and it just came up). I've also attached the amendments I made to your original nano command. Oh and I've attached a pic of my iPhone Homebridge screen.
 

Attachments

  • IMG_3235.PNG
    IMG_3235.PNG
    216.6 KB · Views: 207

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,206
15,761
California
Hmmm... when I open a file in nano and edit, then control x I get that save file dialogue. If I then hit y it saves the file and quits nano.
 

scouser75

macrumors 68030
Oct 7, 2008
2,753
557
Hmmm... when I open a file in nano and edit, then control x I get that save file dialogue. If I then hit y it saves the file and quits nano.
Whoops! Apologies! I do press ctrl x. Then press y. But I remain in the nano screen. When you press y, do you return to the Pi command screen?

It's been a long hot day and my brain's switched off.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,206
15,761
California
Yep... I just logged in to mt Pi and when I control-x I get the save dialogue then hit y and it saves and quits the app.
 

scouser75

macrumors 68030
Oct 7, 2008
2,753
557
Yep... I just logged in to mt Pi and when I control-x I get the save dialogue then hit y and it saves and quits the app.
Strange! I’ll try again in a few days. In the mean time, could it be what version of nano text editor I’m using or the config.json I’m using? I can’t remember how I installed it, but if there are updates to these then what version should I be on?
 

scouser75

macrumors 68030
Oct 7, 2008
2,753
557
Cool. Ill try editing , control x and 'y'ing again just in case I'm don't something wrong.
Just tried again and it turns out that after pressing 'Y' I then need to press 'Enter' to exit Nano.

Now to go back and try to install the blooming Ring doorbell!

If after a few more tries it doesn't work, I'm giving up!!! I do need to buy a security camera so may try Homebridge with that. I'm looking at maybe a Logitech Circle 2 wireless (which unfortunately unlike the wired version are not HomeKit compatible).
 
  • Like
Reactions: Weaselboy
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.