Interact with Myfox HC2 alarm.

Usage no npm install needed!

<script type="module">
  import homebridgeMyfoxhc2 from 'https://cdn.skypack.dev/homebridge-myfoxhc2';


Homebridge Myfox HC2 plugin

Homebridge plugin for exposing Myfox HC2 alarm system.


[sudo] npm install -g --unsafe-perm homebridge-myfoxhc2

or using homebridge plugin interface. See HomeBridge Documentation.


Go to myfox API Authentication, section Get a token. Client ID and Client Secret can be found at myfox API - My Applications. Obtain a fresh token like this one:


You will need to extract the refresh_token. On your Homebridge installation, go to Plugins and access Homebridge Myfox HC2 Plugin settings. Client id, Client secret and Refresh token are mandatory !


At startup the plugin will list all available devices and scenarios. To customize them (show/hide, override type, ...), you will need each Site identifier and Device identifier. Logs:

[21/05/2020 à 08:16:20] Homebridge is running on port 51576.
[21/05/2020 à 08:16:24] [MyfoxHC2]      Site / Alarm existing 78912 Maison ea842614-8a8b-4c3e-961d-80a588f5836a
[21/05/2020 à 08:16:25] [MyfoxHC2]      Electric device hidden 78912 556677 Prise Salle à manger 9a0b97b2-23f7-4336-bb6e-68e121e16984
[21/05/2020 à 08:16:25] [MyfoxHC2]      Electric device existing 78912 555479 Prise Bureau c5c06a79-bf00-4a2a-805f-426055bcef88
[21/05/2020 à 08:16:25] [MyfoxHC2]      Electric device existing 78912 325677 Prise Caméra 1f6a2321-f5fb-4120-a43c-cbd35b6d69b6
[21/05/2020 à 08:16:27] [MyfoxHC2]      Scenario hidden 78912 489945 Déclenchement sirène b899adce-84e0-4001-94ff-395773df1b12

78912 is Site identifier and 556677 is the Device identifier for an outlet named Prise Salle à manger.

Development environnement

see (Official documentation)[https://github.com/homebridge/homebridge#plugin-development]

A default config file (config.json.sample) is available if you want to setup an environment using nvm. This config file must be place in ~/.homebridge/config.json. Homebridge UI is available on (port 8080)[http://localhost:8080].

Setup and link local project to homebridge installation

$ git clone https://github.com/Jorire/homebridge-myfoxhc2.git
$ cd homebridge-myfoxhc2
$ npm install
$ npm link

To test some modifications

$ npm run-script build
$ homebridge -D