Homebridge plugin to control OpenWrt flashed devices.
npm install homebridge-openwrt-control





Homebridge plugin for OpenWrt devices.
| Package | Installation | Role | Required |
| --- | --- | --- | --- |
| Homebridge | Homebridge Wiki | HomeKit Bridge | Required |
| Homebridge UI | Homebridge UI Wiki | Homebridge User Interface | Recommended |
| OpenWrt Control | Plug-In Wiki | Homebridge Plug-In | Required |
| OpenWrt ACL File | /usr/share/rpcd/acl.d/ | Access Control | Recommended |
* To use all of functions need to download ACL File and put in to /usr/share/rpcd/acl.d/ folder on your router.
* After put it restart OpenWrt or RPCD service.
* Router:
* Control:
* System reboot.
* Network reload.
* Wireless reload.
* Sensor:
* Link Up/Down.
* Wireless:
* Control:
* Radio On/Off/Restart.
* SSID On/Off/Change Name.
* Sensor:
* Radio Enabled/Disabled.
* SSID Enabled/Disabled.
* Siri, automations and schortcuts control all of available functions.
* External integrations include: REST and MQTT.
* Run this plugin as a Child Bridge (Highly Recommended), this prevent crash Homebridge.
* Install and use Homebridge UI to configure this plugin.
* The sample-config.json can be edited and used as an alternative.
| Key | Description |
| --- | --- |
| name | Here set Your own device name. |
| host | Here set the device IP Address or Hostname.|
| displayType | Here set the device state: 0 - Disabled, 1 - Enabled. |
| auth{} | Authorization object. |
| auth.enable | Here enable authorizatin credentials. |
| auth.user | Here set the authorization Username. |
| auth.passwd | Here set the authorization Password. |
| wireless{} | Wireless object. |
| wireless.radio{} | Wireless Radio object. |
| wireless.radio.control{} | Wireless Radio control object. |
| wireless.radio.control.displayType | Aaccessory type for Radio control in Home app: 0 - Disabled, 1 - Switch, 2 - Outlet, 3 - Lightbulb, 4 - Fan. |
| wireless.radio.control.namePrefix | Here enable device name as a prefix for Radio control name. |
| wireless.radio.sensor{} | Wireless Radio sensor object. |
| wireless.radio.sensor.displayType | Accessory type for Radio sensor in Home app: 0 - Disabled, 1 - Motion Sensor, 2 - Occupancy Sensor, 3 - Contact Sensor. |
| wireless.radio.control.restart | Here enable restart Radio instead of toggle. |
| wireless.radio.sensor.namePrefix | Here enable device name as a prefix for Radio sensor name. |
| wireless.ssid{} | Wireless SSID object. |
| wireless.ssid.control{} | Wireless SSID control object. |
| wireless.ssid.control.displayType | Aaccessory type for SSID control in Home app: 0 - Disabled, 1 - Switch, 2 - Outlet, 3 - Lightbulb, 4 - Fan. |
| wireless.ssid.sensor{} | Wireless SSID sensor object. |
| wireless.ssid.sensor.displayType | Accessory type for SSID sensor in Home app: 0 - Disabled, 1 - Motion Sensor, 2 - Occupancy Sensor, 3 - Contact Sensor. |
| buttons[] | Buttons array. |
| buttons[].displayType | Accessory type for Button in Home app, possible 0 - Disabled, 1 - Outlet, 2 - Switch. |
| buttons[].name | Here set button Name which You want expose to the Homebridge/HomeKit.|
| buttons[].command | Here choose command which will be assigned to the button. |
| buttons[].namePrefix | Here enable device name as a prefix for the Button name. |
| refreshInterval | Here set the data refresh time in seconds. |
| log.deviceInfo | If enabled, log device info will be displayed by every restart of plugin. |
| log.success | If enabled, success log will be displayed in console. |
| log.info | If enabled, info log will be displayed in console. |
| log.warn | If enabled, warn log will be displayed in console. |
| log.error | If enabled, error log will be displayed in console. |
| log.debug | If enabled, debug log will be displayed in console. |
| restFul{} | RESTFul object. |
| restFul.enable | If enabled, RESTful server will start automatically and respond to any path request. |
| restFul.port | Here set the listening Port for RESTful server. |
| mqtt{} | MQTT object. |
| mqtt.enable | If enabled, MQTT Broker will start automatically and publish all available data. |
| mqtt.host | Here set the IP Address or Hostname for MQTT Broker. |
| mqtt.port | Here set the Port for MQTT Broker, default 1883. |
| mqtt.clientId | Here optional set the Client Id of MQTT Broker. |
| mqtt.prefix | Here set the Prefix for Topic or leave empty. |
| mqtt.auth{} | MQTT authorization object. |
| mqtt.auth.enable | Here enable authorization for MQTT Broker. |
| mqtt.auth.user | Here set the MQTT Broker Username. |
| mqtt.auth.passwd | Here set the MQTT Broker Password. |
REST POST calls must include a content-type header of application/json.
Path status response all available paths.
| Method | URL | Path | Response | Type |
| --- | --- | --- | --- | --- |
| GET | http//ip:port | info | { state: false, info: 'Connect Success', linkUp: false, systemInfo: {}, networkInfo: {}, wirelessInfo: {}, wirelessRadios: [], wirelessSsids: [] } | JSON |
| Method | URL | Key | Value | Type | Description |
| --- | --- | --- | --- | --- | --- |
| POST | http//ip:port | SystemReboot | true | boolean | Reboot device |
| | http//ip:port | NetworkReload | true | boolean | Network reload |
| | http//ip:port | WirelessReload | true | boolean | Wireless Reload |
Subscribe using JSON { "SystemReboot": true }
| Method | Topic | Message | Type |
| --- | --- | --- | --- |
| Publish | Info | { state: false, info: 'Connect Success', linkUp: false, systemInfo: {}, networkInfo: {}, wirelessInfo: {}, wirelessRadios: [], wirelessSsids: [] } | JSON |
| Method | Topic | Key | Value | Type | Description |
| --- | --- | --- | --- | --- | --- |
| Subscribe | Set | SystemReboot | true | boolean | Reboot device |
| | Set | NetworkReload | true | boolean | Network reload |
| | Set | WirelessReload | true | boolean | Wireless Reload |