<commit_before># MyHomePlugin
Legrand (BTicino) MyHome plugin for homebridge: https://github.com/nfarina/homebridge

Legrand MyHome (http://www.homesystems-legrandgroup.com/BtHomeSystems/home.action) is an Home Automation solution that can manage:
- lighting (standard on/off/dimmed lights)
- thermoregulation 
- curtains, doors
- security systems

With this plugin, the support of a IP gateway installed in your plant and a configuration of all installed 
systems (MyHome does not support the autodiscovery of the system) you can control it. You need to disable the OpenWebNet password-based
authentication from the IP of the device that runs homebridge (ie. Raspberry) or set the auhentication to HMAC; this software does not 
support the proprietary "OWN" encryption schema even if was reverse-engineered and published on a wiki years ago. HMAC authentication is
supported by all recent IP gateways or older one with updated firmware (eg. F454 with v2 firmware).

# Installation (TBD)
Install plugin with npm install -g homebridge-myhome
Add platform within config.json of you homebridge instance:

    {
        "platforms": [{
            "platform": "MyHome Gateway",
            "ipaddress": "192.168.1.1",
            "password": "<PASSWORD>",
            "discovery": false,
            "devices": [
                    /*Static list of devices*/
                ]
            }], 
        "bridge": {
            "username": "CC:22:3D:E3:CE:31", 
            "name": "MyHome HomeBridge Adapter", 
            "pin": "342-52-220", 
            "port": 51826
        }, 
        "description": "My Fantastic Legrand MyHome System", 
        "accessories": []
    }

Restart homebridge
Enjoy!

# Installation (TBD)

Run this commands as root:

   npm -g install homebridge-myhome-tng
   
Create your config.json file starting from the template (sample-config.json) and then:

   homebridge -U .

Sample log is:

    [1/14/2017, 12:11:29 AM] Plugin /usr/lib/nodejs does not have a package name that begins with 'homebridge-'.
    [1/14/2017, 12:11:29 AM] Loaded plugin: homebridge-myhome-tng
    [1/14/2017, 12:11:29 AM] Registering platform 'homebridge-myhome.LegrandMyHome'
    [1/14/2017, 12:11:29 AM] ---
    [1/14/2017, 12:11:29 AM] Loaded config.json with 0 accessories and 1 platforms.
    [1/14/2017, 12:11:29 AM] ---
    [1/14/2017, 12:11:29 AM] Loading 1 platforms...
    [1/14/2017, 12:11:29 AM] Initializing LegrandMyHome platform...
    [1/14/2017, 12:11:29 AM] LegrandMyHome: adds accessory
    [1/14/2017, 12:11:29 AM] LegrandMyHome::MHRelay create object: 0/1/5
    [1/14/2017, 12:11:29 AM] LegrandMyHome: adds accessory
    [1/14/2017, 12:11:29 AM] LegrandMyHome::MHRelay create object: 0/1/1
    [1/14/2017, 12:11:29 AM] LegrandMyHome: adds accessory
    [1/14/2017, 12:11:29 AM] LegrandMyHome::MHRelay create object: 0/1/4
    [1/14/2017, 12:11:29 AM] LegrandMyHome: adds accessory<commit_msg>New README<commit_after># MyHomePlugin
Legrand (BTicino) MyHome plugin for homebridge: https://github.com/nfarina/homebridge

Legrand MyHome (http://www.homesystems-legrandgroup.com/BtHomeSystems/home.action) is an Home Automation solution that can manage:
- lighting (standard on/off/dimmed lights)
- thermoregulation 
- curtains, doors
- security systems

With this plugin, the support of a IP gateway installed in your plant and a configuration of all installed 
systems (MyHome does not support the autodiscovery of the system) you can control it. You need to disable the OpenWebNet password-based
authentication from the IP of the device that runs homebridge (ie. Raspberry) or set the auhentication to HMAC; this software does not 
support the proprietary "OWN" encryption schema even if was reverse-engineered and published on a wiki years ago. HMAC authentication is
supported by all recent IP gateways or older one with updated firmware (eg. F454 with v2 firmware).

# Installation (TBD)
Install plugin with npm install -g homebridge-myhome
Add platform within config.json of you homebridge instance:

    {
        "platforms": [{
            "platform": "MyHome Gateway",
            "ipaddress": "192.168.1.1",
            "password": "<PASSWORD>",
            "discovery": false,
            "devices": [
                    /*Static list of devices*/
                ]
            }], 
        "bridge": {
            "username": "CC:22:3D:E3:CE:31", 
            "name": "MyHome HomeBridge Adapter", 
            "pin": "342-52-220", 
            "port": 51826
        }, 
        "description": "My Fantastic Legrand MyHome System", 
        "accessories": []
    }

Restart homebridge
Enjoy!

# Installation (TBD)

Run this commands as root:

    npm -g install homebridge-myhome-tng
   
Create your config.json file starting from the template (sample-config.json) and then:

    homebridge -U .

Sample log is:

    [1/14/2017, 12:11:29 AM] Plugin /usr/lib/nodejs does not have a package name that begins with 'homebridge-'.
    [1/14/2017, 12:11:29 AM] Loaded plugin: homebridge-myhome-tng
    [1/14/2017, 12:11:29 AM] Registering platform 'homebridge-myhome.LegrandMyHome'
    [1/14/2017, 12:11:29 AM] ---
    [1/14/2017, 12:11:29 AM] Loaded config.json with 0 accessories and 1 platforms.
    [1/14/2017, 12:11:29 AM] ---
    [1/14/2017, 12:11:29 AM] Loading 1 platforms...
    [1/14/2017, 12:11:29 AM] Initializing LegrandMyHome platform...
    [1/14/2017, 12:11:29 AM] LegrandMyHome: adds accessory
    [1/14/2017, 12:11:29 AM] LegrandMyHome::MHRelay create object: 0/1/5
    [1/14/2017, 12:11:29 AM] LegrandMyHome: adds accessory
    [1/14/2017, 12:11:29 AM] LegrandMyHome::MHRelay create object: 0/1/1
    [1/14/2017, 12:11:29 AM] LegrandMyHome: adds accessory
    [1/14/2017, 12:11:29 AM] LegrandMyHome::MHRelay create object: 0/1/4
    [1/14/2017, 12:11:29 AM] LegrandMyHome: adds accessory
{'fraction_non_alphanumeric': 0.1089974293059126, 'fraction_numerical': 0.08157669237360754, 'mean_word_length': 3.0248275862068965, 'pattern_counts': {'":': 26, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6356086', 'n_tokens_mistral': 2183, 'n_tokens_neox': 1822, 'n_words': 618}