homebridge-livebox-info
homebridge-livebox-info is homebridge plugin for Apple HomeKit, get and return somes Orange Livebox informations.
Such as :
- Speed Downstream (Mbit)
- Speed Upstream (Mbit)
- Uptime
- SoftwareVersion
- ExternalIPAddress
- IPv4Address
- IPv6Address
- Phone Number
- Phone State
- TV State
- WifiState
Exemple of .json data response file
Prerequisites
- Install Homebrew (Homebrew installs the stuff you need that Apple didn’t)
- Install node.js on macOS
- Install Homebridge on macOS
- Install Homebridge Config UI X on macOS (optional)
- Install Eve.app on iOS (for all availables plugin function), or it's possible to used "Home" app on macOS (only avalable for macOS Majave) or iOS (all plugin function aren't availables on this app !)
- Install Python 3 & pip3 on macOS
Installation
Used npm tool to install homebridge-livebox-info, and execute the command line below
npm i homebridge-livebox-info
Configuration
STEP 1 : homebridge config.json file
Add this lines in config.json
"accessories": ,
Parameter | Note | Optionnal | value |
---|---|---|---|
accessory |
Name of accessory | No | LiveboxInfo |
name |
a human-readable name for your plugin | No | Livebox Info |
file |
.json respons file | yes | default : /tmp/_homebridge-livebox-info.json |
updateInterval |
is time in ms of data update | yes | default : null |
Note:
1. Theindex.js
call<PATH of Node Module>/homebridge-macosx-info/sh/homebridge-livebox-info.sh
shell script. You can find this script in the repository in/src/sh
directory
2. It's possible that you can change the path ofhomebridge-livebox-info.sh
inreadUptime
function onindex.js
script
{ const exec = exec; var script = await ; };
homebridge-livebox-info.sh
file in src/sh
directory
STEP 2 : Adapte - You can change path of temporary .json files :
JSON_DATA_FILE
variable
#!/bin/sh #------------------------------------------------------------------- #~ @(#) Name : homebridge-livebox-info.sh #~ @(#) Desc : Persist in file the livebox sys infrmation needed by "homebridge-livebox-info" Homebridge/HomeKit plugin #~ @(#) version : 1.0 # Auteur : adm@di-marco.net # Date : 2019-09-28 #------------------------------------------------------------------- # Version history # v1.O - Initial version - Test and work on : mac mini (late 2014) 10.13.6 (High Sierra) & livebox v4 #------------------------------------------------------------------- #~ Usage : homebridge-livebox-info.sh #------------------------------------------------------------------- DIR=$(dirname $0)TMP_DIR=/tmpTMP_DSLRATE=_homebridge-livebox-dslrate.tmpTMP_PHONESTATE=_homebridge-livebox-phonestate.tmpTMP_TVSTATE=_homebridge-livebox-tvstate.tmpTMP_WIFISTATE=_homebridge-livebox-wifistate.tmpJSON_DATA_FILE=$TMP_DIR/_homebridge-livebox-info.json # path of .json respons file livebox_mon
lbx_sysbus.py
file in src/sh
directory
STEP 3 : Install & configure lbx_sysbus.py
is a Python 3
script that allows you to programmatically control a Livebox and explore control possibilities and other hidden information. It is an "experimental" tool.
- The script is written in
Python 3
. It also requiresrequests
which greatly simplifies HTTP requests.
$ pip3 install requests
- Now you must change/adapt the variables to connect on Orange Livebox :
URL_LIVEBOX
,USER_LIVEBOX
,PASSWORD_LIVEBOX
andVERSION_LIVEBOX
URL_LIVEBOX = '<url of livebox interface configuration>' #example http://192.168.1.1/ USER_LIVEBOX = '<user admin>' #example admin PASSWORD_LIVEBOX = '<user admin pwd>' #example p@ssw0rd VERSION_LIVEBOX = '<LiveBox version>' #example lb4
It will also install the Graphviz engine. On OSX we can use brew. On Linux, sudo apt-get install graphviz or equivalent depending on the distribution.
STEP 4 : restart homebridge
Combine the two commands in a terminal to restart homebridge background process
launchctl unload ~/Library/LaunchAgents/com.homebridge.server.plist
launchctl load ~/Library/LaunchAgents/com.homebridge.server.plist
Note: This commands are only avalable for macOS
Todo
Known bugs
Credits
- The original HomeKit API work was done by KhaosT in his HAP-NodeJS project
- simont77 - fakegato-history
- Rene Devichi - sysbus Orange Livebox 2, 3 et 4
Disclaimer
I'm furnishing this software "as is". I do not provide any warranty of the item whatsoever, whether express, implied, or statutory, including, but not limited to, any warranty of merchantability or fitness for a particular purpose or any warranty that the contents of the item will be error-free. The development of this module is not supported by Apple Inc. or eve. These vendors and me are not responsible for direct, indirect, incidental or consequential damages resulting from any defect, error or failure to perform.
License
This project is licensed under the MIT License - see the LICENSE file for details