The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.3.14-1~deb10u1 (Linux)
File Line Function
/showthread.php 895 errorHandler->error



  • 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HomeBridge with pilight on raspbian
#1
What is HomeBridge?
Quote:Homebridge is a lightweight NodeJS server you can run on your home network that emulates the iOS HomeKit API. It supports Plugins, which are community-contributed modules that provide a basic bridge from HomeKit to various 3rd-party APIs provided by manufacturers of "smart home" devices.

Since Siri supports devices added through HomeKit, this means that with Homebridge you can ask Siri to control devices that don't have any support for HomeKit at all. For instance, using just some of the available plugins, you can say:
  • Siri, unlock the front door.
  • Siri, open the garage door.
  • Siri, turn on the coffee maker.
  • Siri, turn on the living room lights.
  • Siri, good morning!
For more information click here

You will need a Iphone 5 or newer for this to work, updated to the latest version of IOS 9.

I recommend you stop the pilight service to speed this up, its however not required!
Quote:sudo service pilight stop

SSH Into Raspberry
Quote:Default Username: pi
Default Password: raspberry

Quote:sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git-core libavahi-compat-libdnssd-dev make

Raspbian Wheezy Only:
Quote:sudo nano /etc/apt/sources.list - Replace Wheezy with jessie
sudo apt-get update

All Version:
Quote:sudo apt-get install gcc-4.9 g++-4.9

Raspbian Wheezy Only:
Quote:sudo nano /etc/apt/sources.list - Replace jessie with wheezy

Install Node 4.2.4 or higher
Raspberry Pi Model A, B, B+ and Compute Module
Code:
wget https://nodejs.org/dist/v4.2.4/node-v4.2.4-linux-armv6l.tar.gz
tar -xvf node-v4.2.4-linux-armv6l.tar.gz
cd node-v4.2.4-linux-armv6l
sudo cp -R * /usr/local/

Installing Homebridge - This can take a couple of hours
Quote:sudo npm install -g homebridge

Install Homebridge-http to interact with pilight - This can take a couple of hours
Quote:npm install -g homebridge-http

Go to the home dir.
Quote:cd ~

Now run homebridge for the first time
Quote:homebridge

you should receive the following error:
Quote:Couldn't find a config.json file at '/home/pi/.homebridge/config.json'. Look at config-sample.json for examples of how to format your config.js and add your home accessories.

After running it for the first time it should create a folder .homebridge in your home directory.
to check to see if .homebridge was created run:
Quote:ls -all

now if there is no .homebridge folder something didn't go alright.

Now edit the config file by doing the following.
Quote:nano .homebridge/config.json

Code:
{
    "bridge": {
        "name": "pilight Bridge",
        "username": "CC:22:3D:E3:DD:30",
        "port": 51826,
        "pin": "420-00-420"
    },
    "description": "This is an example configuration file with one pilight device. You can use this as a template for adding more devices",
    "accessories": [
        {
            "accessory": "Http",
            "name": "Tafel",
            "switchHandling": "yes",
            "http_method": "GET",
            "on_url": "http://localhost:5001/control?device=[DeviceName]&state=on",
            "off_url": "http://localhost:5001/control?device=[DeviceName]&state=off",
            "status_url": "http://localhost:5001/status/100059",
            "service": "Light",
            "brightnessHandling": "no",
            "brightness_url": "http://localhost/controller/1707/%b",
            "brightnesslvl_url": "http://localhost/status/100054",
            "sendimmediately": "",
            "username": "",
            "password": ""
        }
    ]
}

Replace [DeviceName] with the name of your device you can find this by going to your webgui and then adding /config to the url, where you can find your Device Name.
For example
http://127.0.0.1:5001/config

After changing the config file try loading your new config by running:
Quote:homebridge

Now you will need a IOS app to add this new device to your iphone's homekit database, this can be done by apps such as Insteon+ or Lutron Home+
 
Reply
  


Messages In This Thread
HomeBridge with pilight on raspbian - by Jurre - 01-12-2016, 06:36 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Does piSchedule work with pilight 8.1.1-nightly Peter S 0 1,889 06-29-2018, 07:57 PM
Last Post: Peter S
  pilight-console - an LCD / keypad interface for pilight frenchie71 3 1,706 11-21-2017, 11:15 PM
Last Post: curlymo
  Connect pilight to your hue bridge hannemann 3 3,156 01-03-2017, 11:26 PM
Last Post: hannemann
Wink PHP class using pilight socket connection Dan 0 1,726 11-03-2016, 11:41 AM
Last Post: Dan
  piScheduler -- A pilight extension for the daily switch plan gneandr 159 76,354 08-09-2016, 04:33 PM
Last Post: gneandr
  Controlling a RGB Led Strip over pilight mightyuhu 2 2,764 08-06-2016, 09:10 PM
Last Post: JohannK
  pilight voice commands kniazio 11 6,857 01-29-2016, 07:51 PM
Last Post: sral
  Python Ping pilight detect mobilephone Cryptomaster 0 2,387 01-10-2016, 04:17 PM
Last Post: Cryptomaster
  pilight config editor ktams 16 9,254 01-06-2016, 02:42 PM
Last Post: ktams
  command processing between pilight and openhab royhofman1989 3 3,141 07-13-2015, 11:26 AM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)