irMagician is used by Siri

  • Introduction
     Mini-board-computers are released in year by year. Current board will be obsolete soon.

  • What they can ?
    Actual Home Automation (HA) system is realized by Raspberry + irMagician, operated by Siri. Originally, HomeKit is Home Automation solution by corresponding equipment such as Philips Hue. However, not matured so far. At voluntary base, node.js implementation is released.

  • RaspberryPi setting
     Required internet connected RaspberryPi
     irMagician needs following setting from Raspbian-pixel(2016/Sep/16) release

    1. /boot/cmdline.txt から

       Delete “console=serial0,115200″ statement

    2. reboot

       After above, Check ttyACM0 by “ls /dev/ttyACM0″

  • System update
     Following commands should be updated

    1. sudo apt-get update
    2. sudo apt-get upgrade

       You can take break by completing update :-)

  • Install git

     Following command

    • sudo apt-get install git

  • pythonの設定 Configure python

     Raspbian has python originally. Should be installed serial-plugin for using irMagician. pyserial can be installed following commands,

    1. sudo apt-get install python-pip
    2. sudo pip install pyserial

  • Install irm.py
     irm.py is script for using irMagician from python. netbuffalo (as lead-partner) contributed.

    • git clone https://github.com/netbuffalo/irmcli.git

       #web-master preferes to rename from irmcli.py to irm.py :-)

    • Capture ir command data

       Several ir command data are provided, however if you can not find out your required data, you have to capture by your self.

      • python irm.py -c

         Capture data.

      • python irm.py -p

         Try to use captured ir command data actually.

      • python irm.py -f -s “filename.json”

         Save it, if no problem.

  • Install node.js
    • sudo apt-get install -y nodejs npm

       Install node.js normally.

    • sudo npm cache clean
    • sudo npm install n -g
    • sudo n stable

       web-master did above operation for set-up node.js.

  • Install homebridge
    • sudo apt-get install libavahi-comat-libdnssd-dev screen

       Install required libraries.

    • sudo npm install -g homebridge –unsafe-perm

       Some options will be required for installation

  • Install homebridge-cmd
    • sudo npm install homebridge-cmd -g

       command line can be operated by this plug-in

  • homebridgeの設定
    • config.jsonの設定

       

      1. Check MAC address of wifi-device

         use ifconfig command. MAC address will be displayed non-capitalized (lowercase). Should be capitalized then describe in config.json

      2. “Tips: Use your mother-tongue’s word in “name”.

         web-master is a Japanese. I have tried to described “light” in “name”. However, could not recognized. Changed from “light” to “電気(denki)” in name. Siri can recognize.

      3. Describe your target command in “on_cmd” and “off_cmd”.

         Describe command following your environment.

  • Future

     Should be improved user interface for setup.

  • Reference URL
     Many thanks !!