|
4 years ago | |
---|---|---|
.gitignore | 4 years ago | |
Makefile | 4 years ago | |
README.md | 4 years ago | |
cfg.cc | 4 years ago | |
cfg.h | 4 years ago | |
fb-login-test.sh | 4 years ago | |
fbsh-cli.cc | 4 years ago | |
fbsh.cc | 4 years ago | |
fbsh.h | 4 years ago | |
tcp.cc | 4 years ago | |
tcp.h | 4 years ago |
README.md
FBSmartHome
A small collection of usefull FritzBox SmartHome tools and scripts. Still in development and highly experimental.
fb-login-test.sh
A simple script to test the user name and passwort set in file ~/.fbsh.config
. If the login was successfull an XML file with connected SmartHome devices will be printed out.
The config file for both script and client use the same syntax.
#
# PARAMETERNAME=VALUE no space allowed except for the value.
# but not between parametername, = and value.
#
#
FBSH_USER=testuser
FBSH_PASS=anypassword
FBSH_SIDFILE=/home/username/.fbsh.sid
FBSH_HOSTNAME=http://192.168.0.1
fbsh-cli FritzBox SmartHome Console Client
Compilation
On debian you need the libxml2 and openssl devel pakages for compilation. If you have a debian based distribution you can install them with:
apt install libxml2-dev libssl-dev
Compile the source with make and run the binary. If needed manually copy the binary to a place of your choise. The Makefile does not support installation.
make
./fbsh-cli
Configuration File
To set some default settings and create the configuration file, just run the command.
./fbsh-cli -host http://192.168.0.1 -user SOMEUSER -pass SOMEPASSWORD saveconfig
The default configuration will be saved under $HOME/.fbsh.config
. In addition the client will save a SID file .fbsh.sid
which contains the last known SID (session ID). This file will also be located inside the home directory.
Both script and the client will use the same config file.
Test the Login
Test the connection with ./fbsh-cli connect
. The successfull conntion will look like:
user@desktop ~/FBSmartHome $ ./fbsh-cli connect
SID:989346018a2dca53
user@desktop ~/FBSmartHome $
Supported Commands
- saveconfig
- connect
- list
- help
Currently Not Working
- HTTPS is yet not supported
- sending commands to switches and lights
- readin additional data from devices