Need advice with local server/homebridege

Hi all,
I’m hoping to get a lot of my home lighting controlled by the magic of Blynk, so I went and bought a Raspberry Pi to host a local server. However, I’ve also seen a few things about Homebridge, which I understand has a Blynk plugin. This would help me integrate even more things (nest etc) so I’m interested in hearing from anyone who has used it. Is it worth the trouble? Was it easy to set up? Also, I’ve never used a Pi before so dont know much about them. Is it up to the task of hosting a local Blynk server AND homebridge simultaneously? Is the local Blynk server better/necessary given that I can now use the REST api calls on the cloud? For some reason I’m keen on gosting Blynk local server though and I’m not even entirely sure why :joy: help me decide the best way forward!!

It’s easy and you can contact the creator of the plugin if you have any questions.

Thanks for that Pavel. Do you know if 1 raspberry pi is able to run a Blynk server AND homebridge?

It can definitely run Blynk server. Not sure about Homebridge. If Homebridge supports Linux it will probably be possible.

Brilliant, I’ve seen instructions for running Homebridge on a raspberry pi so I’ll see what I can do over the next couple of weeks. I might lean on you guys a bit if I get stuck, but I’ll make an instructable if it goes well and seems worth it. Thanks everyone.

Ok all, I sat down for a while today and got the Blynk local server running (credit to the team here, it was pretty straight forward)! I
'm now stuck on the homebridge side of things (I know this is a little off topic for the forum, but I’m only really doing this to simplify Blynk with ios). I’ve got it running, but am being told that it can’t find the config.json file. I’ve tried creating a folder called that in the homebridge directory and then copying the ‘blynk’ example (obviously have the plugin too) in there but with no joy. Can anyone here tell a fool like me how to create a json file and put it wherever I want on the Pi? I’m missing something really simple I’m sure, but I dont know what!! How to make it (format? Does just content make it a json?), how to save it where I want (everything I found said it should be in the pi home directory under the homebridge section, but the terminal says it wasn’t found in the root folder where its expected- the Pi won’t let me create a file there). If I create a folder called config.json, do I then put stuff in one file for EVERY device, or do I make one for each thing (eg sonos and blynk), but all in the directory ‘config.json’?
Sorry, I know this could be clearer but I’m away from the Pi now so working from memory. Any help much appreciated!! I’m so close but so far!

Well, creating a file on the Pi is as easy as pie (see what I did there? :stuck_out_tongue: ):

# touch config.json

That will create a file called config.json, but is that what you want? No idea. I am absolutely clueless as to how homebridge works and I would really recommend searching for help on some homebridge forum and not here.

B.t.w. usually things with .something in the name are files, not folders. But than again, I know nothing about homebridge (what is it anyway?).

Edit: Btw there is a good description on the HomeKit github page of what that file does, so I suggest reading up there.

It is a link between “Not official supported IoT devices by apple” and HomeKit. Some have make a bridge between Blynk and Siri by using Homebridge. Also, You can link all kinds of IoT with eachother. Nest can work with your own created light switch.
But, I don’t know either how to do it.

I have Homebridge and a local Blynk server both running on the same RPi, but couldn’t make them work with each other for now.

Homebridge is set up to switch Philips Hue bulbs and is working fine with Homekit.
The local Blynk server is up and switches an RGB stripe connected to a NodeMCU via the Blynk App. The stripe gets controlled by a single Blynk button (V0), when tapped, the NodeMCU sets 3 related digital pins to defined values for R, G and B, and it works fine within the Blynk App.

Now when I setup and add this V0 button in Homebridges’ config.json, according to the Homebridge-Blynk-plugin’s given example here, it shows up in Home-App (iOS10) as switch with correct labeling, but remains unreachable. Also all of the hue bulbs then turn out to be unreachable as well, all devices keeps kind of greyed out along with a red ‘no response’ message after some time.

Could not find any debug or log entry so far, which may tell what the problem is. Hombridge says it found all platforms and plugins, the local Blynk server is up and seems to run fine as well. Might be a port related issue or maybe Homebridge can’t access its own IP address, which is the same as the one of the local Blynk server?! Whatever, at this point I would need some further advice of someone more experienced as well. Would be too awesome to have this working.


Edit: You need to put all the platforms and devices in one single config.json file for Homebridge. To set up or edit a config.json file, type ‘sudo nano config.json’ while in the Homebridge folder. From home directory you might do it like 'sudo nano /[path/to/Homebridge]/config.json.

Type ctrl+o to save, Ctrl+x to close. If you type ‘ls’ it should list all the folders and files in the directory you’re currently in. Type ‘cd /[path]’ to change the directory according the given path value. ‘cd’ without value takes you back to the home directory.

You might check the content of your config.json with this ‘validator’ here for valid json formating.

My config.json looks like this:

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

	"platforms": [{
		"platform": "PhilipsHue",
		"name": "Philips Hue",
		"ip_address": "127.0.0.1",
		"username": "xxxxxxxxxxxxxxxxxxxxxxxx",
		"excludephilips": false
	}, {
		"platform": "Blynk",
		"name": "Blynk",
		"server": "127.0.0.42",
		"appPort": "8443",
		"username": "xxx@xxx.com",
		"password": "xxx",
		"dashboardName": "RGB",
		"accessories": [{
			"name": "Amber",
			"widget": "Switch",
			"mode": "SWITCH",
			"caption": "Amber",
			"pin": "V0"
		}]
	}],

	"accessories": []
}